[MacPorts] #35689: py27-wxpython: NameError: global name 'log' is not defined
#35689: py27-wxpython: NameError: global name 'log' is not defined --------------------------------------+------------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: py27-wxpython --------------------------------------+------------------------------------- After upgrading from XCode 4.3 to 4.4 on my Lion Macbook, I got the following error: {{{ $ python -c 'import wx' Traceback (most recent call last): File "<string>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/wx-2.8-mac-unicode/wx/__init__.py", line 45, in <module> from wx._core import * File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/wx-2.8-mac-unicode/wx/_core.py", line 4, in <module> import _core_ ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/wx-2.8-mac-unicode/wx/_core_.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/wx-2.8-mac-unicode/wx/_core_.so: mach-o, but wrong architecture christoph-deils-macbook:Downloads deil$ file /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/wx-2.8-mac-unicode/wx/_core_.so /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/wx-2.8-mac-unicode/wx/_core_.so: Mach-O bundle i386 christoph-deils-macbook:Downloads deil$ otool -L /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/wx-2.8-mac-unicode/wx/_core_.so /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/wx-2.8-mac-unicode/wx/_core_.so: /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0) /opt/local/lib/libwx_macu_richtext-2.8.0.dylib (compatibility version 9.0.0, current version 9.0.0) /opt/local/lib/libwx_macu_aui-2.8.0.dylib (compatibility version 9.0.0, current version 9.0.0) /opt/local/lib/libwx_macu_xrc-2.8.0.dylib (compatibility version 9.0.0, current version 9.0.0) /opt/local/lib/libwx_macu_qa-2.8.0.dylib (compatibility version 9.0.0, current version 9.0.0) /opt/local/lib/libwx_macu_html-2.8.0.dylib (compatibility version 9.0.0, current version 9.0.0) /opt/local/lib/libwx_macu_adv-2.8.0.dylib (compatibility version 9.0.0, current version 9.0.0) /opt/local/lib/libwx_macu_core-2.8.0.dylib (compatibility version 9.0.0, current version 9.0.0) /opt/local/lib/libwx_base_carbonu_xml-2.8.0.dylib (compatibility version 9.0.0, current version 9.0.0) /opt/local/lib/libwx_base_carbonu_net-2.8.0.dylib (compatibility version 9.0.0, current version 9.0.0) /opt/local/lib/libwx_base_carbonu-2.8.0.dylib (compatibility version 9.0.0, current version 9.0.0) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 17.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0) /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime (compatibility version 1.0.0, current version 2315.0.0) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 41.0.0) }}} So I tried to uninstall and reinstall {{{ sudo port uninstall py27-wxpython sudo port uninstall wxWidgets sudo port install py27-wxpython }}} but now the py27-wxpython install fails with a {{{ NameError: global name 'log' is not defined }}} The full log is attached. -- Ticket URL: <https://trac.macports.org/ticket/35689> MacPorts <http://www.macports.org/> Ports system for Mac OS
#35689: py27-wxpython: NameError: global name 'log' is not defined --------------------------------------+------------------------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: py27-wxpython --------------------------------------+------------------------------------- Changes (by ryandesign@…): * owner: macports-tickets@… => jwa@… * cc: jwa@… (removed) Comment: Replying to [ticket:35689 Deil.Christoph@…]:
After upgrading from XCode 4.3 to 4.4 on my Lion Macbook, I got the following error: {{{ $ python -c 'import wx' [snip] ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/wx-2.8-mac-unicode/wx/_core_.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/wx-2.8-mac-unicode/wx/_core_.so: mach-o, but wrong architecture }}}
The wxpython software is only available in a 32-bit version. You must therefore run python in 32-bit mode if you want to use wxpython. {{{ $ arch -i386 python -c 'import wx' }}}
but now the py27-wxpython install fails with a {{{ NameError: global name 'log' is not defined }}}
Yes it had problems locating the "log" function for some reason, but more importantly, what it was trying to use the log function to display was the message "Compiling with an SDK that doesn't seem to exist". The SDKs are in a different location in Xcode 4.3 and 4.4 than in earlier versions and the port might need an update to accommodate that. -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#35689: py27-wxpython: NameError: global name 'log' is not defined --------------------------------------+------------------------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: py27-wxpython --------------------------------------+------------------------------------- Comment(by macports@…): Can you clarify the last response? I have this error as well: what actions do I need to take to work around it? What does it mean that the port "might" need an update? -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#35689: py27-wxpython: NameError: global name 'log' is not defined -------------------------------+------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: py-wxpython | -------------------------------+------------------- Changes (by jmr@…): * port: py27-wxpython => py-wxpython Comment: wx uses long-deprecated APIs that were finally removed from the headers in 10.7. It thus can only be built on 10.7+ by using the 10.6 SDK. Xcode 4.4 does not have a 10.6 SDK. The only real fix to this mess is for upstream to release a new stable version that doesn't use the removed APIs. Cf. #35372 -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#35689: py27-wxpython: NameError: global name 'log' is not defined -------------------------------+------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: py-wxpython | -------------------------------+------------------- Comment (by cdev9@…): I am also having this same problem but I am on Leopard, 10.5.8, and I am trying to re-install. Same messages. info:build building '_core_' extension :info:build Traceback (most recent call last): :info:build File "setup.py", line 1053, in <module> :info:build **other_kw :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup :info:build dist.run_commands() :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands :info:build self.run_command(cmd) :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command :info:build cmd_obj.run() :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run :info:build self.run_command(cmd_name) :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command :info:build self.distribution.run_command(command) :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command :info:build cmd_obj.run() :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 339, in run :info:build self.build_extensions() :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 448, in build_extensions :info:build self.build_extension(ext) :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 498, in build_extension :info:build depends=ext.depends) :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/ccompiler.py", line 572, in compile :info:build self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) :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 784, in _compile :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 768, 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 Command failed: 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 :info:build Exit code: 1 :error:build org.macports.build for port py27-wxpython returned: command execution failed :debug:build Error code: CHILDSTATUS 27259 1 :debug:build Backtrace: command execution failed while executing "system -nice 15 $fullcmdstring" ("eval" body line 1) invoked from within "eval system $notty $nice \$fullcmdstring" invoked from within "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" :info:build Warning: targets not executed for py27-wxpython: org.macports.activate org.macports.build org.macports.destroot org.macports.install :notice:build Please see the log file for port py27-wxpython for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports .org_release_tarballs_ports_python_py-wxpython/py27-wxpython/main.log -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#35689: py27-wxpython: NameError: global name 'log' is not defined -------------------------------+------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: py-wxpython | -------------------------------+------------------- Comment (by Peter.Danecek@…): Replying to [comment:5 cdev9@…]:
I am also having this same problem but I am on Leopard, 10.5.8, and I am trying to re-install. Same messages.
The same problem here, same OS (MacOSX, 10.5.8), Xcode 3.1.4 so it seems not to be related only to Xcode 4.4 update. I'll attach a full main.log from a 10.5.8 system. {{{ [urquell:~] petr% xcodebuild -version Xcode 3.1.4 Component versions: DevToolsCore-1204.0; DevToolsSupport-1186.0 BuildVersion: 9M2809 }}} -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#35689: py27-wxpython: NameError: global name 'log' is not defined -------------------------------+------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: py-wxpython | -------------------------------+------------------- Comment (by Peter.Danecek@…): Replying to [comment:6 Peter.Danecek@…]:
Replying to [comment:5 cdev9@…]:
I am also having this same problem but I am on Leopard, 10.5.8, and I am trying to re-install. Same messages.
The same problem here, same OS (MacOSX, 10.5.8), Xcode 3.1.4 so it seems not to be related only to Xcode 4.4 update. I'll attach a full main.log from a 10.5.8 system.
By the way: py26-wxpython subport builds fine on the same system! I know, it has quite different dependencies. Let me know if you are interested in an mail.log from this build as well. -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#35689: py27-wxpython: NameError: global name 'log' is not defined -------------------------------+------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-wxpython | -------------------------------+------------------- Changes (by mojca@…): * owner: jwa@… => jwa@… * cc: Peter.Danecek@…, cdev9@… (added) * version: 2.1.2 => -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#35689: py27-wxpython: NameError: global name 'log' is not defined -------------------------------+------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-wxpython | -------------------------------+------------------- Comment (by mojca@…): Are you still able to reproduce the error? This actually seems like two unrelated errors here. The one on 10.5 tries to use: {{{ log.warn("Compiling with an SDK that doesn't seem to exist: %s", }}} and I suspect that wxPython might be smart for you with something like {{{ cflags.append("/Developer/SDKs/MacOSX10.3.9.sdk") }}} but on the other hand it might indeed be a problem that "{{{log}}}" doesn't exist. I think I removed setting any SDK on anything else but Lion, but it would be helpful if those experiencing the problem could try to test again with the new port {{{py27-wxpython-2.8 +carbon}}} (or {{{+gtk}}} for that matter). -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#35689: py27-wxpython: NameError: global name 'log' is not defined -------------------------------+------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-wxpython | -------------------------------+------------------- Comment (by mojca@…): I reported the bug upstream: http://trac.wxwidgets.org/ticket/15462 Unless I'm mistaken, hitting this error means that there is probably a problem on your OS anyway (like SDK which disappeared - even though wxWidgets should still work in that case), but it still seems like a bug that is still present in the {{{wxPyton 2.9.4.0}}}. Since nobody reported it for 2.9.4, I'll simply wait for the upstream to fix the bug, while I will blindly try to fix 2.8.12.1 by importing the {{{log}}} module. -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#35689: py27-wxpython: NameError: global name 'log' is not defined -------------------------------+-------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: py-wxpython | -------------------------------+-------------------- Changes (by mojca@…): * status: new => closed * resolution: => fixed Comment: Untested commit r110469 (probably not sufficient for upstream though). Please report back if there are still problems. There are a number of places where {{{log.warn}}} is also used in {{{wxPython}}} sources and I didn't attempt to fix those. I hope these problems will be fixed upstream. -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
#35689: py27-wxpython: NameError: global name 'log' is not defined -------------------------------+-------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: py-wxpython | -------------------------------+-------------------- Comment (by macsforever2000@…): @mojca: FYI, Trac only allows a single email address for the owned by field. -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
#35689: py27-wxpython: NameError: global name 'log' is not defined -------------------------------+-------------------- Reporter: Deil.Christoph@… | Owner: jwa@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: py-wxpython | -------------------------------+-------------------- Comment (by Deil.Christoph@…): I just wanted to confirm that the issue is solved for me on Mac OS X 10.7 and 10.8. @mojca Thank you for your work! -- Ticket URL: <https://trac.macports.org/ticket/35689#comment:14> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts