-
-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
configure script cannot detect float word ordering on linux #89640
Comments
I am trying to compile Python 3.10.0 on a Red Hat linux system with intel C/C++ compilers. This is my configure command:
The failure comes as follows:
I saw bpo-38527 was fixed in 3.10. Perhaps fixing it on Solaris broke it on some other platforms? |
Python uses the AX_C_FLOAT_WORDS_BIGENDIAN macro from autoconf-archive to detect byte order of floats. You can find the code at https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html . Please attach your config.log file and the conftest.o output file of the follow command: $ cat > conftest.c << EOF
double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
EOF
$ icc -c conftest.c |
See attached my config log. When I tried to compile conftest.c with 'icc -c conftest.c', it produced 'conftest.o' without any errors. |
Please build conftest.o with compiler flags
and attach the file. |
I executed: $ icc -c -O3 -fPIC -fp-model strict -fp-model source -axCORE-AVX512,CORE-AVX2 -xAVX -ipo -prec-div -prec-sqrt conftest.c and conftest.o was built without errors. It has one symbol, as expected: $ nm conftest.o
U __must_be_linked_with_icc_or_xild
0000000000000000 D d |
Please upload and attach the .o file to this bug. I need to see the content of the file. |
conftest.o attached |
conftest.c attached |
Your conftest.o does not contain the magic string "seesnoon". Either ICC uses a different serialization format or your CFLAGS optimize the value away. Please run icc -c -o conftest_unoptimized.o conftest.c and upload "conftest_unoptimized.o". |
conftest_unoptimized.o uploaded |
One of your optimization flags breaks the AX_C_FLOAT_WORDS_BIGENDIAN macro. The optimized object file does not have seesnoon in its data section. $ objdump -x conftest.o conftest_unoptimized.o conftest.o: file format elf64-x86-64 Sections: RELOCATION RECORDS FOR [.data]: conftest_unoptimized.o: file format elf64-x86-64 Sections: $ readelf -x .data conftest.o conftest_unoptimized.o File: conftest.o Hex dump of section '.data': File: conftest_unoptimized.o Hex dump of section '.data': |
By enabling and disabling optimization flags one by one, I figured out it was '-ipo' (inter-procedural optimization) that was the problem. Without that flag, 'configure' is successful. However, now I have a 'make' error: ./Programs/_testembed.c(1774): error: "__builtin_types_compatible_p" is only allowed in C compilation aborted for ./Programs/_testembed.c (code 2) |
Closing as this is not a CPython issue but rather a compiler bug and icc is not supported as per PEP 11. |
Author of the AX_C_FLOAT_WORDS_BIGENDIAN macro here. I committed a permanent fix to this issue in |
Pinging @tiran; without the updated macro, float word ordering won't be detected if e.g. -flto is present in one's CFLAGS. |
There is a CI job that verifies generated files (autoconf-related and some others) match those found on ubuntu 22.04: cpython/.github/workflows/build.yml Line 121 in 681778c
As a result, CPython may need to wait for a new autoconf-archive Ubuntu package that includes the fix (autoconf-archive/autoconf-archive#279) |
Was this included in Autoconf 2.71, or must we upgrade to Autoconf 2.72? |
It's in autoconf-archive, which is a separate collection of autoconf macros, namespaced |
Ah, yes of course. Unless Ubuntu 22.04 upgrades autoconf-archive, we'd have to explicitly force |
It may take months or even years to get fixed autoconf-archive into a Ubuntu LTS version. How about vendoring the latest |
Although the license on my code permits this, I would really prefer you all take the force-to-newer-version approach. (If those are the only two options.) The copy-paste-rename approach severs the link between the codebases. People have done copy-paste-rename with this very same code before, and it ends up causing headaches for maintainers and myself. I still get emails from people about some out-of-date / hacked up version of this code (often they don't even know where the code came from). So, please, not the copy-paste-rename route? |
I agree, let's not take that route. Forcing the regen script to use the an updated version of autoconf-archive sounds like the best option so far. I'll see if I can find time for this the coming week. |
FTR, Ubuntu 24.04 ships with autoconf-archive 20220903. |
@damelang, ISTM there is no official autoconf-archive release containing this commit. Do you know when the next release is scheduled? |
I don't. I think it's an "as needed" kind of thing. I'll ping the owner to let him know that there is need. Will report back. |
Sorry for the bad example, I removed it
That seems inherited from Debian, which is also on 20220903 https://tracker.debian.org/pkg/autoconf-archive EDIT: found #115765 - maybe updated Debian/Ubuntu package will not be needed |
Yes, Donghee and I are working on a container (like we had until recently). This way, we can explicitly control the autoconf and autoconf-archive version. |
The owner (@peti) hasn't responded to my email from last week. Maybe he'll see this? |
python/cpython#89640 no revbump as Void's default build configuration is not affected
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: