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
--enable-optimizations does not work with --enable-shared #73898
Comments
I want to altinstall 3.6 with LTO+PGO optimizations, so: ./configure --enable-shared --enable-optimizations --prefix=$HOME/.local LDFLAGS=-Wl,-rpath=$HOME/.local/lib (./configure arguments refer to issue bpo-27685) But I get in trouble when running compiled python to generate posix vars: ... gcc information below: Using built-in specs. |
For the record, --enable-shared generally produces slower builds than by default. The slowdown depends on the platform, but it's noticeable on x86-64 and much more on ARM. |
I have the same error when building 3.6.4, however not exactly with the same options. Some context first: I'm careful to start from a freshly untarred source tree. This configuration builds a working installation: However, I get the reported error when CFLAGS="-mtune=core-avx2 -march=core-avx2" is added. This set of options works fine without --enable-shared, i.e. this is what I am using for static builds: Note, with the following configuration (-mtune without -march), compilation just blocks on Objects/memoryobject.c (ie, gcc never completes): |
I was having the same problem, and I just found out what it was: Because of -Wl,-rpath=..., this path gets baked into the binary, and LD_LIBRARY_PATH is ignored. So if you have a previous build lying around there, it will mess up the build. |
The error was because of setting rpath, otherwise main branch can be compiled successfully. |
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: