我正在尝试安装SymPol,SymPol要求:
Boost in version 1.34.1 or higher
GMP with both C and C++ bindings
CMake in version 2.6 or higher
我安装了所有这3个,这是安装SymPol的命令:
~/sympol$ mkdir build && cd build
~/sympol/build$ cmake -DCMAKE_BUILD_TYPE=Release ..
~/sympol/build$ make
# as root or in su/sudo shell
~/sympol/build$ make install
现在在上述步骤中,当我做出错误提示时:
/usr/bin/ld: cannot find -llrsgmp
/usr/bin/ld: cannot find -lcddgmp
collect2: error: ld returned 1 exit status
CMakeFiles/sympol.dir/build.make:369: recipe for target libsympol.so.0.1.8 failed
make[2]: *** [libsympol.so.0.1.8] Error 1
CMakeFiles/Makefile2:109: recipe for target 'CMakeFiles/sympol.dir/all' failed
make[1]: *** [CMakeFiles/sympol.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
我应该在使用时在步骤2中提到
cmake -DCMAKE_BUILD_TYPE=Release ..
我收到了一些警告,例如:
CMake Warning (dev) at CMakeLists.txt:73 (add_executable):
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 "sympolbin" links to some libraries for which the linker
must search:
lrsgmp, cddgmp
and other libraries with known full path:
/home/naghme/Templates/Sympol/sympol-0.1.8/sympol/build/libsympol.so.0.1.8
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.