Hello pythonXY maintainers,

in python27, the LINKFORSHARED config variable is broken:

$ python2.7 -c "import distutils.sysconfig; \
  conf = distutils.sysconfig.get_config_var; \
  print (conf('LINKFORSHARED'))"
-u _PyMac_Error Python.framework/Versions/2.7/Python

This value cannot be used for linking. However, this is the exact
command that is used in the current macros in ax_python_devel.m4 from
autoconf-archive [1]. With this value, linking a test program with
python27 will always fail.

All other python ports (really all of python24-26 and python31-36,
except python27) fix the LINKFORSHARED variable with a reinplace in
post-destroot. The very same reinplace existed in the python27 port, but
was removed in r108762:

  * remove non-working attempt to change LINKFORSHARED. Any dependents
  relying on this are broken anyway and should  be fixed to get the
  required info from python2.7-config (#39223)


I don't know what the correct solution would be, but either all python
ports should use the same approach (and have a broken LINKFORSHARED), or
python27 should also do what apparently works for the other ports.

This issue complicates writing ports with +pythonXY variants, as
+python27 needs to be special.

If LINKFORSHARED should really not be used, I would suggest to submit a
patch to autoconf-archive to get it fixed upstream instead of applying
workarounds in individual ports.


macports-dev mailing list

Reply via email to