-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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 --with-lto builds fail when CC=clang on Linux, requires gold linker #72202
Comments
The error message you will see when building may look something like: clang -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fprofile-instr-generate -flto Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o Python/dynamic_annotations.o Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o Parser/printgrammar.o Parser/parsetok_pgen.o Parser/pgenmain.o -lpthread -ldl -lutil -o Parser/pgen as seen on ubuntu 16.04. Related to https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-snapshot/+bug/1254970 which suggests we also need -B/usr/lib/gold-ld in our LDFLAGS and/or CFLAGS when using clang on Linux with LTO. testing with it set in both still runs into errors; someone with clang LTO experience will need to untangle this. (is this related to why --with-lto doesn't work on MacOS as well?) |
Looks like a package dependency issue: installing |
I confirm that it's currently broken. Test on Fedora 28, clang version 6.0.1 (tags/RELEASE_601/final): $ ./configure --with-pydebug CC=clang --with-lto && make
(...)
checking for x64 gcc inline assembler... yes
checking whether float word ordering is bigendian... unknown
configure: error: Unknown float word ordering. You need to manually preset |
The issue has been fixed in Python 3.7 and master. If someone is volunteer to backport it to older version, please go ahead :-) But according to serge-sans-paille, it's non trivial and I'm not sure that it's worth it. Sorry, usually we focus on the master branch for "new features". So I close the issue. Thanks serge-sans-paille for this nice enhancement! |
The issue with the 3.6 branch is https://bugs.python.org/issue31625 which hasn't been backported to 3.6. Would it make sense to backport it? I have the backports ready locally but not sure if pushing https://bugs.python.org/issue31625 to 3.6 is desirable. |
Probably that's fine, but can bpo-31625 be easily worked around by, e.g., using make AR=llvm-ar RANLIB=llvm-ranlib? |
The workaround indeed works. |
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: