frida-python: use system Python dependency to fix pyconfig.h pathing#270
Open
james-coder wants to merge 1 commit intofrida:mainfrom
Open
frida-python: use system Python dependency to fix pyconfig.h pathing#270james-coder wants to merge 1 commit intofrida:mainfrom
james-coder wants to merge 1 commit intofrida:mainfrom
Conversation
Meson\'s python.dependency() defaulted to pkg-config in this environment. With Frida\'s bundled pkg-config plus PKG_CONFIG_LIBDIR, python-3.10.pc cflags were rewritten to /usr/lib/include/... instead of /usr/include/..., causing extension.c to fail with pyconfig.h not found. Switch python dependency discovery to method='system' so include and link flags come from Python\'s system metadata instead of pkg-config. This avoids the pkg-config relocation quirk while preserving normal frida-python build behavior. Validation: - ./configure (default, frida_python enabled) succeeds - make succeeds, including: [348/349] Compiling ... frida/_frida/extension.c.o [349/349] Linking ... frida/_frida/_frida.abi3.so
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
method: 'system'Problem
frida-pythonbuild failed while compiling_fridawith:The selected pkg-config path produced invalid include flags (
/usr/lib/include/...).Fix
Use
python.dependency(method: 'system')so Meson derives include/link information from the system Python installation instead of pkg-config.Validation
./configuresucceeds withfrida_pythonenabledmakesucceeds end-to-end_fridaextension compiles and links:[348/349] ... extension.c.o[349/349] ... _frida.abi3.so