Adam wrote:
> /Applications/sage/local/include/python2.5/pyport.h:761:2: error:
> #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
> config?)."

Ok, so the "-m64" was probably right... What does the "file" command say
about the architecture of your files? I'm getting this:

> christian-nassaus-mac-mini:~ dummy$ file sage/local/bin/python
> sage/local/bin/python: Mach-O executable i386
> christian-nassaus-mac-mini:~ dummy$ file /usr/lib/libtcl8.4.dylib 
> /usr/lib/libtcl8.4.dylib: Mach-O universal binary with 4 architectures
> /usr/lib/libtcl8.4.dylib (for architecture ppc7400):  Mach-O dynamically 
> linked shared library ppc
> /usr/lib/libtcl8.4.dylib (for architecture ppc64):    Mach-O 64-bit 
> dynamically linked shared library ppc64
> /usr/lib/libtcl8.4.dylib (for architecture i386):     Mach-O dynamically 
> linked shared library i386
> /usr/lib/libtcl8.4.dylib (for architecture x86_64):   Mach-O 64-bit 
> dynamically linked shared library x86_64

I wonder whether your /usr/local/lib/libtcl8.5.dylib is somehow not
compatible with sage's sage/local/bin/python ... ?

C.


> 
> 
> Does that help anything?  I suppose that's why I have a -m64...
> 
> Adam
> 
> On Jun 1, 11:29 am, Christian Nassau <[email protected]> wrote:
>> Very strange... I wonder why you have an "-m64" in your gcc's? My
>> compilation statements look like this:
>>
>>> building '_tkinter' extension
>>> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd 
>>> -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 
>>> -I/System/Library/Frameworks/Tcl.framework/Versions/8.4/Headers/ 
>>> -I/Users/dummy/sage/local/include/python2.5 -c _tkinter.c -o 
>>> build/temp.macosx-10.3-i386-2.5/_tkinter.o
>>> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd 
>>> -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 
>>> -I/System/Library/Frameworks/Tcl.framework/Versions/8.4/Headers/ 
>>> -I/Users/dummy/sage/local/include/python2.5 -c tkappinit.c -o 
>>> build/temp.macosx-10.3-i386-2.5/tkappinit.o
>>> gcc -L/Users/was/build/sage-3.4.2/local/lib -bundle -undefined 
>>> dynamic_lookup build/temp.macosx-10.3-i386-2.5/_tkinter.o 
>>> build/temp.macosx-10.3-i386-2.5/tkappinit.o -L/usr/lib -ltcl8.4 -ltk8.4 -o 
>>> build/lib.macosx-10.3-i386-2.5/_tkinter.so
>>> running install_lib
>>> copying build/lib.macosx-10.3-i386-2.5/_tkinter.so -> 
>>> /Users/dummy/sage/local/lib/python2.5/site-packages
>> Maybe you could try to run the 3 gcc invocations manually without the
>> "-m64"? What are your CC and CFLAGS environment variables?
>>
>> Puzzled,
>> C.
>>
>> Adam wrote:
>>> Same problem, but with a different dylib file selected:
>>> eta /Applications/sage/spkg/optional/yacop1.0/Tkynter-1.0$ sage
>>> setup.py install
>>> running install
>>> running build
>>> running build_py
>>> creating build
>>> creating build/lib.macosx-10.3-i386-2.5
>>> creating build/lib.macosx-10.3-i386-2.5/lib-tk
>>> copying lib-tk/Tkinter.py -> build/lib.macosx-10.3-i386-2.5/lib-tk
>>> running build_ext
>>> building '_tkinter' extension
>>> creating build/temp.macosx-10.3-i386-2.5
>>> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
>>> madd -DNDEBUG -g -O3 -m64 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -
>>> I/Library/Frameworks/Tcl.framework/Headers -I/Applications/sage/local/
>>> include/python2.5 -c _tkinter.c -o build/temp.macosx-10.3-i386-2.5/
>>> _tkinter.o
>>> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
>>> madd -DNDEBUG -g -O3 -m64 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -
>>> I/Library/Frameworks/Tcl.framework/Headers -I/Applications/sage/local/
>>> include/python2.5 -c tkappinit.c -o build/temp.macosx-10.3-i386-2.5/
>>> tkappinit.o
>>> gcc -m64 -L/Applications/sage/local/lib -bundle -undefined
>>> dynamic_lookup build/temp.macosx-10.3-i386-2.5/_tkinter.o build/
>>> temp.macosx-10.3-i386-2.5/tkappinit.o -L/usr/lib/ -ltcl8.5 -ltk8.5 -o
>>> build/lib.macosx-10.3-i386-2.5/_tkinter.so
>>> ld warning: in /usr/local/lib/libtcl8.5.dylib, file is not of required
>>> architecture
>>> ld warning: in /usr/local/lib/libtk8.5.dylib, file is not of required
>>> architecture
>>> running install_lib
>>> copying build/lib.macosx-10.3-i386-2.5/_tkinter.so -> /Applications/
>>> sage/local/lib/python2.5/site-packages
>>> running install_data
>>> running install_egg_info
>>> Removing /Applications/sage/local/lib/python2.5/site-packages/
>>> Tkinter-1.0-py2.5.egg-info
>>> Writing /Applications/sage/local/lib/python2.5/site-packages/
>>> Tkinter-1.0-py2.5.egg-info
>>> eta /Applications/sage/spkg/optional/yacop1.0/Tkynter-1.0$ sage -c
>>> "import Tkinter"
>>> Traceback (most recent call last):
>>>   File "/Applications/sage/local/bin/sage-eval", line 14, in <module>
>>>     eval(compile(s,'<cmdline>','exec'))
>>>   File "<cmdline>", line 1, in <module>
>>>   File "/Applications/sage/local/lib/python2.5/lib-tk/Tkinter.py",
>>> line 38, in <module>
>>>     import _tkinter # If this fails your Python may not be configured
>>> for Tk
>>> ImportError: dlopen(/Applications/sage/local/lib/python2.5/site-
>>> packages/_tkinter.so, 2): Symbol not found: _TclFreeObj
>>>   Referenced from: /Applications/sage/local/lib/python2.5/site-
>>> packages/_tkinter.so
>>>   Expected in: dynamic lookup
>>> I also tried using your setup.py to use the system default tkinter,
>>> but for some reason setup.py is trying to use /usr/local/include
>>> instead of /usr/include and is therefore running into a conflict
>>> between 8.4 and 8.5:
>>> eta /Applications/sage/spkg/optional/yacop1.0/Tkynter-1.0$ sage
>>> setup.py install
>>> running install
>>> running build
>>> running build_py
>>> running build_ext
>>> building '_tkinter' extension
>>> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
>>> madd -DNDEBUG -g -O3 -m64 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -
>>> I/System/Library/Frameworks/Tcl.framework/Versions/8.4/Headers/ -I/usr/
>>> include/ -I/Applications/sage/local/include/python2.5 -c _tkinter.c -o
>>> build/temp.macosx-10.3-i386-2.5/_tkinter.o
>>> In file included from _tkinter.c:67:
>>> /usr/local/include/tk.h:23:3: error: #error Tk 8.5 must be compiled
>>> with tcl.h from Tcl 8.5
>>> error: command 'gcc' failed with exit status 1
>>> I also tried adding '/usr/include/' to the include_dirs dict entry,
>>> but it didn't work.  So I moved /usr/local/include/tk.h to tk.noh to
>>> hide it, and then the install worked but I ran into yet another error
>>> when importing tkinter:
>>> eta /Applications/sage/spkg/optional/yacop1.0/Tkynter-1.0$ sage
>>> setup_8.4.py install
>>> running install
>>> running build
>>> running build_py
>>> creating build
>>> creating build/lib.macosx-10.3-i386-2.5
>>> creating build/lib.macosx-10.3-i386-2.5/lib-tk
>>> copying lib-tk/Tkinter.py -> build/lib.macosx-10.3-i386-2.5/lib-tk
>>> running build_ext
>>> building '_tkinter' extension
>>> creating build/temp.macosx-10.3-i386-2.5
>>> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
>>> madd -DNDEBUG -g -O3 -m64 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -
>>> I/System/Library/Frameworks/Tcl.framework/Versions/8.4/Headers/ -I/usr/
>>> include/ -I/Applications/sage/local/include/python2.5 -c _tkinter.c -o
>>> build/temp.macosx-10.3-i386-2.5/_tkinter.o
>>> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
>>> madd -DNDEBUG -g -O3 -m64 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -
>>> I/System/Library/Frameworks/Tcl.framework/Versions/8.4/Headers/ -I/usr/
>>> include/ -I/Applications/sage/local/include/python2.5 -c tkappinit.c -
>>> o build/temp.macosx-10.3-i386-2.5/tkappinit.o
>>> gcc -m64 -L/Applications/sage/local/lib -bundle -undefined
>>> dynamic_lookup build/temp.macosx-10.3-i386-2.5/_tkinter.o build/
>>> temp.macosx-10.3-i386-2.5/tkappinit.o -L/usr/lib/ -ltcl8.4 -ltk8.4 -o
>>> build/lib.macosx-10.3-i386-2.5/_tkinter.so
>>> ld warning: in /usr/lib//libtk8.4.dylib, missing required architecture
>>> x86_64 in file
>>> running install_lib
>>> copying build/lib.macosx-10.3-i386-2.5/_tkinter.so -> /Applications/
>>> sage/local/lib/python2.5/site-packages
>>> running install_data
>>> running install_egg_info
>>> Removing /Applications/sage/local/lib/python2.5/site-packages/
>>> Tkinter-1.0-py2.5.egg-info
>>> Writing /Applications/sage/local/lib/python2.5/site-packages/
>>> Tkinter-1.0-py2.5.egg-info
>>> eta /Applications/sage/spkg/optional/yacop1.0/Tkynter-1.0$ sage -c
>>> "import Tkinter"
>>> Traceback (most recent call last):
>>>   File "/Applications/sage/local/bin/sage-eval", line 14, in <module>
>>>     eval(compile(s,'<cmdline>','exec'))
>>>   File "<cmdline>", line 1, in <module>
>>>   File "/Applications/sage/local/lib/python2.5/lib-tk/Tkinter.py",
>>> line 38, in <module>
>>>     import _tkinter # If this fails your Python may not be configured
>>> for Tk
>>> ImportError: dlopen(/Applications/sage/local/lib/python2.5/site-
>>> packages/_tkinter.so, 2): Symbol not found: _Tk_GetNumMainWindows
>>>   Referenced from: /Applications/sage/local/lib/python2.5/site-
>>> packages/_tkinter.so
>>>   Expected in: dynamic lookup
>>> so it looks like tcl/tk 8.4 is not 64 bit by default?
>>> Adam
> > 
> 


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to