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 __________________________ |
From: Vince D. <vi...@sa...> - 2002-07-10 10:02:59
|
On Tue, 9 Jul 2002, Alan W. Irwin wrote: > (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. I've removed pltools.tcl, and will soon remove plwidget.tcl, after synchronising the changes with the tk version. > (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. It is not that "they did not want me to use", just that Tk's internal API includes a bunch of X emulation stuff which is needed by the widget. It is conceivable that on unix only it might compile with only tk.h (feel free to try), but on Windows/MacOS tkInt.h is 100% required. I think I've fixed the remaining issues you reported. (warnings, name clashes etc). thank! Vince. |
From: Alan W. I. <ir...@be...> - 2002-07-10 13:07:59
|
On Wed, 10 Jul 2002, Vince Darley wrote: > > (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. > > It is not that "they did not want me to use", just that Tk's internal API > includes a bunch of X emulation stuff which is needed by the widget. It > is conceivable that on unix only it might compile with only tk.h (feel > free to try), but on Windows/MacOS tkInt.h is 100% required. OK, I did try tk.h, and it builds without warnings or errors, but I haven't yet been able to test it at run time (see below). > > I think I've fixed the remaining issues you reported. (warnings, name > clashes etc). Thanks very much for this effort. The compile warnings are indeed gone, and most of the linker errors. However, there is still one left (presumably because plplot_ccmap means different things in xwin.c and tkwin.c). 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 collect2: ld returned 1 exit status make: *** [libplplotd.so.5.1.0] Error 1 As soon as this is sorted out, I look forward to some run-time testing. Alan |
From: Vince D. <vi...@sa...> - 2002-07-10 14:03:16
|
Ok, I've fixed those remaining issues. Make sure you are compiling plplotter.c and Plplotter_Init.c as well as tkwin.c -- Vince <http://www.santafe.edu/~vince> |
From: Alan W. I. <ir...@be...> - 2002-07-10 15:04:56
|
On Wed, 10 Jul 2002, Vince Darley wrote: > Ok, I've fixed those remaining issues. Make sure you are compiling > plplotter.c and Plplotter_Init.c as well as tkwin.c I am getting a lot further now. Without plplotter.c and Plplotter_Init.c all is well with the library build, but of course there are some undefined symbols related to those two when trying to link executables with the library. So as suggested by you I included compilation of plplotter.c and Plplotter_Init.c in the library. Plplotter_Init.c compiles cleanly, but there are compilation errors for plplotter.c. plplotter.c: In function PlPlotterKeyEH': plplotter.c:1290: TkWindow' undeclared (first use in this function) plplotter.c:1290: (Each undeclared identifier is reported only once plplotter.c:1290: for each function it appears in.) plplotter.c:1290: parse error before )' plplotter.c: In function Openlink': plplotter.c:2529: O_RDONLY' undeclared (first use in this function) I cannot figure this out so I hope you have some ideas about what is missing on the Linux side. Alan |
From: Vince D. <vi...@sa...> - 2002-07-10 15:09:54
|
On Wed, 10 Jul 2002, Alan W. Irwin wrote: > plplotter.c: In function PlPlotterKeyEH': > plplotter.c:1290: TkWindow' undeclared (first use in this function) > plplotter.c:1290: (Each undeclared identifier is reported only once > plplotter.c:1290: for each function it appears in.) > plplotter.c:1290: parse error before )' > plplotter.c: In function Openlink': > plplotter.c:2529: O_RDONLY' undeclared (first use in this function) O_RDONLY should be in some standard Unix header file (posix headers), and I'm afraid that 'TkpWindow((TkWindow*)...)' shows why this file actually does need tkInt.h cheers, Vince. |
From: <jc...@fe...> - 2002-07-10 15:17:57
|
On Wednesday 10 July 2002 16:09, Vince Darley wrote: | On Wed, 10 Jul 2002, Alan W. Irwin wrote: | > plplotter.c: In function PlPlotterKeyEH': | > plplotter.c:1290: TkWindow' undeclared (first use in this function) | > plplotter.c:1290: (Each undeclared identifier is reported only once | > plplotter.c:1290: for each function it appears in.) | > plplotter.c:1290: parse error before )' | > plplotter.c: In function Openlink': | > plplotter.c:2529: O_RDONLY' undeclared (first use in this function) | | O_RDONLY should be in some standard Unix header file (posix headers), #include <fcntl.h> | and I'm afraid that 'TkpWindow((TkWindow*)...)' shows why this file | actually does need tkInt.h | | cheers, | | Vince. | | | | | ------------------------------------------------------- | This sf.net email is sponsored by:ThinkGeek | Two, two, TWO treats in one. | http://thinkgeek.com/sf | _______________________________________________ | Plplot-devel mailing list | Plp...@li... | https://lists.sourceforge.net/lists/listinfo/plplot-devel |
From: Alan W. I. <ir...@be...> - 2002-07-10 16:10:35
|
On Wed, 10 Jul 2002, Vince Darley wrote: > On Wed, 10 Jul 2002, Alan W. Irwin wrote: > > > plplotter.c: In function PlPlotterKeyEH': > > plplotter.c:1290: TkWindow' undeclared (first use in this function) > > plplotter.c:1290: (Each undeclared identifier is reported only once > > plplotter.c:1290: for each function it appears in.) > > plplotter.c:1290: parse error before )' > > plplotter.c: In function Openlink': > > plplotter.c:2529: O_RDONLY' undeclared (first use in this function) > > O_RDONLY should be in some standard Unix header file (posix headers), and > I'm afraid that 'TkpWindow((TkWindow*)...)' shows why this file actually > does need tkInt.h Thanks to Joao's tip on O_RDONLY and (by hand) adding the flags -I/usr/include/tcl8.3/tk-private/generic/ -DHAVE_LIMITS_H -I/usr/include/tcl8.3/tcl-private/generic/ I got plplotter.c compiled and put into the library. However, now run into a library nameclash for plWait_Until. 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 Plplotter_Init.o plplotter.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 Plplotter_Init.o: In function plWait_Until': Plplotter_Init.o(.text+0x8c): multiple definition of plWait_Until' Pltk_Init.o(.text+0xcc): first defined here collect2: ld returned 1 exit status Looking forward to the next iteration from you.... Alan |
From: Vince D. <vi...@sa...> - 2002-07-10 18:11:10
|
I'm away from my machine at the moment, but just rename all instances of that function in Plplotter_Init.c and you should be ok. -- Vince <http://www.santafe.edu/~vince> On Wed, 10 Jul 2002, Alan W. Irwin wrote: > On Wed, 10 Jul 2002, Vince Darley wrote: > > > On Wed, 10 Jul 2002, Alan W. Irwin wrote: > > > > > plplotter.c: In function PlPlotterKeyEH': > > > plplotter.c:1290: TkWindow' undeclared (first use in this function) > > > plplotter.c:1290: (Each undeclared identifier is reported only once > > > plplotter.c:1290: for each function it appears in.) > > > plplotter.c:1290: parse error before )' > > > plplotter.c: In function Openlink': > > > plplotter.c:2529: O_RDONLY' undeclared (first use in this function) > > > > O_RDONLY should be in some standard Unix header file (posix headers), and > > I'm afraid that 'TkpWindow((TkWindow*)...)' shows why this file actually > > does need tkInt.h > > Thanks to Joao's tip on O_RDONLY and (by hand) adding the flags > > -I/usr/include/tcl8.3/tk-private/generic/ -DHAVE_LIMITS_H > -I/usr/include/tcl8.3/tcl-private/generic/ > > I got plplotter.c compiled and put into the library. However, now run > into a library nameclash for plWait_Until. > > 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 Plplotter_Init.o > plplotter.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 > Plplotter_Init.o: In function plWait_Until': > Plplotter_Init.o(.text+0x8c): multiple definition of plWait_Until' > Pltk_Init.o(.text+0xcc): first defined here > collect2: ld returned 1 exit status > > Looking forward to the next iteration from you.... > > Alan > > |
From: Alan W. I. <ir...@be...> - 2002-07-10 19:20:41
|
On Wed, 10 Jul 2002, Vince Darley wrote: > I'm away from my machine at the moment, but just rename all instances of > that function in Plplotter_Init.c and you should be ok. I did this locally, but you probably wouldn't like my name (;-) so please commit your solution to the nameclash when you have time. With this change and adding -I/usr/include/tcl8.3/tk-private/generic/ -DHAVE_LIMITS_H -I/usr/include/tcl8.3/tcl-private/generic/ by hand to the plplotter.c compile line, I finally got a good Linux build! Now on to the executable testing. I get a segfault if I try ./x01c -dev tkwin Further debugging with the aid of valgrind showed the following problem right before the segfault. #2 0x4029e2c1 in plD_open_tkwin (pls=0x402bb040) at tkwin.c:427 427 tkwd->map = Tk_Colormap(pls->plPlotterPtr->tkwin); (gdb) p pls->plPlotterPtr $1 = (struct PlPlotter *) 0x0 (gdb) p pls->plPlotterPtr->tkwin Cannot access memory at address 0x0 However, further reading of your code comments indicates this driver is only supposed to work in a tk environment so I guess I deserved what I got....;-) So two quick questions/comments: (1) Please put in a quick test in tkwin.c that you *are* in a tk environment so you get an error message and smooth exit (rather than segfault) when you try this outside tk, e.g., with x01c. (2) How do I test the tkwin driver in a tk environment? (Complete cookbook please since I have very little knowledge of tcl/tk). Alan |
From: Vince D. <vi...@sa...> - 2002-07-11 08:59:47
|
>>> (2) How do I test the tkwin driver in a tk environment? (Complete cookbook please since I have very little knowledge of tcl/tk). >>> Ok, done everything else. Now to look at the above. You need to build a shared library with contains all of the code. Then start up 'wish' (the tk shell) and type: >wish % cd location/of/my/shared/lib % load nameOfSharedLib.so Plplotter (assuming that doesn't return an error message) % package provide Plplotter 5.1.0 % source location/of/runAllDemos.tcl (hope that makes sense to you). Obviously if the above works, then the idea is that it can all be made very seamless but for the moment a manual approach should tell us where (if) there are errors/problems. -- Vince <http://www.santafe.edu/~vince> |
From: Alan W. I. <ir...@be...> - 2002-07-11 14:57:12
|
On Thu, 11 Jul 2002, Vince Darley wrote: > Ok, done everything else. Thanks. It still builds fine, and there is now a smooth error exit if you try to use the driver inappropriately. > You need to build a shared library with contains all of the code. Then > start up 'wish' (the tk shell) and type: > > >wish > > % cd location/of/my/shared/lib > % load nameOfSharedLib.so Plplotter > (assuming that doesn't return an error message) Linux builds both static and shared library versions: cd plplot/tmp ls -l libplplot* -rw-r--r-- 1 software software 3010606 Jul 11 07:35 libplplotd.a lrwxrwxrwx 1 software software 15 Jul 11 07:36 libplplotd.so -> libplplotd.so.5* lrwxrwxrwx 1 software software 19 Jul 11 07:36 libplplotd.so.5 -> libplplotd.so.5.1.0* -rwxr-xr-x 1 software software 1279373 Jul 11 07:36 libplplotd.so.5.1.0* wish % load libplplotd.so Plplotter invalid command name "pldefaults" So it seems to be finding the library, but something is wrong with the initialization procedure that is invoked by Plplotter. BTW, I get the same message if I use "load libplplotd.so" (with Plplotter dropped) instead or if I use the full name libplplotd.so.5.1.0 instead of the symlink. Alan |
From: Vince D. <vi...@sa...> - 2002-07-11 15:01:40
|
Ok, that basically means it worked. Ignore that error and continue with the source runAllDemos.tcl... -- Vince <http://www.santafe.edu/~vince> On Thu, 11 Jul 2002, Alan W. Irwin wrote: > On Thu, 11 Jul 2002, Vince Darley wrote: > > > Ok, done everything else. > > Thanks. It still builds fine, and there is now a smooth error exit if > you try to use the driver inappropriately. > > > You need to build a shared library with contains all of the code. Then > > start up 'wish' (the tk shell) and type: > > > > >wish > > > > % cd location/of/my/shared/lib > > % load nameOfSharedLib.so Plplotter > > (assuming that doesn't return an error message) > > Linux builds both static and shared library versions: > > cd plplot/tmp > ls -l libplplot* > -rw-r--r-- 1 software software 3010606 Jul 11 07:35 libplplotd.a > lrwxrwxrwx 1 software software 15 Jul 11 07:36 libplplotd.so -> libplplotd.so.5* > lrwxrwxrwx 1 software software 19 Jul 11 07:36 libplplotd.so.5 -> libplplotd.so.5.1.0* > -rwxr-xr-x 1 software software 1279373 Jul 11 07:36 libplplotd.so.5.1.0* > > wish > % load libplplotd.so Plplotter > invalid command name "pldefaults" > > So it seems to be finding the library, but something is wrong with the > initialization procedure that is invoked by Plplotter. BTW, I get the same > message if I use "load libplplotd.so" (with Plplotter dropped) instead or > if I use the full name libplplotd.so.5.1.0 instead of the symlink. > > Alan > > |
From: Alan W. I. <ir...@be...> - 2002-07-11 17:44:04
|
> Ok, that basically means it worked. Ignore that error and continue with > the source runAllDemos.tcl... Here are the symlinks in plplot/tmp ls -l run*.tcl lrwxrwxrwx 1 software software 30 Jul 11 10:06 runAllDemos.tcl -> ../examples/tk/runAllDemos.tcl lrwxrwxrwx 1 software software 35 Jul 11 10:07 runExtendedDemos.tcl -> ../examples/tk/runExtendedDemos.tcl Here is my wish results from that same directory: wish % load libplplotd.so Plplotter invalid command name "pldefaults" % package provide Plplotter 5.1.0 % pwd /home/software/plplot_cvs/HEAD/plplot_working3/tmp % source runAllDemos.tcl couldn't change working directory to "./../tcl": no such file or directory somehow your scripts aren't handling the symlinks correctly so I tried directly accessing the file: % pwd /home/software/plplot_cvs/HEAD/plplot_working3/tmp % source ../examples/tk/runAllDemos.tcl invalid command name "plframe" % pwd /home/software/plplot_cvs/HEAD/plplot_working3/examples/tcl So the script in examples/tk was found and it changed the working directory to examples/tcl, but it cannot seem to find plframe, and presumably that is why there is still a blank wish gui being displayed. Note I also tried ? and no command name starting with pl is accessible including plframe. So I am beginning to think the first error message: invalid command name "pldefaults" is more meaningful than you thought. My guess is the load command above is not working at all since no pl* commands are available after that load. If you don't trust the ? results, I also tried % plinit invalid command name "plinit" and surely that should be accessible after "load libplplotd.so Plplotter"? I have a strong sense of deja vu. It's been a couple of years, but didn't we go through this for my attempts to Linux-test the TEA-based branch? Alan |
From: Vince D. <vi...@sa...> - 2002-07-11 17:52:35
|
It could be that the error message is important, if Tcl aborts the load when an error is received. After 'load' when you do: % info commands pl* is 'plframe' listed? Best approach is probably to do what I described in my following mail and install everything where Tcl expects to find it (tcl/lib/plplot5.1.0 or whatever), and use 'package require Plplotter'. Note: there is no 'plinit' command with the tkwin driver -- all plplot interaction happens through a plframe widget. -- Vince <http://www.santafe.edu/~vince> |
From: Alan W. I. <ir...@be...> - 2002-07-11 18:39:58
|
On Thu, 11 Jul 2002, Vince Darley wrote: > It could be that the error message is important, if Tcl aborts the load > when an error is received. > > After 'load' when you do: > > % info commands pl* > > is 'plframe' listed? no. % info commands p* pwd package proc puts pid pack place % BTW, I have done a cvs update to get your latest fixes which do solve the symlink problem I was having before. But the showstopper is the pl* commands are not available. > > Best approach is probably to do what I described in my following mail and > install everything where Tcl expects to find it (tcl/lib/plplot5.1.0 or > whatever), and use 'package require Plplotter'. I have also read your further messages on this subject. Nevertheless, I am leary of jumping that far ahead with the tiny tcl expertise that I have. I would like to get it working properly in plplot/tmp first, and once we understand that, then move on to the installation problem. I don't want tkwin to be the only driver that doesn't work in plplot/tmp, and also the final installed location for the plplot library will not be in the tcl tree (instead it will be located at $prefix/lib/libplplotd.so or $prefix/lib/libplplot.so) so we will have to deal with that issue in any case. > > Note: there is no 'plinit' command with the tkwin driver -- all plplot > interaction happens through a plframe widget. Sorry I picked such a bad example. But the above info commands results show no plplot command is available so the load of libplplotd.so is not working properly from its plplot/tmp location. I would appreciate it if you tried making the same experiment from windows, i.e. attempted to load the plplot library (or a copy of it) from the current directory to get to the root of the problem of why the pl* commands are not available after the load. But if you don't want to go further with that, then it is probably time for me to hand this over to the real tcl/linux experts here. Geoffrey is not available for several weeks, but I am hoping Maurice is back now. Maurice, can you see any reason why the pl* commands are not available after the load from the current directory? All the tkwin stuff should build out of the box now for you except for the hand intervention I described to add the appropriate -I flags to compile plplotter.c. Ultimately, I intend to put in all the configuration necessary so that hand intervention is not required, but it is good enough for testing purposes for now. Alan |
From: Vince D. <vi...@sa...> - 2002-07-11 19:07:49
|
I have one more suggestion. The error you are getting is because of the call to 'pldefaults' in plplot.tcl (whichever version of plplot.tcl is being picked up load; I'm not sure if that will be the one in pwd or in /usr/..). Replace the single line with 'pldefaults' with: catch {pldefaults} and see if that helps. At the very least you should not get the same error message! -- Vince <http://www.santafe.edu/~vince> |
From: Alan W. I. <ir...@be...> - 2002-07-11 20:31:15
|
Well, that fixed the problem, and everything works fine in the resulting GUI from plplot/tmp with no error/warning messages at all! So please commit that change *assuming there is no impact on the tk or ntk drivers.* (I held back on that commit because I didn't know the meaning of catch....) I have just committed a small configuration tweak that should set up the r*.tcl symlinks properly for plplot/tmp. So for the others here who want to try this here is the cookbook: (1) configure --with-tkwin (2) In the make step you currently need to hand-configure the appropriate additional options for the compile step for plplotter.c On my system the additional options that work for me are -I/usr/include/tcl8.3/tk-private/generic/ -DHAVE_LIMITS_H -I/usr/include/tcl8.3/tcl-private/generic/ Then in plplot/tmp wish % load libplplotd.so.5.1.0 Plplotter % package provide Plplotter 5.1.0 % source runAllDemos.tcl and enjoy the new GUI. Thanks Vince for being willing to work with me to shake out all the showstopper problems with tkwin on linux. I am especially impressed that it works directly under wish. I always thought you needed the TEA-based approach for that. The next item on my agenda is to put some rudimentary configuration stuff in for the extra compile flags that you need. Then I will look at what you have to do for the install (probably tomorrow). 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 __________________________ On Thu, 11 Jul 2002, Vince Darley wrote: > I have one more suggestion. The error you are getting is because of the > call to 'pldefaults' in plplot.tcl (whichever version of plplot.tcl is > being picked up load; I'm not sure if that will be the one in pwd or in > /usr/..). Replace the single line with 'pldefaults' with: > > catch {pldefaults} > > and see if that helps. At the very least you should not get the same > error message! > > -- Vince > > <http://www.santafe.edu/~vince> > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > PC Mods, Computing goodies, cases & more > http://thinkgeek.com/sf > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel > |
From: Vince D. <vi...@sa...> - 2002-07-11 15:08:26
|
What you need to do to make this all seamless now is install everything that Plplot wants in a place where Tcl can see it through its normal package mechanism. This means you want to install a bunch of stuff into the directory returned by: wish % file join [file dirname [info library]] plplot5.1.0 perhaps /usr/local/tcl/lib/plplot5.1.0 or something like that? Anyway, the stuff that goes in there is: (see sys/win-tk/makefile.vc's 'install' target for details): *.map *.fnt tk/plcolor.tcl tk/plplot.tcl tk/pldefaults.tcl tk/pltools.tcl tk/plwidget.tcl tk-x-plat/*.tcl tk-x-plat/tclIndex as well as the shared library you have created. You may also need to edit 'pkgIndex.tcl' so that this stuff: if {[info exists tcl_platform(debug)]} { set file [file join $dir plplot510d[info sharedlibextension]] } else { set file [file join $dir plplot510[info sharedlibextension]] } Assuming you install all of this, then you should just be able to do: wish % package require Plplotter 5.1.0 % plframe .p .p % pack .p or simply: wish runAllDemos.tcl cheers, Vince. |
From: Alan W. I. <ir...@be...> - 2002-07-11 17:56:16
|
On my current system under wish and after load libplplotd.so.5.1.0 Plplotter % file join [file dirname [info library]] plplot5.1.0 /usr/lib/plplot5.1.0 Later, we install many of our files including the tk/tcl ones into the $prefix/lib/plplot5.1.0 tree. In my case prefix is /usr/local/plplot so that is not compatible with the above result. But that is a separate issue which we will have to sort out eventually. For now, the question is how to get everything to work in plplot/tmp. If wish is looking for stuff in /usr/lib/plplot5.1.0, then it is not going to find anything. Like before, I believe it is a question of somehow putting the current directory "." on the list of directories that it searches. 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 __________________________ On Thu, 11 Jul 2002, Vince Darley wrote: > What you need to do to make this all seamless now is install everything > that Plplot wants in a place where Tcl can see it through its normal > package mechanism. > > This means you want to install a bunch of stuff into the directory > returned by: > > wish > % file join [file dirname [info library]] plplot5.1.0 > > perhaps /usr/local/tcl/lib/plplot5.1.0 or something like that? > > Anyway, the stuff that goes in there is: (see sys/win-tk/makefile.vc's > 'install' target for details): > > *.map > *.fnt > tk/plcolor.tcl > tk/plplot.tcl > tk/pldefaults.tcl > tk/pltools.tcl > tk/plwidget.tcl > tk-x-plat/*.tcl > tk-x-plat/tclIndex > > as well as the shared library you have created. > > You may also need to edit 'pkgIndex.tcl' so that this stuff: > > if {[info exists tcl_platform(debug)]} { > set file [file join $dir plplot510d[info sharedlibextension]] > } else { > set file [file join $dir plplot510[info sharedlibextension]] > } > > Assuming you install all of this, then you should just be able to do: > > wish > % package require Plplotter > 5.1.0 > % plframe .p > .p > % pack .p > > or simply: > > wish runAllDemos.tcl > > cheers, > > Vince. > > > > > > |
From: Vince D. <vi...@sa...> - 2002-07-11 18:01:39
|
On Thu, 11 Jul 2002, Alan W. Irwin wrote: > For now, the question is how to get everything to work in plplot/tmp. I thought the question was how to get everything to work. Afterwards we can address how to get it to work in some particular setup...? Vince. |
From: Vince D. <vi...@sa...> - 2002-07-11 18:07:31
|
On Thu, 11 Jul 2002, Alan W. Irwin wrote: > Later, we install many of our files including the tk/tcl ones into the > $prefix/lib/plplot5.1.0 tree. In my case prefix is /usr/local/plplot so > that is not compatible with the above result. But that is a separate issue > which we will have to sort out eventually. That shouldn't matter, really, I think. As long as % set auto_path in wish contains the directory above where you have plplot installed. i.e. as long as the file 'pkgIndex.tcl' (from tk-x-plat) matches this pattern: $dir/*/pkgIndex.tcl for some $dir in auto_path. As long as this is true, then 'package require Plplotter' will automatically find the pkgIndex.tcl and you'll be set. Vince. |