From: Alan W. I. <ir...@be...> - 2002-07-09 20:24:33
|
Vince, Joao told me privately, and I confirmed that you cannot build the tkwin device in its present state on Linux. However, once some nameclashes are resolved it might work. For other Linux users who might be interested in trying this, to attempt access to this device simply add the configuration option --with-tkwin I have just made some commits to fix up some minor problems (the worst being the incorrect device number which should be 45 and not 44). Here are some additional problems which I could workaround: (1) pltools.tcl and plwidget.tcl nameclash between files in tk and tk-x-plat. Could you please rename the tk-x-plat files to something else so the tk driver can comfortably coexist with yours? My workaround was to locally symlink those files when I needed them, but that is not a general solution since it clobbers the tk driver. (2) Your code depends on tkInt.h which is an internal header used by Tk which is supposedly not for public use. (This is very similar to the distinction we make between common and public API.) Presumably, you are using some internal Tk API, which they did not want you to use. Is there some alternative from their more normal API which you could use instead so you could drop tkInt.h altogether? Many Linux distributions (such as SuSe used by Joao) do not have this internal header file. Debian woody happens to include the private headers so I worked around the problem by local changes to my Makefile to put the following on the compile line: -I /usr/include/tcl8.3/tk-private/generic/ -DHAVE_LIMITS_H But this will be impossible for most other distributions so a better solution is to drop the dependence on tkInt.h (and private Tk functions) altogether. Note, there were some compilation warnings with this fix which you may want to address: plplot/pltkwd.h:160: warning: struct PlFrame' declared inside parameter list plplot/pltkwd.h:160: warning: its scope is only this definition or declaration, which is probably not what you want Finally, we come to the showstopper which is lots of link errors due to nameclashes with the xwin driver: cd tmp; make default make[1]: Entering directory `/home/software/plplot_cvs/HEAD/plplot_working3/tmp' rm -f libplplotd.so.5.1.0 Building shared library cd shared; \ gcc -shared -fPIC -o ../libplplotd.so.5.1.0 \ -Wl,-soname -Wl,libplplotd.so.5 \ pdfutils.o plargs.o plbox.o plbuf.o plcont.o plcore.o plctrl.o plcvt.o pldtik.o plfill.o plhist.o plline.o plmap.o plot3d.o plpage.o plsdef.o plshade.o plsym.o pltick.o plvpor.o plwind.o plstripc.o plimage.o tclAPI.o Pltk_Init.o tcpip.o plframe.o plr.o xwin.o tk.o tkwin.o sc3d.o sccont.o scstubs.o javabind.o tclMain.o tkMain.o strutil.o sfstubs.o -L.. -ltclmatrixd -litk3.1 -ltk8.3 -litcl3.1 -ltcl8.3 -L/usr/X11R6/lib -lX11 -ldl -lm -lg2c tkwin.o(.data+0x4): multiple definition of `plplot_ccmap' xwin.o(.data+0x8): first defined here tkwin.o: In function `plX_setBGFG': tkwin.o(.text+0x1650): multiple definition of `plX_setBGFG' xwin.o(.text+0x2b9c): first defined here /usr/bin/ld: Warning: size of symbol `plX_setBGFG' changed from 264 to 209 in tkwin.o tkwin.o: In function `PLColor_to_XColor': tkwin.o(.text+0x1a24): multiple definition of `PLColor_to_XColor' xwin.o(.text+0x3704): first defined here tkwin.o: In function `PLColor_from_XColor': tkwin.o(.text+0x1a64): multiple definition of `PLColor_from_XColor' xwin.o(.text+0x3744): first defined here tkwin.o: In function `PLX_save_colormap': tkwin.o(.text+0x1af8): multiple definition of `PLX_save_colormap' xwin.o(.text+0x37c0): first defined here /usr/bin/ld: Warning: size of symbol `PLX_save_colormap' changed from 95 to 89 in tkwin.o collect2: ld returned 1 exit status make[1]: *** [libplplotd.so.5.1.0] Error 1 make[1]: Leaving directory `/home/software/plplot_cvs/HEAD/plplot_working3/tmp' make: *** [all] Error 2 Again, these all look like name clashes with definitions in xwin.c which have to be resolved so the two can peacefully coexist. Once the two sets of nameclashes are taken care of, I will be happy to try again with the -I /usr/include/tcl8.3/tk-private/generic/ -DHAVE_LIMITS_H workaround just to see how far I can get. Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ |