6

Is it possible to get libspotify working on the official Raspbian image? I installed it but couldn't figure out why my applications couldn't link to it:

error while loading shared libraries: libspotify.so.12: cannot open shared object file: No such file or directory

Looking at ldd, I noticed that everything else has a "hard-float" flag.

libspotify.so.12 (libc6) => /usr/lib/libspotify.so.12
libsoup-2.4.so.1 (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/libsoup-2.4.so.1

As far as I know there's no way to build your own copy of libspotify... Is there a way to link to a library that is not compiled with hard-float support in Raspbian?

Alex Chamberlain
  • 15,530
  • 14
  • 67
  • 113
user433194
  • 121
  • 2
  • 3
  • I notice libspotify.so.12 is in a different folder. Is that path listed in /etc/ld.so.conf? I would expect a more specific error if it was hard-float related. "No such file or directory" usually means what it suggests - the file is not where the system is looking for it. – Malvineous Jul 23 '12 at 03:37
  • Have you run ldconfig since installing it? – Alex Chamberlain Jul 23 '12 at 06:14
  • Yeah, I have. I also put a symlink to it in /usr/lib/arm-linux-gnueabihf/ to see if that made any difference. That's why I assumed it must be a hard-float issue. – user433194 Jul 23 '12 at 12:49

5 Answers5

2

Libspotify works with soft float Raspbian. If you want Spotify to compile a hard float version of their library, go give kudos to the idea in their community page: http://community.spotify.com/t5/Spotify-Ideas/armhf-Spotify-library-for-DIY-projects/idi-p/140972

skeba
  • 21
  • 3
1

It should be possible. The entire application will have to be soft-float and you must build any library the application uses, including the C library. If these libraries are shared, this has implications for other applications too. So, you may choose to link said application statically - with the exception of libspotify itself.

If I were you, I would implement a statically-linked thin wrapper around libspotify with a client-server interface - a libspotify server if you will. That way, you can build the front end using hard float libraries - the GUI is much faster using hard float.

References

  1. ARM Linux FAQ

PS

error while loading shared libraries: libspotify.so.12: cannot open shared object file: No such file or directory

This error is unlikely to be related to soft/hard incompatibility issues.

Alex Chamberlain
  • 15,530
  • 14
  • 67
  • 113
  • Thanks for the tip. I can't think of any other reason this should be having troubles. I tried symlinking a copy of the library into a folder where the same application is successfully including other libraries from. It still says it's not found :/ It's showing libspotify.so.12 (libc6) => /usr/lib/libspotify.so.12 so I think it has found the library... it just doesn't consider it a suitable library or something – user433194 Jul 23 '12 at 21:00
1

There is a soft-float version of Raspbian available on the RPi Foundation's download page. Might give that a whirl, see if it works.

ArchHaskeller
  • 1,435
  • 12
  • 35
0

It is, sadly, related to the ARMHF. Libspotify doesn't support this. Unless Spotify creates a HF supporting library, or the despotify library is mature enough to handle HF, there is no way for spotify to work on most Raspberry XBMC builds.

As far as I know, Raspbian, RaspBMC, XBian and OpenElec use hard float.

Sphere
  • 1
0

Good news! It seems there is now a beta version of the spotify lib hard-float! You can find it here (not tested!): https://developer.spotify.com/technologies/libspotify/

Philippe
  • 101
  • 1