tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: pkgsrc/math/py-scipy
Taylor R Campbell <riastradh%NetBSD.org@localhost> writes:
>> Date: Wed, 08 Jan 2025 19:21:37 +0900
>> From: Ryo ONODERA <ryo%tetera.org@localhost>
>>
>> I have exactly same failures on NetBSD/amd64 10.99.12 of today.
>> [...]
>> > In file included from ../scipy/special/stirling2.h:9,
>> > from scipy/special/_ufuncs_cxx_defs.h:112,
>> > from scipy/special/_ufuncs_cxx.so.p/_ufuncs_cxx.cpp:1246:
>> > ../scipy/special/xsf/evalpoly.h:26:29: error: expected unqualified-id before '_Complex'
>> > 26 | XSF_HOST_DEVICE inline std::complex<double> cevalpoly(const double *coeffs, int degree, std::complex<double> z) {
>> > | ^~~~~~~
>
> So it looks like something is picking up the definition
>
> #define complex _Complex
>
> from <complex.h>, and possibly inconsistently. But why is it
> happening only with base gcc and not with pkgsrc gcc?
>
> This looks like it's probably a deeper toolchain problem in NetBSD,
> not a newer gcc version requirement of scipy.
I've been looking at this, and Patrick Welche found the issue.
scipy was, in a C++ program, including <complex.h>. This is a C header,
and such an inclusion is wrong.
Perhaps, in newer gcc versions, the way complex.h is implemented has
been modified so that such incorrect usage does not lead to problems.
I just committed a patch (based on Patrick's patch) that uses <complex>
instead of <complex.h> in C++ mode, and that resolves the problem on
NetBSD 10 amd64 with gcc 10.
Home |
Main Index |
Thread Index |
Old Index