classification
Title: --libs is inconsistent for python-config --libs and pkgconfig python --libs
Type: behavior Stage:
Components: Build Versions: Python 3.3
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, doko
Priority: normal Keywords: needs review

Created on 2012-08-08 10:43 by doko, last changed 2012-08-08 11:11 by Arfrever.

Messages (2)
msg167683 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2012-08-08 10:43
seen with at least 2.7, 3.2 and 3.3:

$ python-config --libs
-lpthread -ldl -lutil -lm -lpython2.7

$ pkg-config python --static --libs
-lpthread -ldl -lutil -lpython2.7

python-config uses the SYSLIBS macro, while pkg-config uses the LIBS macro.

depending on what you want to do, both can be wrong or right:

 - to build an extension, LIBS should be used.

 - to link an embedded interpreter, SYSLIBS should be used,
   which might not be complete.
   Howver in this case MODLIBS is missing.

a patch should be easy once we can define the intended behaviour.
msg167686 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) Date: 2012-08-08 11:11
Behavior of 'pkg-config python' is more useful since without --static option only the set of directly needed libraries is returned.

In Python 3.3 or 3.4 --static option could be introduced in python-config and behavior without this option could be changed to match 'pkg-config python'.
History
Date User Action Args
2012-08-08 11:11:54Arfreversetnosy: + Arfrever
messages: + msg167686
2012-08-08 10:43:17dokocreate