From: Rafael L. <lab...@ps...> - 2003-03-14 18:54:35
|
* Alan W. Irwin <ir...@be...> [2003-03-14 09:26]: > On Fri, 14 Mar 2003, Rafael Laboissiere wrote: > > > Long answer: This is a bad side-effect of using plplot_libtool, instead of a > > full-fledged solution with the right libraries put in the Makefile. > > NO. You keep forgetting that libtool is a configured script that is > adjusted exactly (and only) for the build system. See below. Yes, this ideal situation only happens when the user build himself both libqhull and libplplot in the same system and never removed the libqhull.la file. A mismatch happened with my Debian packages, as reported by Christophe. So, the bad side effect may and _does_ happen in some cases. I already decided to change the libplplot-dev package dependencies, so there will be no problem. But there is another reason we need an alternative to using the plplot_libtool script. Imagine that in the future somebody writes an application that should link againt the PLplot library. How will this person configure her software in order to get the right libraries and cflags options? For now, this is easy to do using pkg-config: $ pkg-config plplot --cflags -DPL_DOUBLE $ pkg-config plplot --libs -lplplotd -lfreetype Notice that the results are still probably incorrect, but I have plans to fix that. > > The > > problem comes from here: > > > > $ grep libqhull /usr/lib/libplplotd.la > > dependency_libs='/usr/lib/libfreetype.la -lz /usr/lib/libcsa.la > > /usr/lib/libnn.la /usr/lib/libqhull.la -lm -ldl' > > > > I may try to find a way to force the use of "-lqhull" instead of > > "/usr/lib/libqhull.la" in that file, because libqhull is not provided by the > > PLplot pakcage. Same thing for -lfreetype. I dunno if this is possible > > with libtool, but I will look at it. > > Do NOT do this. I am surprised I have to go into libtool advocacy mode here > with you on this. Are you trying to evangelize the priest? :-) Joao just wrote the following, referring to me: * Joao Cardoso <jc...@fe...> [2003-03-14 17:26]: > [...] You are the one that religiously :) believe in libtool, not me :) * Alan W. Irwin <ir...@be...> [2003-03-14 09:26]: > Our joint experience is it usually does exactly the right thing, and that > proves to be the case this time as well. It simply is configured to do the > right thing on the build system. In my case (Debian woody) I have an older > qhull which was not built with libtool so there is no libqhull.la. But > libtool is configured appropriately for that situation on my system. > > grep qhull /usr/local/plplot_at/lib/libplplotd.la > dependency_libs=' /usr/lib/libfreetype.la /usr/local/plplot_at/lib/libcsa.la > /usr/local/plplot_at/lib/libnn.la -lqhull -lm -ldl' > > Note in this case -lqhull is used. Oh, you just replicated the analysis that I already send to the mailing list in replying to Joao... Well, redundancy is always good to have things really assimilated by the others. > So the linking will be fine for all cases. Remember, libtool (and > therefore the local copy of that script, plplot-libtool) is configured just > for the build system so you cannot generalize the result on one system to > what will happen on others. I never did this generalization... > > Otherwise, I will probably add a dependency on libqhull-dev and > > libfreetype6-dev to libplplot-dev. > > This is the correct approach. If the user wants to build the examples he > will obviously need libplplot-dev which will bring in the rest of the > required dev packages. This is what I already did in my local cvs tree. Will be in the upcoming Debian release. -- Rafael |