Skip to content

frida-python: use system Python dependency to fix pyconfig.h pathing#270

Open
james-coder wants to merge 1 commit intofrida:mainfrom
james-coder:pr/python-system-dependency
Open

frida-python: use system Python dependency to fix pyconfig.h pathing#270
james-coder wants to merge 1 commit intofrida:mainfrom
james-coder:pr/python-system-dependency

Conversation

@james-coder
Copy link

Summary

  • switch Python dependency discovery from default/auto to method: 'system'
  • avoid include path mangling observed when using bundled pkg-config in this environment

Problem

frida-python build failed while compiling _frida with:

fatal error: pyconfig.h: No such file or directory

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

  • ./configure succeeds with frida_python enabled
  • make succeeds end-to-end
  • _frida extension compiles and links:
    • [348/349] ... extension.c.o
    • [349/349] ... _frida.abi3.so

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant