[MacPorts] #56458: python*: Compiler path is baked into _sysconfigdata.py

MacPorts noreply at macports.org
Sun Sep 22 15:46:01 UTC 2019


#56458: python*: Compiler path is baked into _sysconfigdata.py
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  python27 python31 python32          |  snowleopard, haspatch
  python33 python34 python35 python36            |
  python37-devel                                 |
-------------------------------------------------+-------------------------

Comment (by olupton):

 I have come across what seems to be a variant of this problem: some of the
 sysconfig fields include an explicit path to an SDK:
 {{{
 $ python
 Python 3.7.4 (default, Sep 22 2019, 09:12:40)
 [Clang 10.0.1 (clang-1001.0.46.4)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import sysconfig
 >>> print(sysconfig.get_config_var('CFLAGS'))
 -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic
 -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
 }}}
 and this path is used when building some ports. In my case building the
 python part of the {{{xrootd}}} port ran into problems.

 In my case the problem was apparently that the {{{python37}}} I had
 installed was built on a system with a full XCode install, which assumes
 that the SDK can be found with
 {{{-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk}}},
 but my own system just has the commandline tools installed (SDK path shown
 above). Building the {{{xrootd}}} port locally tried to compile the python
 bindings using the SDK path baked into the binary installation of
 {{{python37}}}, which failed. I could work around this by forcing the
 {{{python37}}} to be built from source, which bakes in a valid path (this
 is the {{{python}}} output shown above).

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


More information about the macports-tickets mailing list