[Cppcms-users] cppcms doesn't seem to honor my -DCMAKE_LIBRARY_PATH option to cmake
Brought to you by:
artyom-beilis
|
From: Ross R. <ros...@gm...> - 2013-09-27 00:26:26
|
I am a newb to both cppcms and cmake. I have to compile with tar-balls,
because I am in a corporate linux environment.
That said, my "-DCMAKE_LIBRARY_PATH" option doesn't seem to be honored. I
run cmake from the suggested build directory like:
/usr/intel/pkgs/cmake/2.8.10.2/bin/cmake -DCMAKE_CXX_FLAGS='-fpermissive'
-DCMAKE_INCLUDE_PATH=/tmp/rbroger1/libgcrypt/include
-DCMAKE_LIBRARY_PATH=/tmp/rbroger1/libgcrypt/lib:/tmp/rbroger1/libgpg-error/lib
..
(The -fpermissive switch is necessary due to using the 4.8.1 version of
gcc. Also, I'm doing a trial installation in a temporary area.)
cmake goes on its merry way and then I run
make VERBOSE=1
The header files seem to be found locally, because I no longer get
complaints about missing function signatures, but when it goes to the
linker it complains about missing symbols:
/nfs/pdx/itools/em64t_SLES10/pkgs/cmake/2.8.10.2/bin/cmake -E
cmake_link_script CMakeFiles/cache_backend_test.dir/link.txt --verbose=1
/usr/bin/c++ -fpermissive -Wall -Wextra -O2 -g -DNDEBUG
CMakeFiles/cache_backend_test.dir/tests/cache_backend_test.cpp.o -o
cache_backend_test -rdynamic libcppcms.so.1.0.4 booster/libbooster.so.0.0.2
-lpthread -lpcre -lgcrypt -ldl -lz
-Wl,-rpath,/tmp/rbroger1/cppcms-1.0.4/build:/tmp/rbroger1/cppcms-1.0.4/build/booster
If I run strace -o log -f make VERBOSE=1 and look at which directories are
being scanned for libgcrypt.so, it seems to be looking at the corporate NFS
installation:
26940
open("/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/libgcrypt.so",
O_RDONLY) = 13
If I run the line that it is trying to run with a tweak, then the compile
works for that one line:
/nfs/pdx/itools/em64t_SLES10/pkgs/cmake/2.8.10.2/bin/cmake -E
cmake_link_script CMakeFiles/cache_backend_test.dir/link.txt --verbose=1
/usr/bin/c++ -fpermissive -Wall -Wextra -O2 -g -DNDEBUG
CMakeFiles/cache_backend_test.dir/tests/cache_backend_test.cpp.o -o
cache_backend_test -rdynamic libcppcms.so.1.0.4 booster/libbooster.so.0.0.2
-lpthread -lpcre -lgcrypt -ldl -lz
-Wl,-rpath,/tmp/rbroger1/cppcms-1.0.4/build:/tmp/rbroger1/cppcms-1.0.4/build/booster
-L
/tmp/rbroger1/libgcrypt/lib
How can I get the cppcms build flow to look in my specific library
directories first?
- Ross
|