Opened 15 years ago
Closed 15 years ago
#19987 closed defect (invalid)
py25-matplotlib+tkinter -0.98.5.3 fails to build
Reported by: | tino@… | Owned by: | skymoo (Adam Mercer) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.7.1 |
Keywords: | matplotlib, Tkinter | Cc: | |
Port: | py25-matplotlib |
Description
I saw this same problem in ticket #19955. The problem there was solved by upgrading the python version. I have the latest version python25 @2.5.4_5+darwin_9+macosx and still get the same error.
sudo port install py25-matplotlib ... ---> Building py25-matplotlib Error: Target org.macports.build returned: shell command " cd "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3" && /macports/bin/python2.5 setup.py --no-user-cfg build " returned error 1 Command output: ============================================================================ BUILDING MATPLOTLIB matplotlib: 0.98.5.3 python: 2.5.4 (r254:67916, Jun 17 2009, 14:04:54) [GCC 4.0.1 (Apple Inc. build 5490)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.3.0 freetype2: 9.20.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.37 Tkinter: no * TKAgg requires Tkinter Traceback (most recent call last): File "setup.py", line 137, in <module> build_tkagg(ext_modules, packages) File "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3/setupext.py", line 1123, in build_tkagg add_tk_flags(module) # do this first File "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3/setupext.py", line 1041, in add_tk_flags module.libraries.extend(['tk' + tk_ver, 'tcl' + tk_ver]) UnboundLocalError: local variable 'tk_ver' referenced before assignment
As suggested in the previous ticket I ran:
$ sudo port clean py25-matplotlib $ sudo port -d install py25-matplotlib
and here is the output:
DEBUG: Found port in file:///macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-matplotlib DEBUG: Changing to port directory: /macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-matplotlib DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: Using group file /macports/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/python25-1.0.tcl DEBUG: not using configure, so not adding the default universal variant DEBUG: Requested variant darwin is not provided by port py25-matplotlib. DEBUG: Requested variant i386 is not provided by port py25-matplotlib. DEBUG: Requested variant macosx is not provided by port py25-matplotlib. DEBUG: Executing variant darwin_9 provides darwin_9 DEBUG: Executing variant tkinter provides tkinter DEBUG: Found port in file:///macports/var/macports/sources/rsync.macports.org/release/ports/lang/python25 DEBUG: Changing to port directory: /macports/var/macports/sources/rsync.macports.org/release/ports/lang/python25 DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: Using group file /macports/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/select-1.0.tcl DEBUG: universal variant already exists, so not adding the default one DEBUG: Requested variant darwin is not provided by port python25. DEBUG: Requested variant i386 is not provided by port python25. DEBUG: Executing variant macosx provides macosx DEBUG: Executing variant darwin_9 provides darwin_9 DEBUG: Searching for dependency: python25 DEBUG: Found Dependency: receipt exists for python25 DEBUG: Found port in file:///macports/var/macports/sources/rsync.macports.org/release/ports/print/freetype DEBUG: Changing to port directory: /macports/var/macports/sources/rsync.macports.org/release/ports/print/freetype DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: Using group file /macports/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/muniversal-1.0.tcl DEBUG: universal variant already exists, so not adding the default one DEBUG: Requested variant darwin is not provided by port freetype. DEBUG: Requested variant i386 is not provided by port freetype. DEBUG: Executing variant macosx provides macosx DEBUG: Searching for dependency: freetype DEBUG: Found Dependency: receipt exists for freetype DEBUG: Found port in file:///macports/var/macports/sources/rsync.macports.org/release/ports/graphics/libpng DEBUG: Changing to port directory: /macports/var/macports/sources/rsync.macports.org/release/ports/graphics/libpng DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: Using group file /macports/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/muniversal-1.0.tcl DEBUG: universal variant already exists, so not adding the default one DEBUG: Requested variant darwin is not provided by port libpng. DEBUG: Requested variant i386 is not provided by port libpng. DEBUG: Requested variant macosx is not provided by port libpng. DEBUG: Searching for dependency: libpng DEBUG: Found Dependency: receipt exists for libpng DEBUG: Found port in file:///macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-dateutil DEBUG: Changing to port directory: /macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-dateutil DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: Using group file /macports/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/python25-1.0.tcl DEBUG: 'universal_variant no' specified, so not adding the default universal variant DEBUG: Requested variant darwin is not provided by port py25-dateutil. DEBUG: Requested variant i386 is not provided by port py25-dateutil. DEBUG: Requested variant macosx is not provided by port py25-dateutil. DEBUG: Searching for dependency: py25-dateutil DEBUG: Found Dependency: receipt exists for py25-dateutil DEBUG: Found port in file:///macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-tz DEBUG: Changing to port directory: /macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-tz DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: Using group file /macports/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/python25-1.0.tcl DEBUG: not using configure, so not adding the default universal variant DEBUG: Requested variant darwin is not provided by port py25-tz. DEBUG: Requested variant i386 is not provided by port py25-tz. DEBUG: Requested variant macosx is not provided by port py25-tz. DEBUG: Searching for dependency: py25-tz DEBUG: Found Dependency: receipt exists for py25-tz DEBUG: Found port in file:///macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-numpy DEBUG: Changing to port directory: /macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-numpy DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: Using group file /macports/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/python25-1.0.tcl DEBUG: not using configure, so not adding the default universal variant DEBUG: Requested variant darwin is not provided by port py25-numpy. DEBUG: Requested variant i386 is not provided by port py25-numpy. DEBUG: Requested variant macosx is not provided by port py25-numpy. DEBUG: Searching for dependency: py25-numpy DEBUG: Found Dependency: receipt exists for py25-numpy DEBUG: Found port in file:///macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-configobj DEBUG: Changing to port directory: /macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-configobj DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: Using group file /macports/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/python25-1.0.tcl DEBUG: not using configure, so not adding the default universal variant DEBUG: Requested variant darwin is not provided by port py25-configobj. DEBUG: Requested variant i386 is not provided by port py25-configobj. DEBUG: Requested variant macosx is not provided by port py25-configobj. DEBUG: Searching for dependency: py25-configobj DEBUG: Found Dependency: receipt exists for py25-configobj DEBUG: Found port in file:///macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-pyobjc2 DEBUG: Changing to port directory: /macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-pyobjc2 DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: Using group file /macports/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/python25-1.0.tcl DEBUG: not using configure, so not adding the default universal variant DEBUG: Requested variant darwin is not provided by port py25-pyobjc2. DEBUG: Requested variant i386 is not provided by port py25-pyobjc2. DEBUG: Requested variant macosx is not provided by port py25-pyobjc2. DEBUG: Searching for dependency: py25-pyobjc2 DEBUG: Found Dependency: receipt exists for py25-pyobjc2 DEBUG: Found port in file:///macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-pyobjc2-cocoa DEBUG: Changing to port directory: /macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-pyobjc2-cocoa DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided DEBUG: Using group file /macports/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/python25-1.0.tcl DEBUG: not using configure, so not adding the default universal variant DEBUG: Requested variant darwin is not provided by port py25-pyobjc2-cocoa. DEBUG: Requested variant i386 is not provided by port py25-pyobjc2-cocoa. DEBUG: Requested variant macosx is not provided by port py25-pyobjc2-cocoa. DEBUG: Searching for dependency: py25-pyobjc2-cocoa DEBUG: Found Dependency: receipt exists for py25-pyobjc2-cocoa DEBUG: Executing org.macports.main (py25-matplotlib) ---> Fetching py25-matplotlib DEBUG: Executing org.macports.fetch (py25-matplotlib) ---> Verifying checksum(s) for py25-matplotlib DEBUG: Executing org.macports.checksum (py25-matplotlib) ---> Checksumming matplotlib-0.98.5.3.tar.gz DEBUG: Correct (md5) checksum for matplotlib-0.98.5.3.tar.gz DEBUG: Correct (sha1) checksum for matplotlib-0.98.5.3.tar.gz DEBUG: Correct (rmd160) checksum for matplotlib-0.98.5.3.tar.gz ---> Extracting py25-matplotlib DEBUG: Executing org.macports.extract (py25-matplotlib) ---> Extracting matplotlib-0.98.5.3.tar.gz DEBUG: setting option extract.args to /macports/var/macports/distfiles/python/matplotlib-0.98.5.3.tar.gz DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.5' DEBUG: Assembled command: 'cd "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work" && gzip -dc /macports/var/macports/distfiles/python/matplotlib-0.98.5.3.tar.gz | /usr/bin/gnutar --no-same-owner -xf -' DEBUG: Executing org.macports.patch (py25-matplotlib) ---> Applying patches to py25-matplotlib ---> Applying /macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-matplotlib/files/patch-setupext.py.diff DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.5' DEBUG: Assembled command: 'cd "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3" && patch -p0' patching file setupext.py Hunk #2 succeeded at 321 (offset -6 lines). Hunk #3 succeeded at 947 (offset -35 lines). Hunk #4 succeeded at 971 (offset -32 lines). ---> Applying /macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-matplotlib/files/patch-setup.cfg.diff DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.5' DEBUG: Assembled command: 'cd "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3" && patch -p0' patching file setup.cfg ---> Applying /macports/var/macports/sources/rsync.macports.org/release/ports/python/py25-matplotlib/files/patch-disable_optional_deps.diff DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.5' DEBUG: Assembled command: 'cd "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3" && patch -p0' patching file setupext.py Hunk #1 succeeded at 340 (offset -10 lines). Hunk #2 succeeded at 451 with fuzz 1 (offset -67 lines). DEBUG: Executing proc-post-org.macports.patch-patch-0 DEBUG: Executing proc-post-org.macports.patch-patch-1 ---> Configuring py25-matplotlib DEBUG: Using compiler 'Mac OS X gcc 4.0' DEBUG: Executing org.macports.configure (py25-matplotlib) ---> Building py25-matplotlib DEBUG: Executing org.macports.build (py25-matplotlib) DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.5' MPLIB_BASE='/macports' DEBUG: Assembled command: 'cd "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3" && /macports/bin/python2.5 setup.py --no-user-cfg build' ============================================================================ BUILDING MATPLOTLIB matplotlib: 0.98.5.3 python: 2.5.4 (r254:67916, Jun 17 2009, 14:04:54) [GCC 4.0.1 (Apple Inc. build 5490)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.3.0 freetype2: 9.20.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.37 Tkinter: no * TKAgg requires Tkinter Traceback (most recent call last): File "setup.py", line 137, in <module> build_tkagg(ext_modules, packages) File "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3/setupext.py", line 1123, in build_tkagg add_tk_flags(module) # do this first File "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3/setupext.py", line 1041, in add_tk_flags module.libraries.extend(['tk' + tk_ver, 'tcl' + tk_ver]) UnboundLocalError: local variable 'tk_ver' referenced before assignment Error: Target org.macports.build returned: shell command " cd "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3" && /macports/bin/python2.5 setup.py --no-user-cfg build " returned error 1 Command output: ============================================================================ BUILDING MATPLOTLIB matplotlib: 0.98.5.3 python: 2.5.4 (r254:67916, Jun 17 2009, 14:04:54) [GCC 4.0.1 (Apple Inc. build 5490)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.3.0 freetype2: 9.20.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.37 Tkinter: no * TKAgg requires Tkinter Traceback (most recent call last): File "setup.py", line 137, in <module> build_tkagg(ext_modules, packages) File "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3/setupext.py", line 1123, in build_tkagg add_tk_flags(module) # do this first File "/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_python_py25-matplotlib/work/matplotlib-0.98.5.3/setupext.py", line 1041, in add_tk_flags module.libraries.extend(['tk' + tk_ver, 'tcl' + tk_ver]) UnboundLocalError: local variable 'tk_ver' referenced before assignment Warning: the following items did not execute (for py25-matplotlib): org.macports.activate org.macports.build org.macports.destroot org.macports.install
I have an intel mac running leopard 10.5.7. Thanks
Change History (12)
comment:1 follow-up: 2 Changed 15 years ago by skymoo (Adam Mercer)
Owner: | changed from macports-tickets@… to ram@… |
---|---|
Port: | py25-matplotlib added; py25-matplotlib-0.98.5.3 removed |
Status: | new → assigned |
comment:2 Changed 15 years ago by skymoo (Adam Mercer)
Replying to ram@…:
Are you sure your python25 port is up to date, as the error indicates that tkinter is available?
Sorry that should clearly be "indicates that tkinter is not available"
comment:3 Changed 15 years ago by tino@…
$ port installed python25 The following ports are currently installed: python25 @2.5.4_5+darwin_9+macosx (active) $ port contents python25 | grep tkinter
The last command outputs nothing so tkinter is not there. But I think I read in the above mentioned ticket that it should be there. Installing py25-tkinter doesn't fix the problem.
comment:4 follow-up: 5 Changed 15 years ago by tino@…
Maybe you meant:
port contents python25|grep Tkinter /macports/lib/python2.5/lib-tk/Tkinter.py /macports/lib/python2.5/lib-tk/Tkinter.pyc /macports/lib/python2.5/lib-tk/Tkinter.pyo
That's what I get with capital T.
comment:5 Changed 15 years ago by skymoo (Adam Mercer)
Replying to tino@…:
Installing py25-tkinter doesn't fix the problem.
py25-tkinter is just a stub now, as tkinter is provided with python25 @2.5.4_5 and higher, so I'm not surprised that has no effect.
Replying to tino@…:
Maybe you meant:
port contents python25|grep Tkinter
I meant _tkinter:
$ port installed python25 The following ports are currently installed: python25 @2.5.4_5+darwin_9+macosx (active) $ port contents python25 | grep _tkinter /opt/local/lib/python2.5/lib-dynload/_tkinter.so $
Something must have gone wrong with the python install, also python25 has recently been updated to 2.5.4_6. So try updating to that.
$ sudo port deactivate python25 @2.5.4_5+darwin_9+macosx $ sudo port -d selfupdate $ sudo port -u upgrade outdated $ sudo port uninstall python25 @2.5.4_5+darwin_9+macosx
and then try
comment:6 Changed 15 years ago by blb@…
2.5.4_6 didn't do anything with Tk/tkinter so that's not likely to be it, but it is worth a try. However, if there still isn't a _tkinter.so then we'd need to see the full debug output from the build for python25.
comment:7 Changed 15 years ago by tino@…
I upgraded to 2.5.4_6 but still nothing happened.
port contents python25 | grep _tkinter /macports/lib/python2.5/lib-dynload/_tkinter_failed.so
so clearly there is something wrong. How do I get the full debug output?
comment:8 follow-up: 9 Changed 15 years ago by skymoo (Adam Mercer)
sudo port -d install python25 &> debug.log
comment:9 Changed 15 years ago by tino@…
Ok, I got the debug output but it is 2.2Mb so I can't show it to you. I looked for tkinter in the file and I think the relevant lines are these (just a guess, though):
/usr/bin/gcc-4.0 -L/macports/lib -bundle -undefined dynamic_lookup build/temp.macosx-10.5-i386-2.5/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_lang_python25/work/Python-2.5.4/Modules/_tkinter.o build/temp.macosx-10.5-i386-2.5/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_lang_python25/work/Python-2.5.4/Modules/tkappinit.o -L/usr/X11R6/lib64 -L/usr/X11R6/lib -L/macports/lib -L/usr/local/lib -lBLT -ltk8.5 -ltcl8.5 -lX11 -o build/lib.macosx-10.5-i386-2.5/_tkinter.so ld warning: in /usr/lib/libBLT.a, file is not of required architecture *** WARNING: renaming "_tkinter" since importing it failed: dlopen(build/lib.macosx-10.5-i386-2.5/_tkinter.so, 2): Symbol not found: _Blt_SafeInit Referenced from: /macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_ports_lang_python25/work/Python-2.5.4/build/lib.macosx-10.5-i386-2.5/_tkinter.so Expected in: dynamic lookup
Does that help?
comment:10 Changed 15 years ago by blb@…
What is /usr/lib/libBLT.a? I don't see that file on my 10.5.7 machine. Seems like whatever it is may be obstructing python building.
comment:11 Changed 15 years ago by tino@…
I am not sure what that file was, it was installed by the administrator of our network. I think is some library extension to Tcl/Tk. I moved the file so that it was ignored during the python installation and it worked fine. The matplotlib installation worked well too. Thanks.
comment:12 Changed 15 years ago by skymoo (Adam Mercer)
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
Are you sure your python25 port is up to date, as the error indicates that tkinter is available? What is the output of