Repository navigation
Open
Description
I used nix shell github:cachix/nixpkgs-python#'"3.5"' to succefully build python3.5. Unfortunately doing anything beyond starting the interpreter gives and error that the math module cannot be loaded. And searching for math.*\.so to directories up from where which python3.5 is located, only shows cmath and not math.
I reentered the shell adding --debug -L -v 2>&1 | tee /tmp/py35.log so I could actually inspect what configuring/compiling indicates:
building derivation '/nix/store/m92a6dc2266kkgg6vs1dn1lmpy3msl0h-python3-3.5.10.drv': woken up
python3> /build/Python-3.5.10/Modules/mathmodule.c:70:1: error: static declaration of 'sinpi' follows non-static declaration
python3> 70 | sinpi(double x)
python3> | ^~~~~
python3> In file included from /nix/store/0bxwvycymkb9jxjgn5n4aq0w5gic42cn-glibc-2.42-103-dev/include/features.h:524,
python3> from /nix/store/0bxwvycymkb9jxjgn5n4aq0w5gic42cn-glibc-2.42-103-dev/include/bits/libc-header-start.h:33,
python3> from /nix/store/0bxwvycymkb9jxjgn5n4aq0w5gic42cn-glibc-2.42-103-dev/include/limits.h:26,
python3> from /nix/store/0bchm5z0mbr7agdjg40yj778marg93rw-gcc-15.3.0/lib/gcc/x86_64-unknown-linux-gnu/15.3.0/include/limits.h:212,
python3> from /nix/store/0bchm5z0mbr7agdjg40yj778marg93rw-gcc-15.3.0/lib/gcc/x86_64-unknown-linux-gnu/15.3.0/include/syslimits.h:9,
python3> from /nix/store/0bchm5z0mbr7agdjg40yj778marg93rw-gcc-15.3.0/lib/gcc/x86_64-unknown-linux-gnu/15.3.0/include/limits.h:34,
python3> from ./Include/Python.h:11,
python3> from /build/Python-3.5.10/Modules/mathmodule.c:55:
python3> /nix/store/0bxwvycymkb9jxjgn5n4aq0w5gic42cn-glibc-2.42-103-dev/include/bits/mathcalls.h:85:1: note: previous declaration of 'sinpi' with type 'double(double)'
python3> 85 | __MATHCALL_VEC (sinpi,, (_Mdouble_ __x));
python3> | ^~~~~~~~~~~~~~
(It is rather bad the standard command doesn't display compile errors, cq overwrites them )
This is related to Python issue python/cpython#80287 caused by a change in libm
This can be resolved by renaming the four occurences of sinpi in Modules/mathmodule.c to m_sinpi
Metadata
Metadata
Assignees
Labels
No labels
Activity