Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

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?

share|improve this question
    
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 3:37
    
Have you run ldconfig since installing it? –  Alex Chamberlain Jul 23 '12 at 6: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 Answers 5

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

share|improve this answer

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.

share|improve this answer
    
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

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.

share|improve this answer
    
Could you please edit your answer providing a link? –  Avio Sep 29 '12 at 9:05

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.

share|improve this answer

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/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.