Skip to content

Python: pkg-config metadata files are missing #153

Open
pmenzel opened this issue Apr 1, 2021 · 8 comments
Open

Python: pkg-config metadata files are missing #153

pmenzel opened this issue Apr 1, 2021 · 8 comments

Comments

@pmenzel
Copy link
Contributor

pmenzel commented Apr 1, 2021

MarIuX:

$ pkg-config --cflags python3
Package python3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3' found

$ PKG_CONFIG_PATH=/package/pkg/python-3.8.8-0/lib/pkgconfig pkg-config --cflags python3
-I/pkg/python-3.8.8-0/include/python3.8

Debian sid/unstable:

$ pkg-config --cflags python3
-I/usr/include/python3.9 -I/usr/include/x86_64-linux-gnu/python3.9
@pmenzel
Copy link
Contributor Author

pmenzel commented Apr 1, 2021

The default environment needs to be adapted somehow, so that Python development files are found out of the box.

$ . /pkg/python-3.8.8-0/profile
$ pkg-config --cflags python3
-I/pkg/python-3.8.8-0/include/python3.8

$ prun python3 pkg-config --cflags python3
-I/pkg/python-3.8.8-0/include/python3.8

@donald
Copy link
Contributor

donald commented Apr 1, 2021

I'm not not sure, if it wouldn't be a red herring to make that available by default.

If you rely on this pkg-config output during compile time (without explicitly using prun), would the output work on runtime (without using prun) ? Does it find the python runtime with --rpath or something?

What software is asking for these flags? Where would it be installed?

@pmenzel
Copy link
Contributor Author

pmenzel commented Apr 1, 2021

Building ONIE fails, as their toolchain (SDK) fails to build (crosstool-ng), as it can’t find the Python development files.

[INFO ]  =================================================================
[INFO ]  Installing cross-gdb
[EXTRA]    Configuring cross gdb
[EXTRA]    Building cross gdb
[ERROR]    configure: error: no usable python found at /usr/bin/python3
[ERROR]    make[2]: *** [Makefile:9199: configure-gdb] Error 1
[ERROR]    make[1]: *** [Makefile:851: all] Error 2
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing cross-gdb'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@376]
[ERROR]  >>        called from: do_gdb_backend[scripts/build/debug/300-gdb.sh@282]
[ERROR]  >>        called from: do_debug_gdb_build[scripts/build/debug/300-gdb.sh@59]
[ERROR]  >>        called from: do_debug[scripts/build/debug.sh@35]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@695]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      https://crosstool-ng.github.io/docs/known-issues/
[ERROR]  >>
[ERROR]  >>  If you feel this is a bug in crosstool-NG, report it at:
[ERROR]  >>      https://github.com/crosstool-ng/crosstool-ng/issues/
[ERROR]  >>
[ERROR]  >>  Make sure your report includes all the information pertinent to this issue.
[ERROR]  >>  Read the bug reporting guidelines here:
[ERROR]  >>      http://crosstool-ng.github.io/support/
[ERROR]
[ERROR]  (elapsed: 11:33.50)
[11:34] / make: *** [bin/ct-ng:261: build] Error 2

@pmenzel
Copy link
Contributor Author

pmenzel commented Apr 1, 2021

The paste is from building crosstool-ng directly with GDB selected.

@pmenzel
Copy link
Contributor Author

pmenzel commented Apr 1, 2021

With sourcing the profile.

$ . /pkg/python-3.8.8-0/profile
$ ./bin/ct-ng build
[INFO ]  Performing some trivial sanity checks
[ERROR]  Don't set LD_LIBRARY_PATH. It screws up the build.
[ERROR]   
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_Abort[scripts/functions@487]
[ERROR]  >>        called from: CT_TestAndAbort[scripts/functions@507]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@58]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      https://crosstool-ng.github.io/docs/known-issues/
[ERROR]  >>
[ERROR]  >>  If you feel this is a bug in crosstool-NG, report it at:
[ERROR]  >>      https://github.com/crosstool-ng/crosstool-ng/issues/
[ERROR]  >>
[ERROR]  >>  Make sure your report includes all the information pertinent to this issue.
[ERROR]  >>  Read the bug reporting guidelines here:
[ERROR]  >>      http://crosstool-ng.github.io/support/
[ERROR]   
[ERROR]  (elapsed: 26954507:38.31)
[00:00] / make: *** [bin/ct-ng:261: build] Error 1

@pmenzel
Copy link
Contributor Author

pmenzel commented Apr 1, 2021

(Updated comment.)

@donald
Copy link
Contributor

donald commented Apr 1, 2021

"Don't set LD_LIBRARY_PATH. It screws up the build."

Why?

@pmenzel
Copy link
Contributor Author

pmenzel commented Apr 1, 2021

No idea why.

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants