Message393985
There is an inconsistency between python-config.py and python-config.sh with the output of --ldflags. The .sh version include -L$libdir but the .py version does not include the -L flag unless a non-shared version of Python is built.
As a result, on Darwin (macOS), where python-config.py is used it is not possible to use python-config to get the correct linker flags when "python-config --embed --ldflags" is run if Python is installed in a directory with a lib dir that is not in the compiler's default search path.
For example, if Python is installed in /usr/local/python, we see the following on Linux (using python-config.sh):
$ python3-config --ldflags --embed
-L/usr/local/python/lib -lpython3.10 -lcrypt -lpthread -ldl -lutil -lm -lm
But on macOS, using python-config.py:
$ python3-config --ldflags --embed
-lpython3.10 -lintl -ldl -framework CoreFoundation
There is no -L flag to tell the compiler where to find the python3.10 library, so an attempt to link with it will fail. |
|
Date |
User |
Action |
Args |
2021-05-19 23:12:10 | millert | set | recipients:
+ millert |
2021-05-19 23:12:10 | millert | set | messageid: <1621465930.28.0.548981352834.issue44182@roundup.psfhosted.org> |
2021-05-19 23:12:10 | millert | link | issue44182 messages |
2021-05-19 23:12:10 | millert | create | |
|