I am setting up a Raspberry Pi B to have a music server groove basin.
To get this working it depends on libebur128. However when I try and compile it with cmake I get the following error.
$ cmake .. -DCMAKE_BUILD_TYPE=Debug
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 2.8.12 or higher is required. You are running version 2.8.9
-- Configuring incomplete, errors occurred!
I have also installed cmake 2.8.12. I also checked to see it it is that version and it seems so
$ /opt/cmake/bin/cmake -version
cmake version 2.8.12
if anyone knows why this is happening, it will very helpful
Now everything seems to be installed apart from libsoundio, which is one of the dependencies. however when I install it I get the following error,
$ make
[ 2%] Building C object CMakeFiles/libsoundio_shared.dir/src/soundio.c.o
cc1: error: unrecognized command line option ‘-std=c11’
CMakeFiles/libsoundio_shared.dir/build.make:54: recipe for target 'CMakeFiles/libsoundio_shared.dir/src/soundio.c.o' failed
make[2]: *** [CMakeFiles/libsoundio_shared.dir/src/soundio.c.o] Error 1
CMakeFiles/Makefile2:192: recipe for target 'CMakeFiles/libsoundio_shared.dir/all' failed
make[1]: *** [CMakeFiles/libsoundio_shared.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2
I have a feeling that I have not installed it correctly, or I have the wrong version.
however everything before this looks fine
$ git clone https://github.com/andrewrk/libsoundio
Cloning into 'libsoundio'...
remote: Counting objects: 2051, done.
remote: Total 2051 (delta 0), reused 0 (delta 0), pack-reused 2051
Receiving objects: 100% (2051/2051), 584.21 KiB | 455 KiB/s, done.
Resolving deltas: 100% (1500/1500), done.
$ cd libsoundio
$ mkdir build
$ cmake ..
Configuring libsoundio version 1.0.3
-- Could NOT find JACK (missing: JACK_LIBRARY JACK_INCLUDE_DIR)
-- Could NOT find PULSEAUDIO (missing: PULSEAUDIO_LIBRARY PULSEAUDIO_INCLUDE_DIR)
-- Could NOT find COREAUDIO (missing: COREAUDIO_LIBRARY COREAUDIO_INCLUDE_DIR)
-- Could NOT find WASAPI (missing: WASAPI_INCLUDE_DIR)
Installation Summary
--------------------
* Install Directory : /usr/local
* Build Type : Debug
* Build static libs : ON
* Build examples : ON
* Build tests : ON
System Dependencies
-------------------
* threads : OK
* JACK (optional) : not found
* PulseAudio (optional) : not found
* ALSA (optional) : OK
* CoreAudio (optional) : not found
* WASAPI (optional) : not found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/libsoundio/build
if anyone knows why this is happening, it will very helpful
Good. Well not good. Because gcc4.6 doesn't support c11 (the -std=c11 flag). You have to install the 4.8 version of GCC. What version of Debian you have?
Hmm I looks like it fixed one thing, However they looks like something is missing
[ 2%] Building C object CMakeFiles/libsoundio_shared.dir/src/soundio.c.o
In file included from /home/pi/libsoundio/src/alsa.h:14:0,
from /home/pi/libsoundio/src/soundio_private.h:23,
from /home/pi/libsoundio/src/soundio.c:8:
/home/pi/libsoundio/src/atomics.h:14:23: fatal error: stdatomic.h: No such file or directory
#include <stdatomic.h>
^
compilation terminated.
CMakeFiles/libsoundio_shared.dir/build.make:54: recipe for target 'CMakeFiles/libsoundio_shared.dir/src/soundio.c.o' failed
make[2]: *** [CMakeFiles/libsoundio_shared.dir/src/soundio.c.o] Error 1
CMakeFiles/Makefile2:192: recipe for target 'CMakeFiles/libsoundio_shared.dir/all' failed
make[1]: *** [CMakeFiles/libsoundio_shared.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2
Ok Sorry for taking a long time to reply, I been busy this week.
However I have installed GCC 4.9
$ gcc --version
gcc (Raspbian 4.9.2-10) 4.9.2
I then ran the command again (cmake .. followed by make ) and i got the flowing message
[ 2%] Building C object CMakeFiles/libsoundio_shared.dir/src/soundio.c.o
In file included from /usr/include/alsa/asoundlib.h:49:0,
from /home/pi/libsoundio/src/alsa.h:16,
from /home/pi/libsoundio/src/soundio_private.h:23,
from /home/pi/libsoundio/src/soundio.c:8:
/usr/include/alsa/pcm.h:944:1: error: unknown type name ‘u_int8_t’
u_int8_t snd_pcm_format_silence(snd_pcm_format_t format);
^
/usr/include/alsa/pcm.h:945:1: error: unknown type name ‘u_int16_t’
u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format);
^
/usr/include/alsa/pcm.h:946:1: error: unknown type name ‘u_int32_t’
u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format);
^
/usr/include/alsa/pcm.h:947:1: error: unknown type name ‘u_int64_t’
u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format);
^
/usr/include/alsa/pcm.h:1052:1: error: unknown type name ‘int16_t’
int16_t *snd_pcm_scope_s16_get_channel_buffer(snd_pcm_scope_t *scope,
^
In file included from /home/pi/libsoundio/src/soundio_private.h:23:0,
from /home/pi/libsoundio/src/soundio.c:8:
/home/pi/libsoundio/src/alsa.h:51:5: error: unknown type name ‘snd_pcm_chmap_t’
snd_pcm_chmap_t *chmap;
^
/home/pi/libsoundio/src/alsa.h:73:5: error: unknown type name ‘snd_pcm_chmap_t’
snd_pcm_chmap_t *chmap;
^
CMakeFiles/libsoundio_shared.dir/build.make:54: recipe for target 'CMakeFiles/libsoundio_shared.dir/src/soundio.c.o' failed
make[2]: *** [CMakeFiles/libsoundio_shared.dir/src/soundio.c.o] Error 1
CMakeFiles/Makefile2:192: recipe for target 'CMakeFiles/libsoundio_shared.dir/all' failed
make[1]: *** [CMakeFiles/libsoundio_shared.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2
when I got this error message I had a look to see if they are any solutions to solve this, and I came across this.
on looking at this git hub bug post it seems to be a bug with libsoundio.