构建 Dakota 时配置错误
Configure Error when Building Dakota
我正在尝试使用以下 cmake 脚本在 Kubuntu 14.04 下构建 Sandia Lab 的 Dakota 工具包:
cmake \
-D CMAKE_INSTALL_PREFIX:PATH=/usr/local/dakota \
-D CMAKE_BUILD_TYPE:STRING=Release \
-D DAKOTA_HAVE_MPI:BOOL=TRUE \
-D MPI_INCLUDE_PATH="/usr/lib/openmpi/include" \
-D MPI_LIBRARY="/usr/lib/openmpi/lib" \
-D CMAKE_CXX_COMPILER:FILEPATH="/usr/bin/mpicxx" \
-D HAVE_X_GRAPHICS:BOOL=FALSE \
-D Trilinos_DIR:STRING="=/usr/local/trilinos/lib/cmake/Trilinos" \
-D BLAS_LIBS:STRING="/usr/lib/libcblas.so.3" \
-D LAPACK_LIBS:STRING="/usr/lib/lapack.so.3" \
-D Boost_INCLUDE_DIR:STRING="/usr/local/boost/source/boost_1_57_0" \
/usr/local/dakota/dakota-6.1.0.src
但是,配置失败并显示警告
CMake Warning at /usr/local/trilinos/TrilinosConfig.cmake:44 (MESSAGE):
TrilinosConfig.cmake has moved. It now exists at a location under the
installation prefix where the find_package command looks by default (<prefix>/lib/cmake/Trilinos). This compatibility file exists at the old location (<prefix>/include) to present this message and load the file from its new location. The find_package() call that loaded this file did so because its cached result variable, Trilinos_DIR, is set to
/usr/local/trilinos
I'm locally setting Trilinos_DIR to
/usr/local/lib/cmake/Trilinos
and loading TrilinosConfig.cmake from its new location. One may suppress
this warning by setting the above value in the cache. However, the
application needs modification permanently fix the issue. The
find_package() call that loaded this file may have the form
find_package(Trilinos REQUIRED PATHS ${Trilinos_PATH}/include)
Change it to the form
set(CMAKE_PREFIX_PATH ${Trilinos_PATH} ${CMAKE_PREFIX_PATH})
find_package(Trilinos REQUIRED)
to find TrilinosConfig.cmake in its new location in future builds while
still honoring the Trilinos_PATH option for this application.
和错误
CMake Error at /usr/local/trilinos/TrilinosConfig.cmake:66 (INCLUDE):
include could not find load file:
/usr/local/lib/cmake/Trilinos/TrilinosConfig.cmake
因为/usr/local/lib/cmake/Trilinos
下没有Trilinos。不幸的是,我没有足够的经验使用 cmake 来解决这个问题,尽管似乎已经提出了解决方案。谁能带我完成整个过程?
除了Trilinos的问题,cmake也找不到几个(头)文件,即
Looking for pthread_create in pthreads - not found
Looking for include file cxxabi.h - not found
Looking for include file cxxabi.h - not found
Looking for pdb.h - not found
我不确定这是否是一个单独的问题(如果是的话如何解决)。任何帮助将不胜感激。
相关软件版本为cmake 2.8.12.2、boost 1.57.0、openmpi 1.6.5、trilinos 11.14.1
尝试以下 2 个选项。
要么……
修改你的cmake调用,即删除
-D Trilinos_DIR:STRING="=/usr/local/trilinos/lib/cmake/Trilinos" \
或者...
- 找到你的 TrilinosConfig.cmake 所在的位置
修改你的 cmake 调用,即将正确的目录放在你说的地方
-D Trilinos_DIR:STRING="=/usr/local/trilinos/lib/cmake/Trilinos" \
关于你问题的第二部分,首先检查那些headers找不到的事实是否真的影响了你的后续构建。
现在我看到您的命令行中有一个拼写错误,一个伪造的 =
。试试
-D Trilinos_DIR:STRING="/usr/local/trilinos/lib/cmake/Trilinos"
或
-D Trilinos_DIR:STRING="/usr/local/trilinos"
我正在尝试使用以下 cmake 脚本在 Kubuntu 14.04 下构建 Sandia Lab 的 Dakota 工具包:
cmake \
-D CMAKE_INSTALL_PREFIX:PATH=/usr/local/dakota \
-D CMAKE_BUILD_TYPE:STRING=Release \
-D DAKOTA_HAVE_MPI:BOOL=TRUE \
-D MPI_INCLUDE_PATH="/usr/lib/openmpi/include" \
-D MPI_LIBRARY="/usr/lib/openmpi/lib" \
-D CMAKE_CXX_COMPILER:FILEPATH="/usr/bin/mpicxx" \
-D HAVE_X_GRAPHICS:BOOL=FALSE \
-D Trilinos_DIR:STRING="=/usr/local/trilinos/lib/cmake/Trilinos" \
-D BLAS_LIBS:STRING="/usr/lib/libcblas.so.3" \
-D LAPACK_LIBS:STRING="/usr/lib/lapack.so.3" \
-D Boost_INCLUDE_DIR:STRING="/usr/local/boost/source/boost_1_57_0" \
/usr/local/dakota/dakota-6.1.0.src
但是,配置失败并显示警告
CMake Warning at /usr/local/trilinos/TrilinosConfig.cmake:44 (MESSAGE):
TrilinosConfig.cmake has moved. It now exists at a location under the
installation prefix where the find_package command looks by default (<prefix>/lib/cmake/Trilinos). This compatibility file exists at the old location (<prefix>/include) to present this message and load the file from its new location. The find_package() call that loaded this file did so because its cached result variable, Trilinos_DIR, is set to
/usr/local/trilinos
I'm locally setting Trilinos_DIR to
/usr/local/lib/cmake/Trilinos
and loading TrilinosConfig.cmake from its new location. One may suppress
this warning by setting the above value in the cache. However, the
application needs modification permanently fix the issue. The
find_package() call that loaded this file may have the form
find_package(Trilinos REQUIRED PATHS ${Trilinos_PATH}/include)
Change it to the form
set(CMAKE_PREFIX_PATH ${Trilinos_PATH} ${CMAKE_PREFIX_PATH})
find_package(Trilinos REQUIRED)
to find TrilinosConfig.cmake in its new location in future builds while
still honoring the Trilinos_PATH option for this application.
和错误
CMake Error at /usr/local/trilinos/TrilinosConfig.cmake:66 (INCLUDE):
include could not find load file:
/usr/local/lib/cmake/Trilinos/TrilinosConfig.cmake
因为/usr/local/lib/cmake/Trilinos
下没有Trilinos。不幸的是,我没有足够的经验使用 cmake 来解决这个问题,尽管似乎已经提出了解决方案。谁能带我完成整个过程?
除了Trilinos的问题,cmake也找不到几个(头)文件,即
Looking for pthread_create in pthreads - not found
Looking for include file cxxabi.h - not found
Looking for include file cxxabi.h - not found
Looking for pdb.h - not found
我不确定这是否是一个单独的问题(如果是的话如何解决)。任何帮助将不胜感激。
相关软件版本为cmake 2.8.12.2、boost 1.57.0、openmpi 1.6.5、trilinos 11.14.1
尝试以下 2 个选项。
要么……
修改你的cmake调用,即删除
-D Trilinos_DIR:STRING="=/usr/local/trilinos/lib/cmake/Trilinos" \
或者...
- 找到你的 TrilinosConfig.cmake 所在的位置
修改你的 cmake 调用,即将正确的目录放在你说的地方
-D Trilinos_DIR:STRING="=/usr/local/trilinos/lib/cmake/Trilinos" \
关于你问题的第二部分,首先检查那些headers找不到的事实是否真的影响了你的后续构建。
现在我看到您的命令行中有一个拼写错误,一个伪造的 =
。试试
-D Trilinos_DIR:STRING="/usr/local/trilinos/lib/cmake/Trilinos"
或
-D Trilinos_DIR:STRING="/usr/local/trilinos"