From: Todd M. <jm...@st...> - 2005-03-18 14:23:34
|
On Fri, 2005-03-18 at 05:02, Jason Hoogland wrote: > Second question: I can't install Matplotlib and maybe someone will have seen > the symptom before or have some bright ideas to help me figure it out. I'm > running SuSE 9.1, python 2.3.3, and seem to have Tcl/Tk/Tkinter installed OK. > I set BUILD_GTKAGG = 0 in setup.py. In an xterm as root I ran this and the > output follows > > \start > > # python setup.py build > Xlib: connection to ":0.0" refused by server > Xlib: Invalid MIT-MAGIC-COOKIE-1 key > Using default library and include directories for Tcl and Tk because a > Tk window failed to open. You may need to define DISPLAY for Tk to work > so that setup can determine where your libraries are located. > running build > running build_py > creating build > creating build/lib.linux-i686-2.3 > copying lib/pylab.py -> build/lib.linux-i686-2.3 > creating build/lib.linux-i686-2.3/matplotlib > copying lib/matplotlib/patches.py -> build/lib.linux-i686-2.3/matplotlib > copying lib/matplotlib/_image.py -> build/lib.linux-i686-2.3/matplotlib > > ... etc copying a bunch of files into the build directory [mostly snipped] > g++ -pthread -shared build/temp.linux-i686-2.3/src/_tkagg.o -L/usr/local/lib > -L/usr/local/lib -L/usr/local/lib -L/usr/lib -L/usr/local/lib -L/usr/lib -ltk > -ltcl -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o > build/lib.linux-i686-2.3/matplotlib/backends/_tkagg.so > /linux1/usr/bin/../lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/bin/ld: > cannot find -ltk > collect2: ld returned 1 exit status > error: command 'g++' failed with exit status 1 > > \end > > I'm figuring the "Tk window open failed" bit at the start is just because it > seems to take a few seconds for Tk windows to appear on my system, and its > not coded to wait. That "Tk window open failed" problem looks to me like it may be *the* problem. matplotlib opens a Tk window to help figure out where Tk is; the fallback isn't working. In your case I think the Tk window failed because "root" is trying to open a window on a display owned by your non-priviledged account. Having the system say "no" to root about anything is really counter intuitive to me, but I've experienced it myself and it's discussed some here: http://lists.debian.org/debian-user/1998/09/msg00113.html The article suggests that if you do % xhost +localhost in your non-priviledged account before trying to build as root, X will allow the Tk window open. > So assuming that's not fatal, it seems the problem boils > down to "cannot find -ltk". I have searched for a few hours on google to no > avail. The only things I can suspect are maybe: > > - I might be missing some installed components for development stuff in Tcl or > g++? Maybe. On my RHEL3 system, I have tk-devel-8.3.5-92.2 installed. Hope this helps, Todd |