On 21.05.2021 12:54, Victor Stinner wrote:
Hi,
On Fedora, the static library libpythonX.Y.a is *not* installed. I made our downstream change upstream: I added --without-static-libpython configure option to Python 3.10. https://docs.python.org/dev/using/configure.html#cmdoption-without-static-li...
Pablo wrote: "There are some build systems and downstream distributors that expect the .a to be there, so I propose to at least not changing the default." So the static library is still installed by default. https://bugs.python.org/issue43103
We can continue to install the static library, but build the Python binary by using directly the whole list of object files. IMO that's the simplest and most portable option. I'm not sure why a static library was created to link the Python binary in the first place.
If you have lots of object files to link, creating a library is best practice. You create a library with all your object files and then link the main() entry point object file of your choice against this.
The library also allows to statically link Python when embedding it or using it with different entry point implementations (e.g. when creating frozen apps), which is why it's installed.
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Experts (#1, May 21 2021)
Python Projects, Coaching and Support ... https://www.egenix.com/ Python Product Development ... https://consulting.egenix.com/
::: We implement business ideas - efficiently in both time and costs :::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/