Skip to content

lib-dynload not passed by cross compiler #107283

Open
@nephaste

Description

@nephaste

Bug report

Cross compiling python 3.11.4 on a ubuntu 22.04 (libc 2.29) to be ported on a Linux libc 2.19
while all binaries are well cross compiled for new environment, the
/lib/python3.11/lib-dynload/math.cpython-311-x86_64-linux-gnu.so is not passing in cross compiler and stay for 2.29

seems happen for all libs in this directory

Your environment

Ubuntu 22.04 x64 (libc 2.29) to target a Qnap NAS in libc 2.19

script used for cross-compilation (tried different combination)

Where ${HOST} is toolchain , and ${PREFIX} destination directory

export CXX=${HOST}-g++   
export CC=${HOST}-gcc

export PATH=${PREFIX}/bin:$PATH

LIBS="-lz -liconv -lncursesw -ltinfow -lrt -lm -lc -lpthread" \
CXX=${HOST}-g++                 \
LD=${HOST}-ld                   \
AS=${HOST}-as                   \
AR=${HOST}-ar                   \
CC=${HOST}-gcc \
CPP=${HOST}-cpp \
PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"  \
CFLAGS="-O2 -fPIC  -I${PREFIX}/include -I${PREFIX}/include/ncursesw -I${PREFIX}/include/libxml2" \
CPPFLAGS="-O2 -fPIC   -I${PREFIX}/include -I${PREFIX}/include/ncursesw -I${PREFIX}/include/libxml2"     \
LDFLAGS="-L${PREFIX}/lib  -Wl,-rpath,${PREFIX}/lib" \
./configure \
--prefix=${PREFIX} \
--host=${HOST} \
--build=${HOST}  \
--bindir=${PREFIX}/bin \
--sbindir=${PREFIX}/sbin \
--libexecdir=${PREFIX}/libexec \
--libdir=${PREFIX}/lib \
--datadir=${PREFIX}/share \
--datarootdir=${PREFIX}/share \
--sysconfdir=${PREFIX}/etc \
--sharedstatedir=${PREFIX}/com \
--localstatedir=${PREFIX}/var \
--includedir=${PREFIX}/include \
--oldincludedir=${PREFIX}/include \
--infodir=${PREFIX}/share/info \
--localedir=${PREFIX}/share/locale \
--with-system-expat  \
--with-pth \
--enable-shared \
--enable-ipv6 \
--with-ensurepip=install \
--with-system-ffi  \
--with-openssl=${PREFIX} \
--with-pkg-config=yes \
--with-libs="-lz -liconv -lncursesw -ltinfow -lrt -lm -lc -lpthread" \

result on the Qnap NAS

ImportError: /opt/Deluge/lib/libm.so.6: version `GLIBC_2.29' not found (required by /share/CACHEDEV1_DATA/.qpkg/Deluge/lib/python3.11/lib-dynload/math.cpython-311-x86_64-linux-gnu.so)
Traceback (most recent call last):
  File "/opt/Deluge/bin/deluge-web", line 5, in <module>
    from deluge.ui.web import start
  File "/opt/Deluge/lib/python3.11/site-packages/deluge/ui/web/__init__.py", line 1, in <module>
    from deluge.ui.web.web import Web
  File "/opt/Deluge/lib/python3.11/site-packages/deluge/ui/web/web.py", line 11, in <module>
    from twisted.internet.error import CannotListenError
  File "/opt/Deluge/lib/python3.11/site-packages/twisted/internet/error.py", line 9, in <module>
    import socket
  File "/opt/Deluge/lib/python3.11/socket.py", line 54, in <module>
    import os, sys, io, selectors
  File "/opt/Deluge/lib/python3.11/selectors.py", line 11, in <module>
    import math
ImportError: /opt/Deluge/lib/libm.so.6: version `GLIBC_2.29' not found (required by /opt/Deluge/lib/python3.11/lib-dynload/math.cpython-311-x86_64-linux-gnu.so)

image

thanks for your help, to cross compile correctly this modules, dont want export my toolchain on Ubuntu 14.04 to have same libc version

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions