Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Error libspotify.so no such file #48

Closed
obi12341 opened this Issue · 45 comments
@obi12341

19:13:23 T:1181971520 ERROR: Error Type:
19:13:23 T:1181971520 ERROR: Error Contents: /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/x86/libspotify.so: cannot open shared object file: No such file or directory
19:13:23 T:1181971520 ERROR: Traceback (most recent call last):
File "/home/pi/.xbmc/addons/script.audio.spotimc/default.py", line 76, in
session = main(addon_path)
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/spotimcgui/init.py", line 259, in main
initially_unload_playlists=False,
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/spotify/session.py", line 265, in init
err = self.session_interface.create(ctypes.byref(config), ctypes.byref(self.__session_struct))
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/_spotify/session.py", line 110, in create
ctypes.POINTER(config), ctypes.POINTER(ctypes.c_void_p)
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/_spotify/__init
.py", line 91, in get_func
return self.get_func2(name, name, restype, *argtypes)
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/_spotify/__init
.py", line 81, in get_func2
lib = self.get_library()
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/spotify/__init
.py", line 62, in get_library
self.library = self._load_library()
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/_spotify/__init
.py", line 107, in load_library
return ll.load('libspotify')
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/spotify/__init
.py", line 206, in load
library = self.load(name)
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/spotify/__init
.py", line 198, in load
return loader.LoadLibrary(full_path)
File "/usr/lib/python2.6/ctypes/__init_
.py", line 431, in LoadLibrary
return self.dlltype(name)
File "/usr/lib/python2.6/ctypes/__init_
.py", line 353, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/x86/libspotify.so: cannot open shared object file: No such file or directory
19:13:23 T:1263825984 NOTICE: Thread Jobworker start, auto delete: true
19:13:23 T:1181971520 ERROR: Exception
19:13:23 T:1181971520 ERROR: OSError
19:13:23 T:1181971520 ERROR: :
19:13:23 T:1181971520 ERROR: '/home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/x86/libspotify.so: cannot open shared object file: No such file or directory'
19:13:23 T:1181971520 ERROR: in
19:13:23 T:1181971520 ERROR: >
19:13:23 T:1181971520 ERROR: ignored

@supernova32

you need to download the libspotify library made for ARMv6 architecture and place it in the linux/x86 folder. Download the library from this link: http://developer.spotify.com/download/libspotify/libspotify-10.1.16-Linux-armv6-release.tar.gz

It needs to be version 10 otherwise it won't work.

@obi12341

working now :)

@mspiegle

I think the latest version of raspbmc broke this plugin again. I have double-checked to ensure I'm using the right libspotify and it still seems broken:

Error message:

21:27:06 T:1292891200 ERROR: Traceback (most recent call last):
File "/home/pi/.xbmc/addons/script.audio.spotimc/default.py", line 76, in
session = main(addon_path)
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/spotimcgui/init.py", line 259, in main
initially_unload_playlists=False,
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/spotify/session.py", line 265, in init
err = self.session_interface.create(ctypes.byref(config), ctypes.byref(self.__session_struct))
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/_spotify/session.py", line 110, in create
ctypes.POINTER(config), ctypes.POINTER(ctypes.c_void_p)
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/_spotify/__init
.py", line 91, in get_func
return self.get_func2(name, name, restype, *argtypes)
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/_spotify/__init
.py", line 81, in get_func2
lib = self.get_library()
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/spotify/__init
.py", line 62, in get_library
self.library = self._load_library()
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/_spotify/__init
.py", line 107, in load_library
return ll.load('libspotify')
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/spotify/__init
.py", line 206, in load
library = self.load(name)
File "/home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/PyspotifyCtypes.egg/spotify/__init
.py", line 198, in load
return loader.LoadLibrary(full_path)
File "/usr/lib/python2.7/ctypes/__init_
.py", line 443, in LoadLibrary
return self.dlltype(name)
File "/usr/lib/python2.7/ctypes/__init_
.py", line 365, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/arm/libspotify.so: cannot open shared object file: No such file or directory

I used the libspotify mentioned in this ticket:

$ md5sum /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/arm/libspotify.so
d066f846ebce5de20df3232770774983 /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/arm/libspotify.so

@mspiegle

Here's some additional info. Here's an example of trying to load libspotify.so:

