Cmake 在构建 BornAgain 时给我一个错误(pthread_create 未找到)
Cmake gives me an error (pthread_create not found) while building BornAgain
我正在尝试在我的计算机上构建 BornAgain 软件 运行 最新版本的 Fedora 32。我以前设法做到了,但我什至不知道从哪里开始,因为我的错误我越来越。在我的终端中,出现以下错误:
> [sjoerd@dhcp-10-240-34-181 ~]$ sudo cmake -DCMAKE_INSTALL_PREFIX=/home/sjoerd/.BornAgain /home/sjoerd/BornAgain/BornAgain
[sudo] lösenord för sjoerd:
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found FFTW3: /usr/lib64/libfftw3.so
-- Found FFTW3: includes at /usr/include, libraries at /usr/lib64/libfftw3.so
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3")
-- Found GSL: /usr/include (found version "2.6")
-- GSL found=TRUE libs=/usr/lib64/libgsl.so;/usr/lib64/libgslcblas.so inc=/usr/include version={GSL_VERSION}
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "3.3")
-- Eigen3 include_dir=/usr/include/eigen3 version=3.3.7
-- Could NOT find Cerf (missing: Cerf_LIBRARIES Cerf_INCLUDE_DIR)
-- Search cerf in Cerf_LIBRARIES-NOTFOUND
> CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Cerf_LIBRARIES
linked by target "cmTC_6517d" in directory /home/sjoerd/CMakeFiles/CMakeTmp
>
> CMake Error at cmake/extensions/AssertLibraryFunction.cmake:86 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
cmake/extensions/FindCerf.cmake:33 (assert_library_function)
cmake/modules/SearchInstalledSoftware.cmake:21 (find_package)
CMakeLists.txt:64 (include)
>
>
> -- Configuring incomplete, errors occurred!
See also "/home/sjoerd/CMakeFiles/CMakeOutput.log".
See also "/home/sjoerd/CMakeFiles/CMakeError.log".
[sjoerd@dhcp-10-240-34-181 ~]$
我一直在尝试按照他们网页上的说明进行操作:
https://www.bornagainproject.org/documentation/getting-started/installation/linux-detailed/third-party/
https://www.bornagainproject.org/documentation/getting-started/installation/linux-detailed/build-and-install/
我最大的问题是他们有针对 Ubuntu、OpenSUSE och RedHat/CentOS 的说明。我认为罪魁祸首在于他们安装 devtoolset 的说明(试图遵循 RedHat 说明),这在 Fedora 存储库中似乎不存在。我基本上尝试安装任何相关的东西,并尝试了他们为每个发行版命名的所有包,但我无法摆脱上面输入的错误。
谢谢艾尔克!
考虑到 Cerf_LIBRARIES
上的 Ǵoogle 命中率,我不敢相信我实际上花了一半的工作时间在这上面,我认为这是我尝试安装的软件的特定内容。
鉴于您单独格式化了 Cerf
,我用谷歌搜索了一下,很快发现我可以直接从 dnf 包管理器安装 libcerf
和 libcerf-devel
。这立即解决了我的整个问题。感谢您解决了这个令人头疼的问题,我有点傻没有早点发现。
我正在尝试在我的计算机上构建 BornAgain 软件 运行 最新版本的 Fedora 32。我以前设法做到了,但我什至不知道从哪里开始,因为我的错误我越来越。在我的终端中,出现以下错误:
> [sjoerd@dhcp-10-240-34-181 ~]$ sudo cmake -DCMAKE_INSTALL_PREFIX=/home/sjoerd/.BornAgain /home/sjoerd/BornAgain/BornAgain
[sudo] lösenord för sjoerd:
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found FFTW3: /usr/lib64/libfftw3.so
-- Found FFTW3: includes at /usr/include, libraries at /usr/lib64/libfftw3.so
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3")
-- Found GSL: /usr/include (found version "2.6")
-- GSL found=TRUE libs=/usr/lib64/libgsl.so;/usr/lib64/libgslcblas.so inc=/usr/include version={GSL_VERSION}
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "3.3")
-- Eigen3 include_dir=/usr/include/eigen3 version=3.3.7
-- Could NOT find Cerf (missing: Cerf_LIBRARIES Cerf_INCLUDE_DIR)
-- Search cerf in Cerf_LIBRARIES-NOTFOUND
> CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Cerf_LIBRARIES
linked by target "cmTC_6517d" in directory /home/sjoerd/CMakeFiles/CMakeTmp
>
> CMake Error at cmake/extensions/AssertLibraryFunction.cmake:86 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
cmake/extensions/FindCerf.cmake:33 (assert_library_function)
cmake/modules/SearchInstalledSoftware.cmake:21 (find_package)
CMakeLists.txt:64 (include)
>
>
> -- Configuring incomplete, errors occurred!
See also "/home/sjoerd/CMakeFiles/CMakeOutput.log".
See also "/home/sjoerd/CMakeFiles/CMakeError.log".
[sjoerd@dhcp-10-240-34-181 ~]$
我一直在尝试按照他们网页上的说明进行操作:
https://www.bornagainproject.org/documentation/getting-started/installation/linux-detailed/third-party/
https://www.bornagainproject.org/documentation/getting-started/installation/linux-detailed/build-and-install/
我最大的问题是他们有针对 Ubuntu、OpenSUSE och RedHat/CentOS 的说明。我认为罪魁祸首在于他们安装 devtoolset 的说明(试图遵循 RedHat 说明),这在 Fedora 存储库中似乎不存在。我基本上尝试安装任何相关的东西,并尝试了他们为每个发行版命名的所有包,但我无法摆脱上面输入的错误。
谢谢艾尔克!
考虑到 Cerf_LIBRARIES
上的 Ǵoogle 命中率,我不敢相信我实际上花了一半的工作时间在这上面,我认为这是我尝试安装的软件的特定内容。
鉴于您单独格式化了 Cerf
,我用谷歌搜索了一下,很快发现我可以直接从 dnf 包管理器安装 libcerf
和 libcerf-devel
。这立即解决了我的整个问题。感谢您解决了这个令人头疼的问题,我有点傻没有早点发现。