[MacPorts] #64312: iaito: ld: cannot link directly with dylib/framework, your binary is not an allowed client of /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks//Python.framework/Python.tbd

MacPorts noreply at macports.org
Thu Feb 3 12:29:50 UTC 2022


#64312: iaito: ld: cannot link directly with dylib/framework, your binary is not an
allowed client of
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks//Python.framework/Python.tbd
-------------------------+------------------------
  Reporter:  ryandesign  |      Owner:  i0ntempest
      Type:  defect      |     Status:  reopened
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.7.1
Resolution:              |   Keywords:
      Port:  iaito       |
-------------------------+------------------------

Comment (by ryandesign):

 > I explained why `-F/opt/local/Library/Frameworks/Python.framework` isn't
 doing anything either.

 er.. I meant [comment:2 I explained] why `-F/opt/local/Library/Frameworks
 -framework Python` isn't doing anything either:

 > `-F/opt/local/Library/Frameworks` would mean "look for frameworks in
 /opt/local/Library/Frameworks". There is a Python.framework in there,
 however it has many versions. Which version would it use? As far as know,
 it uses whichever one the Current symlink points to. MacPorts doesn't
 provide a Current symlink within the Python.framework so I think
 effectively that means this Python.framework is not found.

 I see now that MacPorts ''does'' make a Current symlink, and some other
 symlinks, if you use `sudo port select python`. We of course don't want
 ports to rely on the effects of `port select` so we should not use
 `-F/opt/local/Library/Frameworks -framework Python`.

 The change you made in [8e747cce4e1f62e58370c8b2a9a7a1c87678b2fa/macports-
 ports] made it fail to build on all OS versions:
 {{{
 fatal error: 'Python.h' file not found
 #include <Python.h>
          ^~~~~~~~~~
 }}}
 I would have thought that the `INCLUDEPATH` and `LIBS` that you removed
 were the only thing allowing it to find the right MacPorts python
 framework in the first place.

 The change you made in [ea78373ca1ae8405bb9fe3b860c6dfd04ac207b2/macports-
 ports] allowed it to build on 10.15.x and 11.x (I'm not sure why) but not
 other OS versions and it's still linking with both the MacPorts python 3.9
 framework and the system's python 2.7 framework.

-- 
Ticket URL: <https://trac.macports.org/ticket/64312#comment:13>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list