pi@raspbmc:~/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/arm$ python
Python 2.7.3rc2 (default, May  6 2012, 20:02:25) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import *
>>> lib = cdll.LoadLibrary('/home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/arm/libspotify.so')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/arm/libspotify.so: cannot open shared object file: No such file or directory

And here's an example of trying to load some other random library on the system:

pi@raspbmc:/usr/lib$ python
Python 2.7.3rc2 (default, May  6 2012, 20:02:25) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import *
>>> lib = cdll.LoadLibrary('/usr/lib/librtmp.so')
>>> print lib
CDLL '/usr/lib/librtmp.so', handle 12cefd0 at 126f110

Interestingly, ldd isn't happy either:

pi@raspbmc:/usr/lib$ ldd /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/arm/libspotify.so
 not a dynamic executable

But it works fine on this other random library:

pi@raspbmc:~$ ldd /usr/lib/librtmp.so
 libgnutls.so.26 => /usr/lib/arm-linux-gnueabihf/libgnutls.so.26 (0x401bf000)
 libgcrypt.so.11 => /lib/arm-linux-gnueabihf/libgcrypt.so.11 (0x40279000)
 libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x40107000)
 libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x402f9000)
 libtasn1.so.3 => /usr/lib/arm-linux-gnueabihf/libtasn1.so.3 (0x400c6000)
 libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x400dc000)
 libp11-kit.so.0 => /usr/lib/arm-linux-gnueabihf/libp11-kit.so.0 (0x4009a000)
 /lib/ld-linux-armhf.so.3 (0x40073000)
 libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0x4014a000)
 libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x40155000)
 libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x4003c000)

Here's an objdump output for libspotify.so:

pi@raspbmc:/usr/lib$ objdump -x /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/arm/libspotify.so

/home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/arm/libspotify.so:     file format elf32-littlearm
/home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/arm/libspotify.so
architecture: arm, flags 0x00000150:
HAS_SYMS, DYNAMIC, D_PAGED
start address 0x00010ac0

Program Header:
0x70000001 off    0x0034fc10 vaddr 0x0034fc10 paddr 0x0034fc10 align 2**2
         filesz 0x00000010 memsz 0x00000010 flags r--
    LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**15
         filesz 0x0034fc20 memsz 0x0034fc20 flags r-x
    LOAD off    0x00350000 vaddr 0x00350000 paddr 0x00350000 align 2**15
         filesz 0x00012420 memsz 0x00033cc8 flags rw-
 DYNAMIC off    0x003594a0 vaddr 0x003594a0 paddr 0x003594a0 align 2**2
         filesz 0x00000118 memsz 0x00000118 flags rw-
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
         filesz 0x00000000 memsz 0x00000000 flags rwx

Dynamic Section:
  NEEDED               libpthread.so.0
  NEEDED               librt.so.1
  NEEDED               libm.so.6
  NEEDED               libc.so.6
  NEEDED               libgcc_s.so.1
  SONAME               libspotify.so.10
  INIT                 0x0001038c
  FINI                 0x003392fc
  INIT_ARRAY           0x00350000
  INIT_ARRAYSZ         0x0000001c
  FINI_ARRAY           0x0035001c
  FINI_ARRAYSZ         0x0000002c
  HASH                 0x000000d4
  STRTAB               0x000022a8
  SYMTAB               0x00000ae8
  STRSZ                0x00001af9
  SYMENT               0x00000010
  PLTGOT               0x003595b8
  PLTRELSZ             0x000004b0
  PLTREL               0x00000011
  JMPREL               0x0000fedc
  REL                  0x00004174
  RELSZ                0x0000bd68
  RELENT               0x00000008
  VERDEF               0x0000409c
  VERDEFNUM            0x00000002
  VERNEED              0x000040d4
  VERNEEDNUM           0x00000005
  VERSYM               0x00003da2
  RELCOUNT             0x000017a6

Version definitions:
1 0x01 0x0229a100 libspotify.so.10
2 0x00 0x0a718049 libspotify

Version References:
  required from libm.so.6:
    0x0d696914 0x00 07 GLIBC_2.4
  required from libgcc_s.so.1:
    0x0b792655 0x00 06 GCC_3.5
  required from librt.so.1:
    0x0d696914 0x00 05 GLIBC_2.4
  required from libc.so.6:
    0x0d696914 0x00 04 GLIBC_2.4
  required from libpthread.so.0:
    0x0d696914 0x00 03 GLIBC_2.4
private flags = 5000002: [Version5 EABI] [has entry point]

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .hash         00000a14  000000d4  000000d4  000000d4  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .dynsym       000017c0  00000ae8  00000ae8  00000ae8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .dynstr       00001af9  000022a8  000022a8  000022a8  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .gnu.version  000002f8  00003da2  00003da2  00003da2  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .gnu.version_d 00000038  0000409c  0000409c  0000409c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .gnu.version_r 000000a0  000040d4  000040d4  000040d4  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  6 .rel.dyn      0000bd68  00004174  00004174  00004174  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  7 .rel.plt      000004b0  0000fedc  0000fedc  0000fedc  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  8 .init         0000000c  0001038c  0001038c  0001038c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  9 .plt          0000071c  00010398  00010398  00010398  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 10 .text         0032883c  00010ac0  00010ac0  00010ac0  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 11 .fini         00000008  003392fc  003392fc  003392fc  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 12 .rodata       00016900  00339310  00339310  00339310  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 13 .ARM.exidx    00000010  0034fc10  0034fc10  0034fc10  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 14 .init_array   0000001c  00350000  00350000  00350000  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 15 .fini_array   0000002c  0035001c  0035001c  0035001c  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 16 .jcr          00000000  00350048  00350048  00350048  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 17 .data.rel.ro  00009450  00350050  00350050  00350050  2**4
                  CONTENTS, ALLOC, LOAD, DATA
 18 .dynamic      00000118  003594a0  003594a0  003594a0  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 19 .got          0000098c  003595b8  003595b8  003595b8  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 20 .data         000084d0  00359f50  00359f50  00359f50  2**4
                  CONTENTS, ALLOC, LOAD, DATA
 21 .bss          000218a8  00362420  00362420  00362420  2**4
                  ALLOC
 22 .ARM.attributes 00000030  00000000  00000000  00362420  2**0
                  CONTENTS, READONLY
 23 .comment      0000003f  00000000  00000000  00362450  2**0
                  CONTENTS, READONLY
SYMBOL TABLE:
no symbols

And here's one from the random library. Doesn't seem too much different from libspotify?

pi@raspbmc:~$ objdump -x /usr/lib/librtmp.so

/usr/lib/librtmp.so:     file format elf32-littlearm
/usr/lib/librtmp.so
architecture: arm, flags 0x00000150:
HAS_SYMS, DYNAMIC, D_PAGED
start address 0x000039a8

Program Header:
    LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**15
         filesz 0x000148a4 memsz 0x000148a4 flags r-x
    LOAD off    0x00015000 vaddr 0x0001d000 paddr 0x0001d000 align 2**15
         filesz 0x000007dc memsz 0x000007fc flags rw-
 DYNAMIC off    0x000153e8 vaddr 0x0001d3e8 paddr 0x0001d3e8 align 2**2
         filesz 0x00000108 memsz 0x00000108 flags rw-
    NOTE off    0x000000d4 vaddr 0x000000d4 paddr 0x000000d4 align 2**2
         filesz 0x00000024 memsz 0x00000024 flags r--
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
         filesz 0x00000000 memsz 0x00000000 flags rw-

Dynamic Section:
  NEEDED               libgnutls.so.26
  NEEDED               libgcrypt.so.11
  NEEDED               libz.so.1
  NEEDED               libc.so.6
  SONAME               librtmp.so.0
  INIT                 0x0000319c
  FINI                 0x00010a1c
  INIT_ARRAY           0x0001d000
  INIT_ARRAYSZ         0x00000004
  FINI_ARRAY           0x0001d004
  FINI_ARRAYSZ         0x00000004
  HASH                 0x000000f8
  GNU_HASH             0x00000798
  STRTAB               0x0000199c
  SYMTAB               0x00000b8c
  STRSZ                0x00000c55
  SYMENT               0x00000010
  PLTGOT               0x0001d4f0
  PLTRELSZ             0x00000548
  PLTREL               0x00000011
  JMPREL               0x00002c54
  REL                  0x00002824
  RELSZ                0x00000430
  RELENT               0x00000008
  VERNEED              0x000027b4
  VERNEEDNUM           0x00000003
  VERSYM               0x000025f2
  RELCOUNT             0x0000007c

