From: Gerry W. <ge...@uc...> - 2004-04-22 15:07:25
|
I'm trying to run the first tutorial example in matplotlib-0.53 and am running into an ImportError. Here's the python script I'm trying to run: import matplotlib matplotlib.use('TkAgg') from matplotlib.matlab import * plot([1,2,3,4]) show() Here's the output I'm getting: light:gerry> python matplotlibtest.py Traceback (most recent call last): File "matplotlibtest.py", line 15, in ? from matplotlib.matlab import * File "/d2/gerry/local/ActivePython-2.3/lib/python2.3/site-packages/matplotlib/matlab.py", line 129, in ? from backends import new_figure_manager, error_msg, \ File "/d2/gerry/local/ActivePython-2.3/lib/python2.3/site-packages/matplotlib/backends/__init__.py", line 29, in ? from backend_tkagg import error_msg, draw_if_interactive, show, new_figure_manager File "/d2/gerry/local/ActivePython-2.3/lib/python2.3/site-packages/matplotlib/backends/backend_tkagg.py", line 8, in ? import tkagg # Paint image to Tk photo blitter extension File "/d2/gerry/local/ActivePython-2.3/lib/python2.3/site-packages/matplotlib/backends/tkagg.py", line 1, in ? import _tkagg ImportError: /d2/gerry/local/ActivePython-2.3/lib/python2.3/site-packages/matplotlib/backends/_tkagg.so: undefined symbol: XFreePixmap Thanks for any help. --Gerry Wiener |
From: John H. <jdh...@ac...> - 2004-04-26 13:29:13
|
>>>>> "Gerry" == Gerry Wiener <ge...@uc...> writes: Gerry> undefined symbol: XFreePixmap A quick google groups search revealed among others http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=mailman.1046790065.16698.python-list%40python.org&rnum=4&prev=/groups%3Fq%3Dundefined%2520symbol%253A%2520XFreePixmap%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26sa%3DN%26tab%3Dwg The solution appeared to be -L/usr/X11R6/lib -lX11 -lXaw for a standard linux install path. Is your X11 in a weird place; where is libX11.so? Todd, do you think we need to add X11 libs to the tk build flags? JDH |
From: Gerry W. <ge...@uc...> - 2004-04-26 15:38:50
|
John, My libX11 seems to be in the right place: light:gerry> pwd /usr/X11R6/lib light:gerry> ls -l libX11.so lrwxrwxrwx 1 root root 11 Mar 2 10:04 libX11.so -> libX11.so.6 light:gerry> ls -l libX11.so.6 lrwxrwxrwx 1 root root 13 Mar 2 10:04 libX11.so.6 -> libX11.so.6.2 light:gerry> ls -l libX11.so.6.2 -rw-r--r-- 1 root root 888580 Feb 16 02:38 libX11.so.6.2 light:gerry> Thanks, --Gerry John Hunter wrote: >>>>>>"Gerry" == Gerry Wiener <ge...@uc...> writes: >>>>>> >>>>>> > > Gerry> undefined symbol: XFreePixmap > >A quick google groups search revealed among others > >http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=mailman.1046790065.16698.python-list%40python.org&rnum=4&prev=/groups%3Fq%3Dundefined%2520symbol%253A%2520XFreePixmap%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26sa%3DN%26tab%3Dwg > >The solution appeared to be -L/usr/X11R6/lib -lX11 -lXaw for a >standard linux install path. Is your X11 in a weird place; where is >libX11.so? Todd, do you think we need to add X11 libs to the tk build >flags? > >JDH > > |
From: Todd M. <jm...@st...> - 2004-04-26 17:52:51
|
Hi Gerry, I'm not entirely sure how to trouble shoot this problem but I had a few questions: 1. What platform are you running on? 2. What does ldd _tkagg.so say? (cd to .../site-packges/matplotlib first) 3. What's in your /etc/ld.so.conf file? Regards, Todd On Mon, 2004-04-26 at 11:38, Gerry Wiener wrote: > John, > > My libX11 seems to be in the right place: > > light:gerry> pwd > /usr/X11R6/lib > light:gerry> ls -l libX11.so > lrwxrwxrwx 1 root root 11 Mar 2 10:04 libX11.so -> > libX11.so.6 > light:gerry> ls -l libX11.so.6 > lrwxrwxrwx 1 root root 13 Mar 2 10:04 libX11.so.6 -> > libX11.so.6.2 > light:gerry> ls -l libX11.so.6.2 > -rw-r--r-- 1 root root 888580 Feb 16 02:38 libX11.so.6.2 > light:gerry> > > Thanks, > > --Gerry > > > John Hunter wrote: > > >>>>>>"Gerry" == Gerry Wiener <ge...@uc...> writes: > >>>>>> > >>>>>> > > > > Gerry> undefined symbol: XFreePixmap > > > >A quick google groups search revealed among others > > > >http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=mailman.1046790065.16698.python-list%40python.org&rnum=4&prev=/groups%3Fq%3Dundefined%2520symbol%253A%2520XFreePixmap%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26sa%3DN%26tab%3Dwg > > > >The solution appeared to be -L/usr/X11R6/lib -lX11 -lXaw for a > >standard linux install path. Is your X11 in a weird place; where is > >libX11.so? Todd, do you think we need to add X11 libs to the tk build > >flags? I dunno. I was thinking first we'd figure out how to fix the problem by hand, then figure out what to do systematically. > > > >JDH > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > For a limited time only, get FREE Ground shipping on all orders of $35 > or more. Hurry up and shop folks, this offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Todd Miller <jm...@st...> |
From: Gerry W. <ge...@uc...> - 2004-04-26 18:35:30
|
Todd, I'm running on Debian linux. Here's the output from uname -a: Linux light 2.4.26-dqcd-smp #1 SMP Wed Apr 14 13:15:48 MDT 2004 i686 unknown Here's the output from ldd _tkagg.so: light:> ldd _tkagg.so libpng.so.2 => /usr/lib/libpng.so.2 (0x40160000) libstdc++.so.5 => /usr/local/gcc-3.2.2/lib/libstdc++.so.5 (0x4018b000) libfreetype.so.6 => /d2/gerry/local/lib/libfreetype.so.6 (0x4023a000) libm.so.6 => /lib/libm.so.6 (0x402b9000) libgcc_s.so.1 => /usr/local/gcc-3.2.2/lib/libgcc_s.so.1 (0x402da000) libc.so.6 => /lib/libc.so.6 (0x402e2000) libz.so.1 => /usr/lib/libz.so.1 (0x403ff000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) Here's ld.so.conf: light:> more /etc/ld.so.conf /usr/X11R6/lib/Xaw3d /usr/lib/libc5-compat/Xaw3d /usr/X11R6/lib /usr/lib/libc5-compat /lib/libc5-compat /usr/local/lib /usr/i486-linuxlibc1/lib /opt/lib Thanks, Gerry Todd Miller wrote: >Hi Gerry, > >I'm not entirely sure how to trouble shoot this problem but I had a few >questions: > >1. What platform are you running on? > >2. What does ldd _tkagg.so say? (cd to .../site-packges/matplotlib >first) > >3. What's in your /etc/ld.so.conf file? > >Regards, >Todd > > >On Mon, 2004-04-26 at 11:38, Gerry Wiener wrote: > > >>John, >> >>My libX11 seems to be in the right place: >> >>light:gerry> pwd >>/usr/X11R6/lib >>light:gerry> ls -l libX11.so >>lrwxrwxrwx 1 root root 11 Mar 2 10:04 libX11.so -> >>libX11.so.6 >>light:gerry> ls -l libX11.so.6 >>lrwxrwxrwx 1 root root 13 Mar 2 10:04 libX11.so.6 -> >>libX11.so.6.2 >>light:gerry> ls -l libX11.so.6.2 >>-rw-r--r-- 1 root root 888580 Feb 16 02:38 libX11.so.6.2 >>light:gerry> >> >>Thanks, >> >>--Gerry >> >> >>John Hunter wrote: >> >> >> >>>>>>>>"Gerry" == Gerry Wiener <ge...@uc...> writes: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>> Gerry> undefined symbol: XFreePixmap >>> >>>A quick google groups search revealed among others >>> >>>http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=mailman.1046790065.16698.python-list%40python.org&rnum=4&prev=/groups%3Fq%3Dundefined%2520symbol%253A%2520XFreePixmap%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26sa%3DN%26tab%3Dwg >>> >>>The solution appeared to be -L/usr/X11R6/lib -lX11 -lXaw for a >>>standard linux install path. Is your X11 in a weird place; where is >>>libX11.so? Todd, do you think we need to add X11 libs to the tk build >>>flags? >>> >>> > >I dunno. I was thinking first we'd figure out how to fix the problem by >hand, then figure out what to do systematically. > > > >>>JDH >>> >>> >>> >>> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek >>For a limited time only, get FREE Ground shipping on all orders of $35 >>or more. Hurry up and shop folks, this offer expires April 30th! >>http://www.thinkgeek.com/freeshipping/?cpg=12297 >>_______________________________________________ >>Matplotlib-users mailing list >>Mat...@li... >>https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> |
From: John H. <jdh...@ac...> - 2004-04-26 18:46:25
|
>>>>> "Gerry" == Gerry Wiener <ge...@uc...> writes: Gerry> Here's the output from ldd _tkagg.so: That looks bizarre to me; on my system (RHL9) _tkagg.so links with libtk, libtcl, libX11 and others. You are not even linking with the Tcl/Tk libs. It might be worthwhile to do a clean build and post the build results. > cd /your/path/to/matplotlib_src > rm -rf build > python setup.py build >& build.out JDH |
From: Gerry W. <ge...@uc...> - 2004-04-26 19:08:52
|
John Hunter wrote: >>>>>>"Gerry" == Gerry Wiener <ge...@uc...> writes: >>>>>> >>>>>> > > Gerry> Here's the output from ldd _tkagg.so: > >That looks bizarre to me; on my system (RHL9) _tkagg.so links with >libtk, libtcl, libX11 and others. You are not even linking with the >Tcl/Tk libs. It might be worthwhile to do a clean build and post the >build results. > > > cd /your/path/to/matplotlib_src > > rm -rf build > > python setup.py build >& build.out > >JDH > > > John, Please note that I made the following modifications to setup.py: BUILD_AGG = 1 BUILD_GTKAGG = False BUILD_TKAGG = 1 BUILD_WINDOWING = False Regards, Gerry Here's the contents of build.out: running build running build_py creating build creating build/lib.linux-i686-2.3 creating build/lib.linux-i686-2.3/matplotlib copying matplotlib/__init__.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/_matlab_helpers.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/afm.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/artist.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/axes.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/axis.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/backend_bases.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/cbook.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/colors.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/dates.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/figure.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/finance.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/font_manager.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/image.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/legend.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/lines.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/mathtext.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/matlab.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/mlab.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/numerix.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/patches.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/postinstall.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/pyparsing.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/setupext.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/table.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/text.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/ticker.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/transforms.py -> build/lib.linux-i686-2.3/matplotlib copying matplotlib/windowing.py -> build/lib.linux-i686-2.3/matplotlib creating build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/__init__.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_agg.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_gd.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_gtk.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_gtkagg.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_gtkgd.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_paint.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_ps.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_template.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_tkagg.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_wx.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/backend_wxagg.py -> build/lib.linux-i686-2.3/matplotlib/backends copying matplotlib/backends/tkagg.py -> build/lib.linux-i686-2.3/matplotlib/backends running build_ext building 'matplotlib.backends._tkagg' extension creating build/temp.linux-i686-2.3 creating build/temp.linux-i686-2.3/src /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/ActivePython-2.3/lib/tcl8.4/../../include -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/ActivePython-2.3/lib/tcl8.4/../../include/freetype2 -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c src/_tkagg.cpp -o build/temp.linux-i686-2.3/src/_tkagg.o /usr/local/gcc-3.2.2/bin/g++ -pthread -shared -L/usr/local/gcc-3.2.2/lib -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include build/temp.linux-i686-2.3/src/_tkagg.o -L/d2/gerry/local/ActivePython-2.3/lib/tcl8.4/../ -L/d2/gerry/local/ActivePython-2.3/lib/tk8.4/../ -L/d2/gerry/local/lib -L/d2/gerry/local/lib -ltk8.4 -ltcl8.4 -lpng -lstdc++ -lm -lfreetype -lz -lm -o build/lib.linux-i686-2.3/matplotlib/backends/_tkagg.so building 'matplotlib.backends._backend_agg' extension creating build/temp.linux-i686-2.3/agg2 creating build/temp.linux-i686-2.3/agg2/src /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_gen_stroke.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_gen_stroke.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_bezier_arc.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_bezier_arc.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_line_aa_basics.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_line_aa_basics.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_path_storage.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_path_storage.o agg2/src/agg_path_storage.cpp: In member function `unsigned int agg::path_storage::arrange_orientations(unsigned int, agg::path_flags_e)': agg2/src/agg_path_storage.cpp:286: warning: unused variable `unsigned int cmd' /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_gen_dash.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_gen_dash.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_arc.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_arc.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_sqrt_tables.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_sqrt_tables.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_vpgen_segmentator.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_vpgen_segmentator.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_affine_matrix.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_affine_matrix.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_vpgen_clip_polygon.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_vpgen_clip_polygon.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_gen_contour.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_gen_contour.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_line_profile_aa.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_line_profile_aa.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_scanline_u8.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_scanline_u8.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_bspline.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_bspline.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_gen_markers_term.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_gen_markers_term.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_rasterizer_scanline_aa.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_rasterizer_scanline_aa.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c src/_backend_agg.cpp -o build/temp.linux-i686-2.3/src/_backend_agg.o In file included from /d2/gerry/local/ActivePython-2.3/include/python2.3/Python.h:8, from src/ft2font.h:6, from src/_backend_agg.cpp:3: /d2/gerry/local/ActivePython-2.3/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined In file included from /usr/include/string.h:26, from /usr/local/gcc-3.2.2/include/c++/3.2.2/cstring:51, from src/_backend_agg.cpp:1: /usr/include/features.h:131:1: warning: this is the location of the previous definition /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_arrowhead.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_arrowhead.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c src/ft2font.c -o build/temp.linux-i686-2.3/src/ft2font.o src/ft2font.c: In function `FT2Font_clear': src/ft2font.c:319: warning: unused variable `i' src/ft2font.c: At top level: src/ft2font.c:1160: warning: return type defaults to `int' src/ft2font.c: In function `initft2font': src/ft2font.c:1205: warning: control reaches end of non-void function /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_trans_warp_magnifier.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_trans_warp_magnifier.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_gen_smooth_poly1.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_gen_smooth_poly1.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_rounded_rect.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_rounded_rect.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_gsv_text.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_gsv_text.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_image_filters.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_image_filters.o /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/include -I/d2/gerry/local/include/freetype2 -Isrc/freetype2 -Iagg2/include/freetype2 -I/d2/gerry/local/include/freetype2 -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c agg2/src/agg_curves.cpp -o build/temp.linux-i686-2.3/agg2/src/agg_curves.o /usr/local/gcc-3.2.2/bin/g++ -pthread -shared -L/usr/local/gcc-3.2.2/lib -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include build/temp.linux-i686-2.3/src/_backend_agg.o build/temp.linux-i686-2.3/src/ft2font.o build/temp.linux-i686-2.3/agg2/src/agg_affine_matrix.o build/temp.linux-i686-2.3/agg2/src/agg_arc.o build/temp.linux-i686-2.3/agg2/src/agg_arrowhead.o build/temp.linux-i686-2.3/agg2/src/agg_bezier_arc.o build/temp.linux-i686-2.3/agg2/src/agg_bspline.o build/temp.linux-i686-2.3/agg2/src/agg_curves.o build/temp.linux-i686-2.3/agg2/src/agg_gen_contour.o build/temp.linux-i686-2.3/agg2/src/agg_gen_dash.o build/temp.linux-i686-2.3/agg2/src/agg_gen_markers_term.o build/temp.linux-i686-2.3/agg2/src/agg_gen_smooth_poly1.o build/temp.linux-i686-2.3/agg2/src/agg_gen_stroke.o build/temp.linux-i686-2.3/agg2/src/agg_gsv_text.o build/temp.linux-i686-2.3/agg2/src/agg_image_filters.o build/temp.linux-i686-2.3/agg2/src/agg_line_aa_basics.o build/temp.linux-i686-2.3/agg2/src/agg_line_profile_aa.o build/temp.linux-i686-2.3/agg2/src/agg_path_storage.o build/temp.linux-i686-2.3/agg2/src/agg_rasterizer_scanline_aa.o build/temp.linux-i686-2.3/agg2/src/agg_rounded_rect.o build/temp.linux-i686-2.3/agg2/src/agg_scanline_u8.o build/temp.linux-i686-2.3/agg2/src/agg_sqrt_tables.o build/temp.linux-i686-2.3/agg2/src/agg_trans_warp_magnifier.o build/temp.linux-i686-2.3/agg2/src/agg_vpgen_clip_polygon.o build/temp.linux-i686-2.3/agg2/src/agg_vpgen_segmentator.o -L/d2/gerry/local/lib -L/d2/gerry/local/lib -lpng -lstdc++ -lm -lfreetype -lz -lm -o build/lib.linux-i686-2.3/matplotlib/backends/_backend_agg.so building 'matplotlib.ft2font' extension gcc -pthread -shared -L/usr/local/gcc-3.2.2/lib -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include build/temp.linux-i686-2.3/src/ft2font.o -L/d2/gerry/local/lib -lfreetype -lz -lm -o build/lib.linux-i686-2.3/matplotlib/ft2font.so building 'matplotlib._image' extension /usr/local/gcc-3.2.2/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include -fPIC -I/d2/gerry/local/include -Isrc -Iagg2/include -I/d2/gerry/local/ActivePython-2.3/include/python2.3 -c src/_image.cpp -o build/temp.linux-i686-2.3/src/_image.o In file included from /d2/gerry/local/ActivePython-2.3/include/python2.3/Python.h:8, from src/_image.cpp:5: /d2/gerry/local/ActivePython-2.3/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" redefined In file included from /usr/local/gcc-3.2.2/include/c++/3.2.2/i686-pc-linux-gnu/bits/os_defines.h:39, from /usr/local/gcc-3.2.2/include/c++/3.2.2/i686-pc-linux-gnu/bits/c++config.h:34, from /usr/local/gcc-3.2.2/include/c++/3.2.2/iosfwd:44, from /usr/local/gcc-3.2.2/include/c++/3.2.2/ios:44, from /usr/local/gcc-3.2.2/include/c++/3.2.2/istream:44, from /usr/local/gcc-3.2.2/include/c++/3.2.2/fstream:45, from src/_image.cpp:2: /usr/include/features.h:131:1: warning: this is the location of the previous definition /usr/local/gcc-3.2.2/bin/g++ -pthread -shared -L/usr/local/gcc-3.2.2/lib -g -Df2cFortran -I/d2/gerry/local/ActiveTcl/include build/temp.linux-i686-2.3/src/_image.o build/temp.linux-i686-2.3/agg2/src/agg_affine_matrix.o build/temp.linux-i686-2.3/agg2/src/agg_arc.o build/temp.linux-i686-2.3/agg2/src/agg_arrowhead.o build/temp.linux-i686-2.3/agg2/src/agg_bezier_arc.o build/temp.linux-i686-2.3/agg2/src/agg_bspline.o build/temp.linux-i686-2.3/agg2/src/agg_curves.o build/temp.linux-i686-2.3/agg2/src/agg_gen_contour.o build/temp.linux-i686-2.3/agg2/src/agg_gen_dash.o build/temp.linux-i686-2.3/agg2/src/agg_gen_markers_term.o build/temp.linux-i686-2.3/agg2/src/agg_gen_smooth_poly1.o build/temp.linux-i686-2.3/agg2/src/agg_gen_stroke.o build/temp.linux-i686-2.3/agg2/src/agg_gsv_text.o build/temp.linux-i686-2.3/agg2/src/agg_image_filters.o build/temp.linux-i686-2.3/agg2/src/agg_line_aa_basics.o build/temp.linux-i686-2.3/agg2/src/agg_line_profile_aa.o build/temp.linux-i686-2.3/agg2/src/agg_path_storage.o build/temp.linux-i686-2.3/agg2/src/agg_rasterizer_scanline_aa.o build/temp.linux-i686-2.3/agg2/src/agg_rounded_rect.o build/temp.linux-i686-2.3/agg2/src/agg_scanline_u8.o build/temp.linux-i686-2.3/agg2/src/agg_sqrt_tables.o build/temp.linux-i686-2.3/agg2/src/agg_trans_warp_magnifier.o build/temp.linux-i686-2.3/agg2/src/agg_vpgen_clip_polygon.o build/temp.linux-i686-2.3/agg2/src/agg_vpgen_segmentator.o -L/d2/gerry/local/lib -lpng -lstdc++ -lm -o build/lib.linux-i686-2.3/matplotlib/_image.so |
From: Todd M. <jm...@st...> - 2004-04-26 18:47:49
|
On Mon, 2004-04-26 at 14:35, Gerry Wiener wrote: > Todd, > > I'm running on Debian linux. Here's the output from uname -a: > > Linux light 2.4.26-dqcd-smp #1 SMP Wed Apr 14 13:15:48 MDT 2004 i686 unknown > > Here's the output from ldd _tkagg.so: > > light:> ldd _tkagg.so > libpng.so.2 => /usr/lib/libpng.so.2 (0x40160000) > libstdc++.so.5 => /usr/local/gcc-3.2.2/lib/libstdc++.so.5 > (0x4018b000) > libfreetype.so.6 => /d2/gerry/local/lib/libfreetype.so.6 > (0x4023a000) > libm.so.6 => /lib/libm.so.6 (0x402b9000) > libgcc_s.so.1 => /usr/local/gcc-3.2.2/lib/libgcc_s.so.1 (0x402da000) > libc.so.6 => /lib/libc.so.6 (0x402e2000) > libz.so.1 => /usr/lib/libz.so.1 (0x403ff000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) Here's mine from Red Hat 9 i386 Linux: backends$ ldd _tkagg.so libtk8.3.so => /usr/lib/libtk8.3.so (0x40003000) libtcl8.3.so => /usr/lib/libtcl8.3.so (0x400c1000) libpng12.so.0 => /usr/lib/libpng12.so.0 (0x4014b000) libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4016e000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40221000) libz.so.1 => /usr/lib/libz.so.1 (0x40272000) libm.so.6 => /lib/tls/libm.so.6 (0x40294000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x402b6000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0x402be000) libc.so.6 => /lib/tls/libc.so.6 (0x42000000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x402cc000) libdl.so.2 => /lib/libdl.so.2 (0x403ab000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) As JDH suggested, -L/usr/X11R6/lib -lX11 -lXaw sounds like a good idea. It's possible that Tk and Tcl will need something similar. Have you tried anything like this yet? Todd > > > Here's ld.so.conf: > > light:> more /etc/ld.so.conf > /usr/X11R6/lib/Xaw3d > /usr/lib/libc5-compat/Xaw3d > /usr/X11R6/lib > /usr/lib/libc5-compat > /lib/libc5-compat > /usr/local/lib > /usr/i486-linuxlibc1/lib > /opt/lib > > Thanks, > > Gerry > > Todd Miller wrote: > > >Hi Gerry, > > > >I'm not entirely sure how to trouble shoot this problem but I had a few > >questions: > > > >1. What platform are you running on? > > > >2. What does ldd _tkagg.so say? (cd to .../site-packges/matplotlib > >first) > > > >3. What's in your /etc/ld.so.conf file? > > > >Regards, > >Todd > > > > > >On Mon, 2004-04-26 at 11:38, Gerry Wiener wrote: > > > > > >>John, > >> > >>My libX11 seems to be in the right place: > >> > >>light:gerry> pwd > >>/usr/X11R6/lib > >>light:gerry> ls -l libX11.so > >>lrwxrwxrwx 1 root root 11 Mar 2 10:04 libX11.so -> > >>libX11.so.6 > >>light:gerry> ls -l libX11.so.6 > >>lrwxrwxrwx 1 root root 13 Mar 2 10:04 libX11.so.6 -> > >>libX11.so.6.2 > >>light:gerry> ls -l libX11.so.6.2 > >>-rw-r--r-- 1 root root 888580 Feb 16 02:38 libX11.so.6.2 > >>light:gerry> > >> > >>Thanks, > >> > >>--Gerry > >> > >> > >>John Hunter wrote: > >> > >> > >> > >>>>>>>>"Gerry" == Gerry Wiener <ge...@uc...> writes: > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>> Gerry> undefined symbol: XFreePixmap > >>> > >>>A quick google groups search revealed among others > >>> > >>>http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=mailman.1046790065.16698.python-list%40python.org&rnum=4&prev=/groups%3Fq%3Dundefined%2520symbol%253A%2520XFreePixmap%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26sa%3DN%26tab%3Dwg > >>> > >>>The solution appeared to be -L/usr/X11R6/lib -lX11 -lXaw for a > >>>standard linux install path. Is your X11 in a weird place; where is > >>>libX11.so? Todd, do you think we need to add X11 libs to the tk build > >>>flags? > >>> > >>> > > > >I dunno. I was thinking first we'd figure out how to fix the problem by > >hand, then figure out what to do systematically. > > > > > > > >>>JDH > >>> > >>> > >>> > >>> > >> > >>------------------------------------------------------- > >>This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > >>For a limited time only, get FREE Ground shipping on all orders of $35 > >>or more. Hurry up and shop folks, this offer expires April 30th! > >>http://www.thinkgeek.com/freeshipping/?cpg=12297 > >>_______________________________________________ > >>Matplotlib-users mailing list > >>Mat...@li... > >>https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > >> > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > For a limited time only, get FREE Ground shipping on all orders of $35 > or more. Hurry up and shop folks, this offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Todd Miller <jm...@st...> |
From: John H. <jdh...@ac...> - 2004-04-26 19:02:18
|
>>>>> "Todd" == Todd Miller <jm...@st...> writes: Todd> As JDH suggested, -L/usr/X11R6/lib -lX11 -lXaw sounds like a Todd> good idea. It's possible that Tk and Tcl will need Todd> something similar. Have you tried anything like this yet? Gerry, could you run this script and post the results? import sys, os class FoundTclTk: pass def find_tcltk(): """Finds Tcl/Tk includes/libraries/version by interrogating Tkinter.""" try: import Tkinter except: print "Tkinter not properly installed\n" sys.exit(1) if Tkinter.TkVersion < 8.3: print "Tcl/Tk v8.3 or later required\n" sys.exit(1) o = FoundTclTk() try: tk=Tkinter.Tk() except Tkinter.TclError: print "Using default library and include directories for Tcl and Tk because a" print "Tk window failed to open. You may need to define DISPLAY for Tk to work" print "so that setup can determine where your libraries are located." o.tcl_lib = "/usr/local/lib" o.tcl_inc = "/usr/local/include" o.tk_lib = "/usr/local/lib" o.tkv = "" else: tk.withdraw() o.tcl_lib = os.path.join((tk.getvar('tcl_library')), '../') o.tk_lib = os.path.join((tk.getvar('tk_library')), '../') o.tcl_inc = os.path.join((tk.getvar('tcl_library')), '../../include') o.tkv = str(Tkinter.TkVersion)[:3] if not os.path.exists(o.tcl_inc): o.tcl_inc = os.path.join((tk.getvar('tcl_library')), '../../include/tcl'+o.tkv) if not os.path.exists(o.tcl_inc): print 'cannot find tcl/tk headers. giving up.' sys.exit() return o o = find_tcltk() print 'system', sys.platform print 'tcl include:', o.tcl_inc, os.path.exists(o.tcl_inc) print 'tcl lib:', o.tcl_lib, os.path.exists(o.tcl_lib) print 'tcl version:', 'tk'+o.tkv |
From: Gerry W. <ge...@uc...> - 2004-04-26 19:15:12
|
John, Here's the results of find_tcltk: light:> python find_tcl.py system linux2 tcl include: /d2/gerry/local/ActivePython-2.3/lib/tcl8.4/../../include True tcl lib: /d2/gerry/local/ActivePython-2.3/lib/tcl8.4/../ True tcl version: tk8.4 --Gerry John Hunter wrote: >>>>>>"Todd" == Todd Miller <jm...@st...> writes: >>>>>> >>>>>> > > > Todd> As JDH suggested, -L/usr/X11R6/lib -lX11 -lXaw sounds like a > Todd> good idea. It's possible that Tk and Tcl will need > Todd> something similar. Have you tried anything like this yet? > >Gerry, could you run this script and post the results? > >import sys, os >class FoundTclTk: > pass > >def find_tcltk(): > """Finds Tcl/Tk includes/libraries/version by interrogating Tkinter.""" > try: > import Tkinter > except: > print "Tkinter not properly installed\n" > sys.exit(1) > if Tkinter.TkVersion < 8.3: > print "Tcl/Tk v8.3 or later required\n" > sys.exit(1) > o = FoundTclTk() > try: > tk=Tkinter.Tk() > except Tkinter.TclError: > print "Using default library and include directories for Tcl and Tk because a" > print "Tk window failed to open. You may need to define DISPLAY for Tk to work" > print "so that setup can determine where your libraries are located." > o.tcl_lib = "/usr/local/lib" > o.tcl_inc = "/usr/local/include" > o.tk_lib = "/usr/local/lib" > o.tkv = "" > else: > tk.withdraw() > o.tcl_lib = os.path.join((tk.getvar('tcl_library')), '../') > > o.tk_lib = os.path.join((tk.getvar('tk_library')), '../') > o.tcl_inc = os.path.join((tk.getvar('tcl_library')), '../../include') > o.tkv = str(Tkinter.TkVersion)[:3] > if not os.path.exists(o.tcl_inc): > o.tcl_inc = os.path.join((tk.getvar('tcl_library')), '../../include/tcl'+o.tkv) > if not os.path.exists(o.tcl_inc): > print 'cannot find tcl/tk headers. giving up.' > sys.exit() > > return o > >o = find_tcltk() >print 'system', sys.platform >print 'tcl include:', o.tcl_inc, os.path.exists(o.tcl_inc) >print 'tcl lib:', o.tcl_lib, os.path.exists(o.tcl_lib) >print 'tcl version:', 'tk'+o.tkv > > |