philippe44 / SpotConnect

Turn any UPnP or AirPlay player into a Spotify Connect device
MIT License
78 stars 3 forks source link

GLIBCXX Error on Raspberry Pi OS #8

Closed nano9g closed 1 year ago

nano9g commented 1 year ago

I’m excited to try SpotConnect, but I’m having difficulty getting it up and running. When I try to run the aarch64 binary, I get this error:

./spotraop-linux-aarch64: /lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./spotraop-linux-aarch64)


Here’s my OS information:

$ uname -a
Linux [host] 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian

Any ideas on resolving this error?

philippe44 commented 1 year ago

You can try the -static version for now

nano9g commented 1 year ago

Unfortunately I get the same error.

./spotraop-linux-aarch64-static: /lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./spotraop-linux-aarch64-static)


I also tried building from source, but I'm getting a bunch of "undefined reference" errors from ld that I haven't been able to resolve (I'm assuming the warnings can be ignored):

~/SpotConnect/spotraop $ ./build.sh aarch64-linux-gnu-gcc
[ 35%] Built target bell
[ 71%] Built target cspot
[ 72%] Linking CXX executable spotraop-linux-aarch64
[ 73%] Linking CXX executable spotraop-linux-aarch64-static
/usr/bin/ld: ../../../spotraop/libopenssl/targets/linux/aarch64/libcrypto.a(dso_dlfcn.o): in function `dlfcn_load':
dso_dlfcn.c:(.text+0x114): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cspot/bell/libbell.a(civetweb.c.o): in function `mg_start2':
civetweb.c:(.text.mg_start2+0x4ac): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: ../../../spotraop/libopenssl/targets/linux/aarch64/libcrypto.a(b_addr.o): in function `BIO_lookup_ex':
b_addr.c:(.text+0x1100): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: CMakeFiles/spotraop-linux-aarch64-static.dir/http-fetcher/src/http_fetcher.c.o: in function `http_fetch':
http_fetcher.c:(.text.http_fetch+0x364): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(psy.o): in function `setup_tone_curves':
psy.c:(.text+0x1064): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x1090): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x11d0): undefined reference to `__exp_finite'
/usr/bin/ld: psy.c:(.text+0x11e0): undefined reference to `__exp_finite'
/usr/bin/ld: psy.c:(.text+0x12dc): undefined reference to `__exp_finite'
/usr/bin/ld: psy.c:(.text+0x12ec): undefined reference to `__exp_finite'
/usr/bin/ld: psy.c:(.text+0x13a8): undefined reference to `__exp_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(psy.o):psy.c:(.text+0x1544): more undefined references to `__exp_finite' follow
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(psy.o): in function `_vp_psy_init':
psy.c:(.text+0x2148): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x2188): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x21cc): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x22b0): undefined reference to `__exp_finite'
/usr/bin/ld: psy.c:(.text+0x25c0): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x2684): undefined reference to `__log_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(sharedbook.o): in function `_float32_pack':
sharedbook.c:(.text+0x6c): undefined reference to `__log_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(sharedbook.o): in function `_book_maptype1_quantvals':
sharedbook.c:(.text+0x358): undefined reference to `__pow_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(mdct.o): in function `mdct_init':
mdct.c:(.text+0x14d0): undefined reference to `__log_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(lsp.o): in function `vorbis_lsp_to_curve':
lsp.c:(.text+0x628): undefined reference to `__exp_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(lsp.o): in function `vorbis_lpc_to_lsp':
lsp.c:(.text+0xda4): undefined reference to `__acosf_finite'
/usr/bin/ld: lsp.c:(.text+0xdd4): undefined reference to `__acosf_finite'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/spotraop-linux-aarch64.dir/build.make:264: spotraop-linux-aarch64] Error 1
make[1]: *** [CMakeFiles/Makefile2:187: CMakeFiles/spotraop-linux-aarch64.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(psy.o): in function `setup_tone_curves':
psy.c:(.text+0x1064): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x1090): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x11d0): undefined reference to `__exp_finite'
/usr/bin/ld: psy.c:(.text+0x11e0): undefined reference to `__exp_finite'
/usr/bin/ld: psy.c:(.text+0x12dc): undefined reference to `__exp_finite'
/usr/bin/ld: psy.c:(.text+0x12ec): undefined reference to `__exp_finite'
/usr/bin/ld: psy.c:(.text+0x13a8): undefined reference to `__exp_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(psy.o):psy.c:(.text+0x1544): more undefined references to `__exp_finite' follow
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(psy.o): in function `_vp_psy_init':
psy.c:(.text+0x2148): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x2188): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x21cc): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x22b0): undefined reference to `__exp_finite'
/usr/bin/ld: psy.c:(.text+0x25c0): undefined reference to `__log_finite'
/usr/bin/ld: psy.c:(.text+0x2684): undefined reference to `__log_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(sharedbook.o): in function `_float32_pack':
sharedbook.c:(.text+0x6c): undefined reference to `__log_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(sharedbook.o): in function `_book_maptype1_quantvals':
sharedbook.c:(.text+0x358): undefined reference to `__pow_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(mdct.o): in function `mdct_init':
mdct.c:(.text+0x14d0): undefined reference to `__log_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(lsp.o): in function `vorbis_lsp_to_curve':
lsp.c:(.text+0x628): undefined reference to `__exp_finite'
/usr/bin/ld: ~/SpotConnect/common/libcodecs/targets/linux/aarch64/libvorbis.a(lsp.o): in function `vorbis_lpc_to_lsp':
lsp.c:(.text+0xda4): undefined reference to `__acosf_finite'
/usr/bin/ld: lsp.c:(.text+0xdd4): undefined reference to `__acosf_finite'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/spotraop-linux-aarch64-static.dir/build.make:265: spotraop-linux-aarch64-static] Error 1
make[1]: *** [CMakeFiles/Makefile2:159: CMakeFiles/spotraop-linux-aarch64-static.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

I've tried adding -fno-builtin to CXFLAGS, but either I didn't do it right or it just didn't help, because I got the same error after a clean build.

philippe44 commented 1 year ago

Then have a look at my cross-compiler adventure here https://github.com/philippe44/cross-compiling and see toward the end the section on GLIBC and GLIBCXX. I have also various libs included.

philippe44 commented 1 year ago

Oh, but before are you sure to use the version 0.1.1? There was an issue before that with static build not being truly statics

nano9g commented 1 year ago

That worked! I had overlooked the zip file in the repository and downloaded from Releases instead, which is only 0.1.0.

It might help others if:

  1. The directions in the readme were updated to reflect using the zip file instead of trying to go to the bin directory, which no longer has the executables, and
  2. Releases was updated :)

Thanks so much for helping me get this sorted!