Version References:
  required from libgnutls.so.26:
    0x091de684 0x00 04 GNUTLS_1_4
  required from libc.so.6:
    0x0d696917 0x00 05 GLIBC_2.7
    0x0d696914 0x00 03 GLIBC_2.4
  required from libgcrypt.so.11:
    0x0e5e9c62 0x00 02 GCRYPT_1.2
private flags = 5000002: [Version5 EABI] [has entry point]

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .note.gnu.build-id 00000024  000000d4  000000d4  000000d4  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .hash         000006a0  000000f8  000000f8  000000f8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .gnu.hash     000003f4  00000798  00000798  00000798  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .dynsym       00000e10  00000b8c  00000b8c  00000b8c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .dynstr       00000c55  0000199c  0000199c  0000199c  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .gnu.version  000001c2  000025f2  000025f2  000025f2  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  6 .gnu.version_r 00000070  000027b4  000027b4  000027b4  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  7 .rel.dyn      00000430  00002824  00002824  00002824  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  8 .rel.plt      00000548  00002c54  00002c54  00002c54  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  9 .init         0000000c  0000319c  0000319c  0000319c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 10 .plt          00000800  000031a8  000031a8  000031a8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 11 .text         0000d074  000039a8  000039a8  000039a8  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 12 .fini         00000008  00010a1c  00010a1c  00010a1c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 13 .rodata       00003e78  00010a28  00010a28  00010a28  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 14 .eh_frame     00000004  000148a0  000148a0  000148a0  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 15 .init_array   00000004  0001d000  0001d000  00015000  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 16 .fini_array   00000004  0001d004  0001d004  00015004  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 17 .jcr          00000004  0001d008  0001d008  00015008  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 18 .data.rel.ro  000003dc  0001d00c  0001d00c  0001500c  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 19 .dynamic      00000108  0001d3e8  0001d3e8  000153e8  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 20 .got          000002d8  0001d4f0  0001d4f0  000154f0  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 21 .data         00000014  0001d7c8  0001d7c8  000157c8  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 22 .bss          00000020  0001d7dc  0001d7dc  000157dc  2**2
                  ALLOC
 23 .ARM.attributes 00000031  00000000  00000000  000157dc  2**0
                  CONTENTS, READONLY
SYMBOL TABLE:
no symbols
@peters

Yes, i'm having the same issues on the latest raspbmc version. Tried both the 10.x and 12.x with latest source from master.

@patrickod

Another +1 for this issue. Installed raspbmc today and tried install spotimc with the instructions from their forums. Having the same issue loading the libspotify.so file even though it both exists and is the required ARM version.

@mazkolain
Owner

Just to be sure, all of you are using the armv6 version of libspotify, right?

@mspiegle
@Firesphere

I'm having the same issues with libspotify. I don't think this bug is related to spotimc, more to libspotify.

And yes, checked multiple times if I had the arm version :)

@miceiken

+1 for this issue.
Really want this to work.

@mazkolain
Owner

I think I've found the origin of the issue.

