Skip to content

GH-140454: Remove pyconfig.h from Makefile JIT_DEPS - #140491

Closed
savannahostrowski wants to merge 1 commit into
python:mainfrom
savannahostrowski:test-jit-make-install
Closed

GH-140454: Remove pyconfig.h from Makefile JIT_DEPS#140491
savannahostrowski wants to merge 1 commit into
python:mainfrom
savannahostrowski:test-jit-make-install

Conversation

@savannahostrowski

@savannahostrowskisavannahostrowski commented Oct 23, 2025

Copy link
Copy Markdown
Member

@savannahostrowski

savannahostrowski commented Oct 23, 2025

Copy link
Copy Markdown
MemberAuthor

Would be good to get a Makefile expert's eyes on this 🙏

The results of my spelunking efforts: #140454 (comment)

@savannahostrowskisavannahostrowski changed the title GH-140454: Remove pyconfig.h from JIT_DEPSGH-140454: Remove pyconfig.h from Makefile JIT_DEPSOct 23, 2025
@hroncok

Copy link
Copy Markdown
Contributor

Thanks. I tested this, and it does not seem to solve the problem for me.

[cpython (test-jit-make-install)]$ export LDFLAGS=' '
[cpython (test-jit-make-install)]$ export LDFLAGS_NODIST='-Wl,--as-needed -g '
[cpython (test-jit-make-install)]$ git clean -fdx; ./configure --config-cache --without-ensurepip --enable-experimental-jit=yes-off && make -j...

Different shell:

[cpython (test-jit-make-install)]$ export LDFLAGS='-Wl,--as-needed -g '
[cpython (test-jit-make-install)]$ cp -a build/lib.linux-x86_64-3.15/_sysconfigdata__linux_x86_64-linux-gnu.py make._sysconfigdata__linux_x86_64-linux-gnu.py [cpython (test-jit-make-install %)]$ rm /tmp/python/ -rf; make install DESTDIR=/tmp/python [cpython (test-jit-make-install %)]$ diff -u make._sysconfigdata__linux_x86_64-linux-gnu.py build/lib.linux-x86_64-3.15/_sysconfigdata__linux_x86_64-linux-gnu.py
--- make._sysconfigdata__linux_x86_64-linux-gnu.py	2025-10-23 11:25:44.805777209 +0200+++ build/lib.linux-x86_64-3.15/_sysconfigdata__linux_x86_64-linux-gnu.py	2025-10-23 11:25:59.599337788 +0200@@ -19,7 +19,7 @@
'BINDIR': '/usr/local/bin',
'BINLIBDEST': '/usr/local/lib/python3.15',
'BLDLIBRARY': 'libpython3.15.a',
- 'BLDSHARED': 'gcc -shared',+ 'BLDSHARED': 'gcc -shared -Wl,--as-needed -g',
'BOOTSTRAP_HEADERS': '\\',
'BUILDEXE': '',
'BUILDPYTHON': 'python',
@@ -647,11 +647,12 @@
'IO_OBJS': '\\',
'IPHONEOS_DEPLOYMENT_TARGET': '',
'JIT_DEPS': '\\',
- 'LDCXXSHARED': 'g++ -shared',- 'LDFLAGS': '',+ 'LDCXXSHARED': 'g++ -shared -Wl,--as-needed -g',+ 'LDFLAGS': '-Wl,--as-needed -g',+ 'LDFLAGS_NODIST': '',
'LDLIBRARY': 'libpython3.15.a',
'LDLIBRARYDIR': '',
- 'LDSHARED': 'gcc -shared',+ 'LDSHARED': 'gcc -shared -Wl,--as-needed -g',
'LDVERSION': '3.15',
'LIBC': '',
'LIBDEST': '/usr/local/lib/python3.15',
@@ -987,8 +988,8 @@
'PY_CPPFLAGS': '-I. -I./Include',
'PY_ENABLE_SHARED': 0,
'PY_HAVE_PERF_TRAMPOLINE': 1,
- 'PY_LDFLAGS': '',- 'PY_LDFLAGS_NODIST': '-Wl,--as-needed -g -Wl,--as-needed -g',+ 'PY_LDFLAGS': '-Wl,--as-needed -g',+ 'PY_LDFLAGS_NODIST': '-Wl,--as-needed -g',
'PY_LDFLAGS_NOLTO': '-Wl,--as-needed -g',
'PY_SQLITE_ENABLE_LOAD_EXTENSION': 0,
'PY_SQLITE_HAVE_SERIALIZE': 0,

@savannahostrowski

Copy link
Copy Markdown
MemberAuthor

Wow, okay. I cannot reproduce this either locally or in a Fedora Devcontainer with the steps you've outlined above. I'll close this PR for now, and we can take the discussion back into the issue.

@savannahostrowski
savannahostrowski deleted the test-jit-make-install branch December 4, 2025 22:58
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@savannahostrowski@hroncok