1

I'm trying to compile the examples provided with Libspotify on my Raspberry Pi B. Had a load of errors about alsa to start with, but managed to fix them by installing libasound2-dev.

Now I'm getting the following error when I try to compile - does anyone have any suggestions, please?

The problem seems to be stemming from

/usr/bin/ld: alsa-audio.o: undefined reference to symbol 'pthread_create@@GLIBC_2.4' //lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line

Terminal output:

for a in jukebox spshell localfiles; do make -C $a  all; done
make[1]: Entering directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/jukebox'
cc -I/usr/include/alsa  -I/usr/local/include  -Wall  -L/usr/local/lib  jukebox.o appkey.o alsa-audio.o audio.o -o jukebox -lasound  -lspotify 
/usr/bin/ld: alsa-audio.o: undefined reference to symbol 'pthread_create@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:21: recipe for target 'jukebox' failed
make[1]: *** [jukebox] Error 1
make[1]: Leaving directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/jukebox'
make[1]: Entering directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/spshell'
cc -I/usr/local/include  -Wall -L/usr/local/lib  spshell.o spshell_posix.o appkey.o cmd.o browse.o search.o toplist.o inbox.o star.o playlist.o test.o -lreadline -lspotify  -o spshell
/usr/bin/ld: spshell_posix.o: undefined reference to symbol 'pthread_create@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'spshell' failed
make[1]: *** [spshell] Error 1
make[1]: Leaving directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/spshell'
make[1]: Entering directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/localfiles'
make[1]: Leaving directory '/home/username/Downloads/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/share/doc/libspotify/examples/localfiles'
CL.
  • 173,858
  • 17
  • 217
  • 259
user2463758
  • 67
  • 3
  • 11
  • Are you cross-compiling? If not, what is the output of `pkg-config --libs-only-l --libs-only-other alsa`? – CL. Apr 04 '16 at 06:48
  • @CL - no I'm not cross compiling. The output of "pkg-config --libs-only-l --libs-only-other alsa" is "-lasound" – user2463758 Apr 04 '16 at 10:14

0 Answers0