Ticket #33918 (closed defect: fixed)
py27-wxpython fails with Xcode 4.3.2
| Reported by: | martin.kastner@… | Owned by: | jwa@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.0.4 |
| Keywords: | Cc: | ||
| Port: | py27-wxpython |
Description (last modified by jmr@…) (diff)
Symptom:
:info:build compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs)
:info:build File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-wxpython/py27-wxpython/work/wxPython-src-2.8.12.1/wxPython/config.py", line 770, in _darwin_compiler_fixup
:info:build log.warn("Compiling with an SDK that doesn't seem to exist: %s",
:info:build NameError: global name 'log' is not defined
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-wxpython/py27-wxpython/work/wxPython-src-2.8.12.1/wxPython" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build " returned error 1
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
while executing
"command_exec build"
(procedure "portbuild::build_main" line 8)
invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for py27-wxpython): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Log for py27-wxpython is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-wxpython/py27-wxpython/main.log
Culprit: SDKs folder is hard coded in config.py config.py:1041: cflags.append("/Developer/SDKs/MacOSX10.6.sdk")
Workaround: Create some links ...
#cd / #ln -s /Applications/Xcode.app/Contents/Developer Developer #cd /Developer #ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs SDKs
Change History
comment:1 in reply to: ↑ description Changed 13 months ago by mrosenstihl@…
comment:2 Changed 11 months ago by fabio@…
in the current version of config.py the SDK folder is hard coded to: /Applications/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
new workaround: ln -s Xcode.app/Contents/Developer/Platforms Platforms
(Lion v10.7.4, XCode v4.3.3)
Note: See
TracTickets for help on using
tickets.


Hi! Same problem here on Leopard.
one solutio would be to replace:
with:
import platform v,_,_ =platform.mac_ver() osx_sdk_ver = .".join(v.split('.')[:2]) cflags.append("/Developer/SDKs/MacOSX%s.sdk"%osx_sdk_ver)