Raspbmc switched recently to Raspbian (correct me if I'm wrong), and Raspbian is built with hardware floating point support (armhf). It seems that libspotify won't run on armhf, regardless the correct arm version is chosen (which should be armv6). This explains why libspotify fails loading even on commandline python, outside XBMC.

I've found the explanation for this on a wiki page of the mopidy project:
https://github.com/mopidy/mopidy/wiki/MopidyOnRaspberryPi#wiki-noraspbian

Quoting from the previous wiki page:

If the Spotify folks ever release builds of libspotify with armhf support, Mopidy should work on Raspbian.

In conclusion, this statement should also apply for Spotimc.

@mspiegle
@Firesphere

I thought it had something to do with HF, but couldn't find any proof yet.
Maybe the RPi can use the despotify library? Or is it incompatible?

I don't know about OpenElec, but I know XBian runs HF too.

@patrickod

@mazkolain if this is an issue introduced by Raspbmc changing to Raspbian do you know what older versions one could run to get this working in the meantime?

@mazkolain
Owner

@mspiegle: If i'm not wrong this is an architecture issue. AFAIK you can't run armel code on an armhf system. It's like mixing x86 with x86_64.

@Firesphere: Don't know if Despotify would be able to fill the gap on armhf. I think it's api compatible with the official one, but not sure to what extent. I would tend to pressure Spotify a little bit in to release armhf binaries, alongside armel ones.

@patrickod: Based on a news post on the Raspbmc site, it seems that the transition was made on RC4, so Spotimc should work with earlier releases.

@mspiegle
@mazkolain
Owner

It ran on past releases because Raspbmc was armel based. Since RC4 Raspbmc switched to Raspbian, which is armhf based.

@sraue

softfloat is not binary compatible with hardfloat, thats why it dont work OpenELEC/Raspbmc (since RC4). it is not arch related (armv6) instead fpu related (softfp/hardfp).

@atiti

Same here on the raspberry :( Anyone looked into despotify or libopenspotify? The later claims to be ABI compatible, but based on the git repo there hasn't been any activity in the last 3 years

@mazkolain
Owner

@sraue thanks for the explanation. "Arch issue" was definitely out of place.

@eklem

So, A: what's the best solution, and B: What's fixable from Spotimc point of view? I'm no programmer, but I can help with testing.

@atiti

A: best solution would be to convince spotify to compile libspotify with armhf, but since that probably won't happen, an alternate best solution is to change to an open source alternative such as despotify.
B: Implement support for despotify (I might take a crack at this :))

@mazkolain
Owner

Sadly there is no chance for Spotimc to provide a fix for this.

Agreeing with @atiti, I would first try to convince Spotify to release armhf binaries. If it does not happen I would go with despotify, but my fear is that it may take huge amounts of work to integrate Spotimc with it.

In the meantime, you could try with old Raspcbmc releases (pre-RC4 ones are compatible with libspotify).

@patrickod

With regards to earlier Raspbmc releases I haven't been able to find older versions still online. From my relatively brief search on Google I couldn't find mirrors with older releases still available. Any links in their previous release blog articles seem to have been taken offline.

@eklem

@patrickod Have you tested this torrent?

@patrickod

@eklem Nope I didn't find that on my searches. I'll give that a shot. Thanks a bunch!

@eklem

@patrickod Seems nobody is backing that torrent-file any more. But test the image in this forum-post

@dataolle

Please leave a comment on the spotify community forum in this thread to show spotify that this is important for you: http://community.spotify.com/t5/Spotify-Ideas/armhf-Spotify-library-for-DIY-projects/idi-p/140972

Dont forget to press the "kudos" button :-)

@polarsun00

I have modified the libspotify.so, so that it pretends to be armhf binary. It is possible because none of the exported libspotify functions use floating point arguments. Internally it still user armel instructions, but can be loaded by an armhf executable.
I have tried it with Spotify example apps and it seems to work fine on Raspberry Pi with armhf XBMC. I was able to login and fetch playlists using spshell example.

Here is the modified binary: https://dl.dropbox.com/u/60928807/libspotify.so

Spotimc is able to find and load the library and present a logon page, but crashes when I try to logon with my credentials. Here is the xbmc log output:

00:02:57 T:2740933648 NOTICE: -->Python Interpreter Initialized<--
00:02:58 T:2740933648 NOTICE: /home/pi/.xbmc/addons/skin.confluence/write_test.txt
00:02:58 T:2740933648 ERROR: /home/pi/.xbmc/addons/script.audio.spotimc/resources/libs/XbmcSkinUtils.egg/skinutils/fonts.py:138: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
00:02:59 T:2740933648 NOTICE: /home/pi/.xbmc/addons/skin.confluence/write_test.txt
00:02:59 T:2740933648 NOTICE: install include: /home/pi/.xbmc/addons/script.audio.spotimc/resources/skins/DefaultSkin/720p/includes.xml
00:03:09 T:3036279520 ERROR: ClearBlock: Trying to clear non existent block /home/pi/.xbmc/addons/script.audio.spotimc
00:03:09 T:3036279520 ERROR: Previous line repeats 1 times.
00:03:09 T:3036279520 WARNING: Cleanup: Having to cleanup texture button-focus.png
00:03:09 T:3036279520 WARNING: Cleanup: Having to cleanup texture button-nofocus.png
00:03:17 T:3036279520 ERROR: ClearBlock: Trying to clear non existent block /home/pi/.xbmc/addons/script.audio.spotimc
00:05:06 T:2740933648 NOTICE: libspotify log: 08:05:06.170 I [offline_authorizer.cpp:297] Unable to login offline: no such user

