From: Geoffrey F. <Geo...@at...> - 2009-06-18 04:07:56
|
Hi guys, I'm having trouble compiling plplot on Fedora 11. I am at rev 10054. I have built a "prefix" with Tcl/Tk, and Python in it. I run cmake (Fedora 11 provides cmake version 2.6.4) and the subsequent build thusly: cat > run_cmake.sh <<-EOF env PATH=$PREFIX/bin:$PATH \ cmake \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_INCLUDE_PATH=$PREFIX/include \ -DCMAKE_LIBRARY_PATH=$PREFIX/lib \ -DHAVE_QHULL=off \ -DHAVE_PTHREAD=off \ -DENABLE_DYNDRIVERS=off \ -DENABLE_f77=off \ -DENABLE_cxx=off \ -DENABLE_f95=off \ -DENABLE_java=off \ -DENABLE_octave=off \ -DENABLE_ada=off \ -DENABLE_pdl=off \ -DENABLE_wxwidgets=off \ -DENABLE_gnome2=off \ -DENABLE_pygcw=off .. \ | tee cmake.out EOF # Now do the deed. . run_cmake.sh make In the past, this has ensured that cmake finds the versions of the libraries I'm interested in, within my prefix. If you only set CMAKE_INSTALL_PREFIX, and don't also set the CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH, *AND* set your $prefix/bin early in your path, then cmake would not find the right (meaning, the ones you intend, provided in your application-specific prefix) ones. But, the above has worked fairly reliably for me for a couple of years. But now, with F11 (Fedora 11), I find this: ... -- Found PythonInterp: /home/furnish/F11/icf/bin/python2.6 -- Found PythonLibs: /home/furnish/F11/icf/lib/python2.6/config/libpython2.6.a -- Looking for include paths and libraries for Tcl/Tk -- Found Tclsh: /home/furnish/F11/icf/bin/tclsh -- Found TCL: /usr/lib64/libtcl.so -- Found TCLTK: /usr/lib64/libtcl.so -- Found TK: /usr/lib64/libtk.so -- Looking for include paths and libraries for Tcl/Tk - found -- Looking for tclsh -- Looking for tclsh - found -- TCL_INCLUDE_PATH = /home/furnish/F11/icf/include -- TCL_LIBRARY = /usr/lib64/libtcl.so -- Looking for itcl.h -- Looking for itcl.h - found -- Looking for itcl library -- Looking for itcl library - found -- ITCL_INCLUDE_PATH = /home/furnish/F11/icf/include -- ITCL_LIBRARY = /home/furnish/F11/icf/lib/libitcl3.2.so -- TK_INCLUDE_PATH = /home/furnish/F11/icf/include;/usr/include -- TK_LIBRARY = /usr/lib64/libtk.so;-L/usr/lib64;/usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so -- Looking for itk.h -- Looking for itk.h - found -- Looking for itk library -- Looking for itk library - found -- ITK_INCLUDE_PATH = /home/furnish/F11/icf/include -- ITK_LIBRARY = /home/furnish/F11/icf/lib/libitk3.2.so ... Install location variables which can be set by the user: CMAKE_INSTALL_PREFIX: /home/furnish/F11/icf CMAKE_INSTALL_EXEC_PREFIX /home/furnish/F11/icf CMAKE_INSTALL_BINDIR /home/furnish/F11/icf/bin CMAKE_INSTALL_DATADIR /home/furnish/F11/icf/share CMAKE_INSTALL_LIBDIR /home/furnish/F11/icf/lib CMAKE_INSTALL_INCLUDEDIR /home/furnish/F11/icf/include CMAKE_INSTALL_INFODIR /home/furnish/F11/icf/share/info CMAKE_INSTALL_MANDIR /home/furnish/F11/icf/share/man Derived install location variables: DATA_DIR /home/furnish/F11/icf/share/plplot5.8.0-RC1 LIB_DIR /home/furnish/F11/icf/lib INCLUDE_DIR /home/furnish/F11/icf/include/plplot BIN_DIR /home/furnish/F11/icf/bin TCL_DIR /home/furnish/F11/icf/share/plplot5.8.0-RC1/tcl PYTHON_INSTDIR /home/furnish/F11/icf/lib/python2.6/site-packages DRV_DIR /home/furnish/F11/icf/lib/plplot5.8.0-RC1/driversd DOC_DIR /home/furnish/F11/icf/share/doc/plplot MAN_DIR /home/furnish/F11/icf/share/man INFO_DIR /home/furnish/F11/icf/share/info ... PYTHON_EXECUTABLE: /home/furnish/F11/icf/bin/python2.6 PYTHON_INCLUDE_PATH: /home/furnish/F11/icf/include/python2.6;/home/furnish/F11/icf/lib/python2.6/site-packages/numpy/core/include/numpy PYTHON_LIBRARIES: /home/furnish/F11/icf/lib/python2.6/config/libpython2.6.a ... DRIVERS_LIST: cairo;gd;hpgl;mem;null;pbm;ps;svg;tk;tkwin;xfig;xwin DEVICES_LIST: pdfcairo;pngcairo;pscairo;xcairo;png;jpeg;gif;hp7470;hp7580;lj_hpgl;mem;null;pbm;ps;svg;tk;tkwin;xfig;xwin ... Language Bindings: ENABLE_f77: OFF ENABLE_f95: OFF ENABLE_cxx: OFF ENABLE_java: OFF ENABLE_python: ON ENABLE_octave: OFF ENABLE_tcl: ON ENABLE_itcl: ON ENABLE_tk: ON ENABLE_itk: ON ENABLE_pdl: OFF ENABLE_wxwidgets: OFF ENABLE_gnome2: OFF ENABLE_pygcw: OFF ENABLE_ada: OFF ... -- Configuring done CMake Warning (dev) at src/CMakeLists.txt:129 (add_library): Policy CMP0003 should be set before this line. Add code such as if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) endif(COMMAND cmake_policy) as early as possible but after the most recent call to cmake_minimum_required or cmake_policy(VERSION). This warning appears because target "plplotd" links to some libraries for which the linker must search: -lpangocairo-1.0, -lpango-1.0, -lgobject-2.0, -lgmodule-2.0, -lglib-2.0 -lcairo -L/usr/lib64 /usr/lib64/libSM.so, m, m and other libraries with known full path: /home/furnish/icfdev/master/prefix-icf/plplot/tmp/lib/csa/libcsirocsa.so.0.0.1 CMake is adding directories in the second list to the linker search path in case they are needed to find libraries from the first list (for backwards compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for more information. This warning is for project developers. Use -Wno-dev to suppress it. ... Linking C shared library libplplottcltkd.so [ 28%] Built target plplottcltkd Scanning dependencies of target tclIndex_tcl [ 28%] Built target tclIndex_tcl Scanning dependencies of target plserver [ 29%] Building C object bindings/tk/CMakeFiles/plserver.dir/plserver.o Linking C executable plserver ../../src/libplplotd.so.9.3.0: undefined reference to `TclFormatInt' collect2: ld returned 1 exit status make[2]: *** [bindings/tk/plserver] Error 1 make[1]: *** [bindings/tk/CMakeFiles/plserver.dir/all] Error 2 make: *** [all] Error 2 If I then do a make VERBOSE=1, I see this: Linking C executable plserver cd /home/furnish/icfdev/master/prefix-icf/plplot/tmp/bindings/tk && /usr/bin/cmake -E cmake_link_script CMakeFiles/plserver.dir/link.txt --verbose=1 /usr/lib64/ccache/gcc -fPIC CMakeFiles/plserver.dir/plserver.o -o plserver -rdynamic -L/home/furnish/F11/icf/lib -L/home/furnish/icfdev/master/prefix-icf/plplot/tmp/src -L/home/furnish/icfdev/master/prefix-icf/plplot/tmp/bindings/tcl -L/home/furnish/icfdev/master/prefix-icf/plplot/tmp/lib/csa ../../src/libplplotd.so.9.3.0 ../tcl/libplplottcltkd.so.9.2.0 ../../src/libplplotd.so.9.3.0 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lcairo -L/usr/lib64 /usr/lib64/libSM.so -lgd -lpng -lz -ljpeg -L/usr/lib64 /usr/lib64/libSM.so ../../lib/csa/libcsirocsa.so.0.0.1 -lm -L/usr/lib64 -litcl3.2 -ltk -lSM -lICE -lX11 -lXext -litk3.2 ../tcl/libtclmatrixd.so.9.2.0 -ltcl -Wl,-rpath,/home/furnish/icfdev/master/prefix-icf/plplot/tmp/src:/home/furnish/icfdev/master/prefix-icf/plplot/tmp/bindings/tcl:/home/furnish/icfdev/master/prefix-icf/plplot/tmp/lib/csa:/home/furnish/F11/icf/lib ../../src/libplplotd.so.9.3.0: undefined reference to `TclFormatInt' collect2: ld returned 1 exit status make[2]: *** [bindings/tk/plserver] Error 1 make[2]: Leaving directory `/home/furnish/icfdev/master/prefix-icf/plplot/tmp' make[1]: *** [bindings/tk/CMakeFiles/plserver.dir/all] Error 2 make[1]: Leaving directory `/home/furnish/icfdev/master/prefix-icf/plplot/tmp' make: *** [all] Error 2 Oh, and just for grins: % ls ~/F11/icf/lib/libt* /home/furnish/F11/icf/lib/libtcl8.4.so /home/furnish/F11/icf/lib/libtclstub8.4.a /home/furnish/F11/icf/lib/libtk8.4.so /home/furnish/F11/icf/lib/libtkstub8.4.a So, it seems that plplot, with cmake 2.6.4, is wrongly concluding that even though the tcl executables are at ~/F11/icf/bin, and the headers at ~/F11/icf/include, and the corresponding libs are at ~/F11/icf/lib, nevertheless, it wants to use the libs in /usr/lib64. And the above link line shows that the lib search path is wrongly directed to /usr/lib64 before pulling in -ltcl and -ltk. Any suggestions on how to counteract this, and get back to where cmake uses the CMAKE_INSTALL_LIBDIR for resolving the needed libraries? Thanks for any hints/help. -Geoff |