On 2010-05-12 23:20+0200 Werner Smekal wrote:

> I think it has something to do with these lines FindTCL.cmake
>
> FIND_LIBRARY(TCL_LIBRARY
>  NAMES
>  tcl
>  tcl${TK_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION}
>  tcl86 tcl8.6
>  tcl85 tcl8.5
>  tcl84 tcl8.4
>  tcl83 tcl8.3
>  tcl82 tcl8.2
>  tcl80 tcl8.0
>  PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
>  )

Hi Werner:

You were absolutely right.  I now have a simple test case (see my recent
post to the cmake list) that replicates the issue.  The net effect is if
alternate names are put into the find command as above in decreasing version
order, then as Geoff found out you cannot access an older version than the
system version in non-standard locations using CMAKE_LIBRARY_PATH or any
other of the standard means of affecting the library search order. For
example, for my really simple test case that only involved one FIND_LIBRARY
command I could not find libtcl8.3 in a non-standard location using
CMAKE_LIBRARY_PATH when my system version was libtcl8.4.

Note, this is not just an issue with FindTCL.cmake.  It is an issue with
all FIND_XXX commands that specify alternate names so it could affect
a large number of different find modules.

I view this behaviour as a serious CMake bug since accessing old versions in
non-standard locations is an important (although minority) use case for
software testers so they can replicate reported bugs for older versions of
dependent libraries (as Geoff was doing). The cmake issue can be addressed
by swapping the current inner loop over alternate locations with the current
outer loop over alternate names that is presumably used by the CMake code
that implements the FIND_XXX commands.  I suspect large changes in code may
be involved to swap those two loops so I don't know how motivated the CMake
developers will be to fix the issue, but we will see.

Meanwhile, I am thankful that Geoff found a workaround for this cmake bug so
he could access Tcl8.4 in a non-standard location and replicate and fix the
Tcl8.4 issue I found for example 19.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------

_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to