@atiti

Wow, great work dude!

@dataolle

ok, this works fine for me. Thanks alot!
Btw, How did you do the "pretending to be a ArmHF library"? Just interested to learn.

//K

@polarsun00

@dataolle
The format of ELF for ARM architecture is described here: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044e/IHI0044E_aaelf.pdf
and here:
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045d/IHI0045D_ABI_addenda.pdf

I added the following attributes to the "ARM.attributes section" of the ELF (section 4.3.6 "Build Attributes"):

Tag_ABI_HardFP_use: SP and DP
Tag_ABI_VFP_args: VFP registers

I'm wondering what build of spotimc is working for you. Can you please share your addon package with me?

@polarsun00

It looks like the crash in my case may be similar to this bug:
#82
Will try to upgrade XBMC to the latest build.

@faction918

Replacing the library fixed it. I'm using the found here: https://github.com/mazkolain/spotimc/wiki/Downloads (1.0-beta3) It is different than the one I got from the github .zip download just now, however.

Thanks for figuring this out, hope you get it working, @polarsun00

Happy ending to a good hour+ of dealing with this.

@polarsun00

Works fine now after upgrade to XBMC 12.0 RC3 and replacing the library!
@mazkolain Thanks for great work! The addon looks really nice!

@mazkolain
Owner

Many thanks @polarsun00 for figuring this out! I'll give it a try on a raspberry pi, and see how it performs.

Anyway, as @Kibje pointed out in the forums, I'll have to ask Spotify first if I'm allowed to release this modified binary.

@kib

@mazkolain I would be willing to release a modified version with my development ID. I can even host it from my own servers if needed. We can just add a disclaimer stating that it uses an unofficially modified version of the spotify library.
Let me know what you think of that option.

@polarsun00 I was going to test it this weekend on my Raspberry Pi but instead spent a lot of time rebuilding my living room after buying a new centre speaker - firstworldproblems.jpg :+1:

@mazkolain
Owner

@kibje: That's okay, but I would prefer doing some tests with the patched binary first (just to be sure). If tests are successful (and hopefully they are), would then ask Spotify. I believe that this process should hold an armhf compatible release more than a week or two.

@triode

@polarsun00 - thanks for finding this; I can confirm it seems to work for me to allow libspoitfy to be used on a hardfloat distribution for a different project.

I've currently overwritten two existing attributes with the new values as its easier to do this than expand the file. I'd be interested in your comments on this:

Replace "1E 02" with "1B 00" - replace the optimisation goals attribute (appears to be optional)
Replace "2C 01" with "1C 01" - replace the DIV_use tag as its only for v7A?

Can you comment on the validity of just replacing these attributes? It seems to work for me with just these 4 bytes changed... I use libspotify.10 for arm5te to get maximum device compatibility and changing these 4 bytes makes seems to make it run ok on a hardfloat Pi.

Did you actually contact spotify about this? I'm happy to do so if not.

@polarsun00

@triode - changing existing attributes may work too. Expanding the file is not that difficult as it seems. What you may need to do:

  • increase the size of .ARM.attributes section by 4 bytes in sections headers table
  • increase the length of the build attributes section inside .ARM.attributes (4.3.6 Build Attributes)
  • increase the size of the "aeabi” subsection in .ARM.attributes section
  • increase offsets of .comment and .shstrtab sectictions by 4 bytes, as they follow after the .ARM.attributes section
  • increase offset of the sections table by 4 bytes in the ELF header, as it located at the end of the file

You can use readelf tool to verify if the file has valid structure after modification.
I have not contacted Spotify, as I made the changes for my personal use, but @mazkolain may have asked them.

@pmiossec

Hi all!
It seems that there is a beta version of the spotify lib for armv6 hard float disponible on their web site :
https://developer.spotify.com/technologies/libspotify/

I have not tested but if it could help....

@kib

It looks like they implemented your fix @polarsun00 !

@triode

For the record - the response from Spotify to the question about patched libraries is that they would like us to use the released version as linked above.

@ogr3

I have tried libspotify.so.12.1.103 from https://developer.spotify.com/technologies/libspotify/ and it works fine on my Pi with spotimc.

@mazkolain
Owner

Hello,

Closing this issue, as the hard float arm lib is now included on the latest release:
http://azkotoki.org/downloads/

@mazkolain mazkolain closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.