build frozenlist failed on openwrt mipsel libctf.so.0: qsort_r: symbol not found
rufengsuixing opened this issue · comments
Long story short
build frozenlist-1.1.1 or frozenlist-1.3.3 failed
root@NewifiD1:~/frozenlist-1.1.1# python setup.py install
- Accellerated build *
/usr/lib/python3.10/site-packages/setuptools/config/setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
running install
/usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
running bdist_egg
running egg_info
writing frozenlist.egg-info/PKG-INFO
writing dependency_links to frozenlist.egg-info/dependency_links.txt
writing top-level names to frozenlist.egg-info/top_level.txt
reading manifest file 'frozenlist.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.pyd' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
warning: no previously-included files matching '.lib' found anywhere in distribution
warning: no previously-included files matching '.dll' found anywhere in distribution
warning: no previously-included files matching '.a' found anywhere in distribution
warning: no previously-included files matching '.obj' found anywhere in distribution
warning: no previously-included files found matching 'frozenlist/.html'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE.txt'
writing manifest file 'frozenlist.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-mips/egg
running install_lib
running build_py
creating build
creating build/lib.linux-mips-3.10
creating build/lib.linux-mips-3.10/frozenlist
copying frozenlist/init.py -> build/lib.linux-mips-3.10/frozenlist
copying frozenlist/init.pyi -> build/lib.linux-mips-3.10/frozenlist
copying frozenlist/_frozenlist.c -> build/lib.linux-mips-3.10/frozenlist
copying frozenlist/_frozenlist.pyx -> build/lib.linux-mips-3.10/frozenlist
copying frozenlist/py.typed -> build/lib.linux-mips-3.10/frozenlist
running build_ext
building 'frozenlist._frozenlist' extension
creating build/temp.linux-mips-3.10
creating build/temp.linux-mips-3.10/frozenlist
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mipsel_24kc_musl/Python-3.10.7=Python-3.10.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mipsel_24kc_musl/Python-3.10.7=Python-3.10.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-mipsel_24kc_musl/Python-3.10.7=Python-3.10.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mipsel_24kc_gcc-12.2.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mipsel_24kc_gcc-12.2.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-mipsel_24kc_gcc-12.2.0_musl/include -fPIC -I/usr/include/python3.10 -c frozenlist/_frozenlist.c -o build/temp.linux-mips-3.10/frozenlist/_frozenlist.o
gcc -shared -L/builder/shared-workdir/build/sdk/staging_dir/toolchain-mipsel_24kc_gcc-12.2.0_musl/usr/lib -L/builder/shared-workdir/build/sdk/staging_dir/toolchain-mipsel_24kc_gcc-12.2.0_musl/lib -znow -zrelro -L/builder/shared-workdir/build/sdk/build_dir/target-mipsel_24kc_musl/Python-3.10.7 -L/builder/shared-workdir/build/sdk/staging_dir/target-mipsel_24kc_musl/usr/lib -L/builder/shared-workdir/build/sdk/staging_dir/target-mipsel_24kc_musl/lib -L/builder/shared-workdir/build/sdk/staging_dir/toolchain-mipsel_24kc_gcc-12.2.0_musl/usr/lib -L/builder/shared-workdir/build/sdk/staging_dir/toolchain-mipsel_24kc_gcc-12.2.0_musl/lib -znow -zrelro -L/builder/shared-workdir/build/sdk/build_dir/target-mipsel_24kc_musl/Python-3.10.7 -L/builder/shared-workdir/build/sdk/staging_dir/target-mipsel_24kc_musl/usr/lib -L/builder/shared-workdir/build/sdk/staging_dir/target-mipsel_24kc_musl/lib build/temp.linux-mips-3.10/frozenlist/_frozenlist.o -L/usr/lib -o build/lib.linux-mips-3.10/frozenlist/_frozenlist.cpython-310.so
Error relocating /usr/lib/libctf.so.0: qsort_r: symbol not found
collect2: error: ld returned 127 exit status
error: command '/usr/bin/gcc' failed with exit code 1
root@NewifiD1:~/frozenlist-1.1.1# /usr/lib/libctf.so.0: qsort_r: symbol not found
Expected behaviour
build success
Actual behaviour
Error relocating /usr/lib/libctf.so.0: qsort_r: symbol not found
collect2: error: ld returned 127 exit status
error: command '/usr/bin/gcc' failed with exit code 1
Steps to reproduce
Your environment
openwrt mipsel
libctf - 2.38-1
gcc - 8.4.0-1
root@NewifiD1:~/frozenlist-1.1.1# uname -a
Linux NewifiD1 5.4.188 #0 SMP Sun Apr 3 16:01:44 2022 mips GNU/Linux
This is an issue with your OpenWRT environment, not with frozenlist. I found a similar report against Alpine Linux musl:
you have downgraded musl, which is not supported.
more specifically, the
qsort_r
symbol was added between 1.2.2 and 1.2.3; we had this backported earlier anyway, but adding new symbols is backwards-compatible. however, things built against new musl-dev now 'link' to that symbol (all the exported symbols, really), and now try to load it at runtime. so, since you downgraded to 1.2.2 which doesn't have it...just your usual symbol mismatch :)
Note that the error happens while gcc is being run. This is really not anything we can fix, sorry.