Skip to content
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

Use python-config to find the Python link flags #295

Closed
Julien-Elie opened this issue Feb 11, 2024 · 0 comments
Closed

Use python-config to find the Python link flags #295

Julien-Elie opened this issue Feb 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working C: build Related to the build system P: medium Medium priority
Milestone

Comments

@Julien-Elie
Copy link
Contributor

Reported by Matthias Klose in the Debian bug tracker, INN fails to build with Python support on some hosts.

checking for Python.h... yes
checking for Py_Initialize... no
configure: error: in `/<<PKGBUILDDIR>>/build':
configure: error: unable to link with Python library

because of:

LOCALMODLIBS="-lm      -lm   -lz -lm -lm   -lexpat  -lexpat Modules/_hacl/libHacl_Hash_SHA2.a         -lz"
/usr/bin/ld: cannot find Modules/_hacl/libHacl_Hash_SHA2.a: No such file or directory

It appears that LOCALMODLIBS should not actually be used and breaks the build with recent Python versions. We should only keep BASEMODLIBS.
Let's use python-config to find Python link flags, and fall back on the previous behaviour (minus LOCALMODLIBS) when python-config is not installed.

@Julien-Elie Julien-Elie added bug Something isn't working C: build Related to the build system P: medium Medium priority labels Feb 11, 2024
@Julien-Elie Julien-Elie added this to the 2.7.2 milestone Feb 11, 2024
@Julien-Elie Julien-Elie self-assigned this Feb 11, 2024
Julien-Elie added a commit that referenced this issue Feb 11, 2024
Thanks to Matthias Klose for the bug report, and proposal of patch
using python-config.  Fall back on the previous behaviour when
python-config is not installed.

Also, remove LOCALMODLIBS as it should not actually be used and breaks
the build with recent Python versions.  Only keep BASEMODLIBS.

close #295
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C: build Related to the build system P: medium Medium priority
Development

No branches or pull requests

1 participant