On Fri, Apr 24, 2009 at 12:58:53PM -0500, Geoffrey Furnish wrote:
> Hi guys,
> 
> I'm having some problems building.  Trying not to look too stupid here...
> 
> I've built Tcl and Tk and installed them to $HOME/plplot/t4/install.  Then I
> configure plplot thusly:
> 
> % cmake -DCMAKE_INSTALL_PREFIX=$HOME/plplot/t4/install  
> -DCMAKE_LIBRARY_PATH=$HOME/plplot/t4/install/lib -DENABLE_tcl=ON .. 
> -DENABLE_tk=on |& tee cmake.out
> 
> I find some perplexing things in cmake.out.  We have:
> 
>  > -- Looking for include paths and libraries for Tcl/Tk
>  > -- Looking for include paths and libraries for Tcl/Tk - found
>  > -- Looking for tclsh
>  > -- Looking for tclsh - found
>  > -- TCL_TCLSH = /usr/bin/tclsh
>  > -- HAVE_TCL_GT_84 = 0
>  > -- TCL_INCLUDE_PATH = /home/furnish/plplot/t4/install/include
>  > -- TCL_LIBRARY = /usr/lib64/libtcl8.4.so
>  > -- TK_INCLUDE_PATH = /home/furnish/plplot/t4/install/include;/usr/include
>  > -- TK_LIBRARY = 
> /usr/lib64/libtk8.4.so;/usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so
> 
> Question: Why doesn't cmake pick the libtk which is in my
> $CMAKE_LIBRARY_PATH/lib?  It's definitely there:
> 
> % pwd
> /home/furnish/plplot/t4/install/lib
> % ls
> libtcl8.4.so     libtk8.4.so     tcl8.4        tk8.4        x64gcc   x64icc
> libtclstub8.4.a  libtkstub8.4.a  tclConfig.sh  tkConfig.sh  x64gccg
> 
> Further down, I find this:
> 
>  > Install location variables which can be set by the user:
>  > CMAKE_INSTALL_PREFIX:      /home/furnish/plplot/t4/install
>  > CMAKE_INSTALL_EXEC_PREFIX  /usr/local
>  > CMAKE_INSTALL_BINDIR       /usr/local/bin
>  > CMAKE_INSTALL_DATADIR      /usr/local/share
>  > CMAKE_INSTALL_LIBDIR       /usr/local/lib
>  > CMAKE_INSTALL_INCLUDEDIR   /usr/local/include
>  > CMAKE_INSTALL_INFODIR      /usr/local/share/info
>  > CMAKE_INSTALL_MANDIR       /usr/local/share/man
> 
> Why aren't these dirs properly initialized as subdirs of
> CMAKE_INSTALL_PREFIX?  
> 
> Based on this, a very unsurprising result is:
> 
>  > [100%] Built target plplot_jar
>  > [100%] Built target pltcl
>  > [100%] Built target pltek
>  > Install the project...
>  > -- Install configuration: ""
>  > CMake Error at cmake_install.cmake:36 (FILE):
>  >   file cannot create directory: /usr/local/share/doc/plplot.  Maybe need
>  >   administrative privileges.
> 
> Well, I didn't want the install putting things up into /usr/local, that's why
> I set CMAKE_INSTALL_PREFIX on the cmake invocation line.
> 
> These seems like build system bugs to me.  But maybe it's user error?  Am I
> doing something wrong here?
> 
> Please advise.
> 
> BTW, my years old version of PLplot which I use at work, does not behave this
> way.  Setting CMAKE_INSTALL_PREFIX used to work, long long ago.
> 
> BTW #2:  It doesn't seem to me like you should have to set CMAKE_LIBRARY_PATH
> if you want something other than CMAKE_INSTALL_PREFIX/lib.  Why isn't
> CMAKE_INSTALL_PREFIX/lib the default for CMAKE_LIBRARY_PATH?  But in any
> event, it was ignored.
> 
> BTW #3:  The cmake version in use is 2.6.3, if it matters.

Geoffrey,

Just one thought. I use CMAKE_INSTALL_PREFIX all the time and it has always 
just 
worked for me. Are you sure you are working in a completely clean build tree?
Resetting CMAKE_INSTALL_PREFIX in an old tree does not automatically update
all the other CMAKE_INSTALL_xxx variables. Cmake caches a lot of variables to 
speed 
up subsequent runs. This doesn't work if things like paths, locations and
software versions change. I suspect the tcl / tk issues have the same cause.

Try with a clean build tree.

Andrew





------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to