fink / fink-distributions

Package descriptions and patches for Fink
25 stars 38 forks source link

python38 doesn't publish libpython linker flag #724

Open dmacks opened 3 years ago

dmacks commented 3 years ago

While trying to add some missing -py38 variants to existing packages, such as sip-pyqt5-pyXX, I get linker failures due to undefined symbols:

c++ -headerpad_max_install_names -bundle -ldl -Wl,-framework,CoreFoundation -o \
sip.so siplib.o apiversions.o descriptors.o qtlib.o threads.o objmap.o voidptr.\
o array.o int_convertors.o bool.o
Undefined symbols for architecture x86_64:
  "_PyArg_ParseTuple", referenced from:
      _assign in siplib.o
[...]

whereas -py36 succeeds. The cause is a difference in the linker flags that the respective pythonXX publish:

$ /sw/bin/python3.6-config --ldflags
-L/sw/lib/python3.6/config-3.6m-darwin -lpython3.6m -ldl -Wl,-framework,CoreFoundation
# /sw/bin/python3.8-config --ldflags
-ldl -Wl,-framework,CoreFoundation

Note lack of -L/sw/lib/python3.8/config-3.8-darwin -lpython3.8 in the latter case.

dhomeier commented 3 years ago

python38 needs the --embed flag in addition; SIP 5.x already adds this correctly, but for 4.x this has to be specifically passed to LFLAGS in configure; see e.g. https://github.com/fink/fink-distributions/pull/678/commits/9266201 (already includes the patches, though I added the py38 version only some commits later).

dmacks commented 3 years ago

Ahah! I'm exactly working on a package that needs some py-qt things at py38. Silly me, figured it was as easy as adding "3.8" to the variant list:( Looking at PR #675 (which includes 9266201), can we slice out a minimal "+py38" to commit ASAP, and then leave the version-update pending a decision about how to handle different versions and platform support?

dhomeier commented 3 years ago

That's actually from #678; I have converted #675 to a draft for now (indefinitely), since Qt 5.15 is not supported for all distributions. For sip-py* 9266201 and the actual new variant from 513a0d0 should be all that's needed, but not sure of all the dependencies. Unfortunately I haven't got a chance yet to look into all the py34 and py35 breakage some updates in that PR, but the SIP update to 4.19.24 should be fairly safe.

nieder commented 3 years ago

I'll look a the sip-py commits from #678 and cherry pick those soon if they're not dependent on the PyQt stuff. I wasn't sure how they interact with each other. Also, if things can add py38 w/out the need to bump %v, then I can push those as well.