New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local build testing broken on Fedora 35 by #21154. #21529
Comments
@hoodmane Thoughts? |
Does this reproduce in some docker image? If you have a reproduction I can look into it. |
I'm just doing |
Okay, I will try running that and see if it also happens on my local machine (Ubuntu 20.04 LTS). I guess so far there is no reason to think the problem is Fedora-specific. |
More info:
Changing the optimization level to |
I get some errors in Details
|
Pytest 7.1.2 also has the problem. |
I am using pytest v6.2.5 |
What compiler are you using? |
I believe @seberg also runs Fedora and he hasn't reported any problems. I suppose it could be hardware dependent, but that would be strange. |
Info about my Python and compiler: DetailsPython 3.9.5 (default, Nov 23 2021, 15:27:38)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> sysconfig.get_config_var("CC")
'x86_64-linux-gnu-gcc -pthread' $ x86_64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=x86_64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) |
Well if we can find a docker image with Fedora 35 + Python, it would be great to check if it reproduces in that. |
Out of curiosity, did you change any of the strings used to detect the
|
I don't think I changed |
For some reason I'm suspicious of |
OK, I found the source of the problem, the tested value
to from python float (double):
The latter is what is being checked and found wanting. |
That is what is going on, but I don't know why it happens. |
Huh. Well these two things specify numbers that are not equal: |
I think we had a similar problem that might be solved with It might be that pytest changed how it shows/deals with warnings, and previously it was just ignored because it was already triggered during test import. (I mainly use debian for long time, so I would not have noticed fedora changes.) |
It is the string conversion that fails. If I install the broken version and import
Which is not correct. That is why I am suspecting the changes respecting "strtold_l". Your division workaround works
That doesn't help with the broken string conversion, though. ISTR that we have our own conversion routine for long doubles. |
And the problem is that Working version, v1.22.3:
Failing version
|
I suspect the other moved functions have suffered a similar fate. |
For the record, on my system on 3f9fada: $ grep -r HAVE_STRTOLD_L build
build/src.linux-x86_64-3.9/numpy/core/include/numpy/config.h:#define HAVE_STRTOLD_L 1 |
I get
Try pulling main from upstream and running |
Yeah, I still see $ git checkout main
$ git pull upstream main
$ git clean -xdfq
$ python3.10 runtests.py -b
$ grep -r HAVE_STRTOLD_L build
build/src.linux-x86_64-3.10/numpy/core/include/numpy/config.h:#define HAVE_STRTOLD_L 1 |
The problem is probably compiler related:
|
|
@charris it sounds like we still need to add that warning ignore prgama to ensure we robustify against this issue? A similar thing was observed in another PR/issue and I suspect it was for the same reason (but on a different platform). |
GCC 11 fails the configuration test for detecting `strtold_l` when the `-Wall` flag is present because `-Werror=nonnull` is activated. The fix is to add a pragma to `numpy/core/feature_detection_locale.h` to ignore that error. Closes numpy#21529.
See #21534. Note that this is only for GCC. |
GCC 11 fails the configuration test for detecting `strtold_l` when the `-Wall` flag is present because `-Werror=nonnull` is activated. The fix is to add a pragma to `numpy/core/feature_detection_locale.h` to ignore that error. Closes numpy#21529.
Testing fails locally when checking
long double
withThere are three problems I can see:
numpy/core/getlimits.py
line 346).EDIT: Ignoring the warning leads to actual errrors:
EDIT2: gcc (GCC) 11.3.1 20220421 (Red Hat 11.3.1-2)
The text was updated successfully, but these errors were encountered: