Cmake code tends to do this kind of thing by searching through directories in decreasing version order. I think the "correct" thing to do is 1) Find tclsh 2) Find the version of tcl associated with it 3) Only search in directories with that version number I've also been bitten by this myself in the past. I worked around it using update-alternatives under Ubuntu, but it's not really a proper solution.
Andrew On Wed, Jan 27, 2010 at 02:24:10PM +0100, Arjen Markus wrote: > Hello, > > while playing around with my new laptop, I noticed a bug in the current > build system: it is possible to get a nasty mix-up of Tcl versions > resulting in a failed build. Here is the scenario I found this with: > > - I have Tcl 8.4 and 8.5 installed. The command "tclsh" starts the > Tcl 8.4 shell. > - When I build PLplot (I used the tar file, not the repository), then > CMake finds Tcl/Tk 8.5 (libraries and include files), but it uses > tclsh to determine the version. > - The version macro HAVE_TCL_GT_84 ends up being false. > - This triggers the code in plserver.c to use the (internal) Tcl > function TclFormatInt(). As this does not exist in Tcl 8.5 - it > is an internal function after all, so you are not supposed to > use it - the link step fails. > - Had the macro been defined, a wrapper function would have been > defined to take care of this. > > (This has been my first opportunity to build PLplot under Linux > for a long time) > > I will see whether this occurs with the repository version as well. > If so, I will try and solve it. > > Regards, > > Arjen > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Plplot-devel mailing list > Plplot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/plplot-devel > ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel