Open he32 opened 1 year ago
Hi, I ran into the same problem as you. Any progress so far?
Hi, I ran into the same problem as you. Any progress so far?
Sorry, as I just posted to that thread, I ran out of energy trying to understand what else was being suggested as a fix for the problem.
Regards,
Same error on MacOS PowerPC:
/usr/bin/gcc-4.2 -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/ -DNPY_NO_DEPRECATED_API=0 -Ipandas/_libs/window -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c pandas/_libs/window/aggregations.cpp -o build/temp.macosx-10.6-ppc-cpython-311/pandas/_libs/window/aggregations.o -Wno-error=unreachable-code
pandas/_libs/window/aggregations.cpp: In function ‘void __pyx_f_6pandas_5_libs_6window_12aggregations_add_mean(__pyx_t_5numpy_float64_t, Py_ssize_t*, __pyx_t_5numpy_float64_t*, Py_ssize_t*, __pyx_t_5numpy_float64_t*, __pyx_t_5numpy_int64_t*, __pyx_t_5numpy_float64_t*)’:
pandas/_libs/window/aggregations.cpp:4800: error: ‘signbit’ was not declared in this scope
pandas/_libs/window/aggregations.cpp: In function ‘void __pyx_f_6pandas_5_libs_6window_12aggregations_remove_mean(__pyx_t_5numpy_float64_t, Py_ssize_t*, __pyx_t_5numpy_float64_t*, Py_ssize_t*, __pyx_t_5numpy_float64_t*)’:
pandas/_libs/window/aggregations.cpp:4967: error: ‘signbit’ was not declared in this scope
error: command '/usr/bin/gcc-4.2' failed with exit code 1
I have this problem on pandas 1.5.0, but not on 1.4.4. I tracked it down to this commit, from this pull request. This issue says that that pull request removed too much, and causes the signbit() problem, which is the problem we are seeing here.
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[x] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
This happens both on NetBSD/amd64 and NetBSD/powerpc, with pandas version 1.5.3.
Issue Description
See above for the build error.
The reason for this build failure on NetBSD is that even though
<math.h>
is included, the<complex>
C++ header is included later, and that includes<cmath>
which#undef
s the macros defined in<math.h>
, among themsignbit()
. So at this point, you have to use thestd::signbit
variant instead, and this has consequences for how those functions should be imported into theaggregations.pyx
file. This used to be OK in pandas version 1.3.5, but things have changed in 1.5.3 so that this no longer builds on NetBSD.I have a suggested change lined up which re-does the import of
signbit()
andsqrt()
to come from thestd::
namespace, but don't know if there is a particular reason the change between 1.3.5 and 1.5.3 was introduced.Expected Behavior
The build should succeed.
Installed Versions