Closed dslm4515 closed 5 months ago
Fixed issue by adding --with-build-python=python3.12
to configure
command
Build now completes, but now the install locks up. Last command executed:
LD_LIBRARY_PATH=/sources/Python-3.12.2 \
_PYTHON_PROJECT_BASE=/sources/Python-3.12.2 \
_PYTHON_HOST_PLATFORM= PYTHONPATH=/sources/Python-3.12.2/build/lib.-3.12:./Lib \
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__linux_i386-linux-musl python3.12 -m ensurepip \
$ensurepip --root=/BUILD/ ;
Perhaps, build python3 without pip [and build it later]? ... yes install now completes
If building later, build python-setuptools before pip
Building setuptools to install pip. Install stalls at:
Copying setuptools.egg-info to /BUILD/usr/lib/python3.12/site-packages/setuptools-69.2.0-py3.12.egg-info
running install_script
Looks like the stage 2 (system) python cannot run scripts. Lock up is just like before, because 1 CPU thread locks at 100% use, but nothing is done
I did notice that while Python3 was compiled, it was using llvm-as
instead of elftoolchain's as
.
Perhaps, rebuild python3 to use elftoolchain instead of LLVM's binary tools? i.e. add AR=ar AS=as RANLIB=ranlib STRIP=strip
to configure.
I know during building under chroot, stripping with llvm-strip caused stripped binaries to segfault... makes me wonder if all of LLVM base should be rebuilt, and not just clang...
No. Python build still stalls even if elftoolchain is used
Rebuild python with llvmtools' clang fixes issue!
Old clang config for llvmtools will cause the ssl module to not build. Remove the clang config:
mv /llvmtools/bin/${TUPLE}.cfg /tmp/${TUPLE}.cfg.llvmtools
llvmtools' clang will need a new config so that installed headers are found:
cat > /llvmtools/bin/${TUPLE}.cfg << "EOF"
-I/usr/include
-L/usr/lib
EOF
Now rebuild python:
$ CC=/llvmtools/bin/clang CXX=/llvmtools/bin/clang++ \
./configure --prefix=/usr \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--with-ensurepip=yes \
--enable-ipv6 \
--enable-loadable-sqlite-extensions \
--with-computed-gotos \
--enable-ipv6 \
--with-openssl=/opt/openssl \
--with-openssl-rpath=/opt/openssl/lib
So far all python modules built after python build fine.
Keeping this open to see if there are issues when using BMLFS after this build
Created the workaround by using stage 1 clang via commit 8116309b4d4bbd5fbe4a52c7db4d9648d0eae124
I built a few python modules with this stage 2 python (build by stage1 clang) with no problems.
Closing.
Cross-compiling i686 on a AMD64 host.
Under chroot, python3 build configures fine but locks up. A CPU core is stuck at 100% but no activity. Last command executed by the build:
ctl-c
does nothing under chroot. Only way to 'break' the lockup is to terminate the python process from the host:When the python process terminates, the chroot session throws an message [but chroot still functional]:
Perhaps, there are tests that need to be skipped?
Per Chimera Linux,