|
From: Alan W. I. <ir...@be...> - 2002-07-30 17:28:42
|
I have implemented this change in CVS by simply moving TKWIN_OBJ = Plplotter_Init$O plplotter$O tkwin_common$O from libplplottcltkd to drivers/tkwind_drv.so. Maurice, could I have your comments on doing something similar for the xwin driver? In particular is it possible to move plframe$O from libplplottcltk to xwind_drv.so without introducing a libplplottcltk dependency on xwind_drv.so and thus introducing a cross-dependency between the two since xwind_drv.so will always depend on libplplottcltk? I resolved that potential cross-dependency issue in the present case by also moving Plplotter_Init$O to tkwind_drv.so because there was nothing else in libplplottcltk that depended on Plplotter_Init$O. However, I think in the plframe$O case, there may be other objects within libplplottcltk that depend upon it and which themselves cannot be moved to xwind_drv.so without creating other cross-dependencies. If you cannot see any way to move plframe$O and related objects to xwind_drv.so without creating cross-dependencies, then I suggest you go ahead with the alternative solution you have proposed of using escape functions. The rest of this e-mail concerns some additional tkwin issues and is mostly directed to Vince. I have left tkwin_common.c separate for the moment because I am of two minds about reuniting it with tkwin.c. On the one hand, it is one extra file that Vince has to keep track of. On the other hand, my instinct is to keep this file separate since conceptually it is different from the rest of xwin (i.e.,both xwin.c and plplotter.c depend on the functions defined inside it), and I prefer not to destroy the work I did to separate it. Admittedly, that separation is not necessary at this time, but it might make future changes easier to keep things split. I will leave this decision to your best judgement, Vince, since you are the one most familiar with this area of PLplot. The other immediate remaining issue is what symlinks should be set up to $prefix/lib/plplot5.1.0/drivers/tkwind_drv.so in the installed case. I believe that question is related to Tcl/Tk packaging issues and what directories are searched by the load command for installed dll's. So Vince, will you do the next steps in CVS to package everything for the installed case? Just tell me what directory and name (probably libtkwin$(LIB_TAG).so) you need for the shared object that is loaded, and I will symlink it on the Linux/Unix side to the appropriate tkwind_drv.so install location. Just to remind you what tcl stuff in installed, here is the contents of $prefix/lib/plplot5.1.0/tcl currently installed on my system. ls /usr/local/plplot/lib/plplot5.1.0/tcl/ FileSelector.tcl cmap0a.pal cmap1d.pal plcolor.tcl* pltools.tcl PLWin.itk cmap1a.pal help_gui.tcl plconfig.tcl plwidget.tcl PLXWin.itk cmap1a1.pal help_keys.tcl pldefaults.tcl tclIndex Pltkwin.tcl cmap1b.pal help_tcltk.tcl plplot.tcl about.tcl cmap1c.pal plclient.tcl plserver.tcl Also, you haven't yet answered my question about running tcldemos.tcl from tclsh and tkdemos.tcl from wish. I know we used to be able to do that on the tea branch years ago, and I would like to see that neat functionality available on cvs HEAD as well. 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 Tue, 30 Jul 2002, Vince Darley wrote: > I think this is the right way to go --- makes sense both logically, and > 'symbol-link-ably', at least to me. > > thanks for investigating and carrying out all this tricky work. > > -- Vince > > <http://www.santafe.edu/~vince> > > > On Mon, 29 Jul 2002, Alan W. Irwin wrote: > > > On Mon, 29 Jul 2002, Vince Darley wrote: > > > > > >> > > > A separate tkwin_common.c is necessary because both plplotter.c and (the > > > new) > > > tkwin.c depend on the functions defined in there. > > > >> > > > > > > I have to say, I find this crazy! It is not possible to use plplotter.c > > > without tkwin.c and not possible to use tkwin.c without plplotter.c so, > > > please, put them in the same .so! > > > > OK. A quick visual check of the source codes seemed to indicate moving > > Plplotter_Init.o, plplotter.o tkwin_common.o from libplplottcltk to > > drivers/tkwind_drv.so would work since nothing else in libplplottcltk seems > > to depend on anything in those functions. > > > > IMPORTANT *all* these functions have to be moved since Plplotter_Init.o > > depends on plplotter, and if you leave it behind you create a > > cross-dependency and this affects the wish recipe, see below. > > > > Indeed when I tried that locally the -dev tkwin worked fine, i.e., gave its > > usual message without any linking troubles at all. > > > > Same for plserver. runAllDemos.tcl worked fine. > > > > But now the wish recipe we had before doesn't work... > > > > wish > > % source pldefaults.tcl > > % load libplplottcltkd.so Plplotter > > couldn't find procedure Plplotter_Init > > > > Obviously it is looking for Plplotter_Init inside > > libplplottcltkd.so and cannot find it since that has been moved > > to tkwind_drv.so. > > > > So now the new wish recipe from plplot/tmp should be > > > > source pldefaults.tcl > > load drivers/tkwind_drv.so Plplotter > > package provide Plplotter 5.1.0 > > source runAllDemos.tcl > > > > which works fine and makes sense under the hierarchical linking rules that > > are now in place since tkwin depends on and links to libplplottcltk. > > However, attempting to find tkwind_drv at its install location of > > $prefix/lib/plplot5.1.0/drivers/tkwind_drv.so will cause some trouble. For > > example, you will probably have to specify the complete path name to get it. > > Ultimately, this could be solved with a symlink. > > > > Vince, if this is the way you want to go (reuniting tkwin_common with tkwin > > and moving Plplotter_Init.o and plplotter.o from libplplottcltk to > > drivers/tkwind_drv.so while accepting the wish recipe changes that result) > > that is fine with me, but I need direct confirmation from you before I go to > > the additional configuration work to make this the permanent solution. > > > > Alan > > > > > > |