Kreuzfeld
Kreuzfeld

Reputation: 33

RedHat MultiNest: failed install, issue with CMake/BLAS/LAPACK (or pthreads)

I am trying to install MultiNest on my desktop running Enterprise Red Hat 6.6 (Santiago). I downloaded the necessary package (MultiNest_v3.9_CMake.tar.gz), and followed the installation instructions:

cd MultiNest/build
cmake ..

Although BLAS and LAPACK are installed, I get the following errors:

CMake Error at /usr/share/cmake/Modules/FindBLAS.cmake:594 (message): A required library with BLAS API not found. Please specify library location. Call Stack (most recent call first): /usr/share/cmake/Modules/FindLAPACK.cmake:142 (find_package) src/CMakeLists.txt:31 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred! See also "/home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeOutput.log". See also "/home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeError.log".

Any suggestions?

The output "CmakeError.log" is below, and seems to indicate that the problem instead involves something called "pthreads".


Determining if the pthread_create exist failed with the following output: Change Dir: /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTryCompileExec4203479411/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec4203479411.dir/build.make CMakeFiles/cmTryCompileExec4203479411.dir/build gmake[1]: Entering directory /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp' /usr/local/bin/cmake -E cmake_progress_report /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec4203479411.dir/CheckSymbolExists.c.o /usr/local/Ureka/python/bin/gcc -o CMakeFiles/cmTryCompileExec4203479411.dir/CheckSymbolExists.c.o -c /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTryCompileExec4203479411 /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec4203479411.dir/link.txt --verbose=1 /usr/local/Ureka/python/bin/gcc CMakeFiles/cmTryCompileExec4203479411.dir/CheckSymbolExists.c.o -o cmTryCompileExec4203479411 -rdynamic CMakeFiles/cmTryCompileExec4203479411.dir/CheckSymbolExists.c.o: In functionmain': CheckSymbolExists.c:(.text+0xc): undefined reference to pthread_create' collect2: ld returned 1 exit status gmake[1]: Leaving directory/home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp' gmake[1]: * [cmTryCompileExec4203479411] Error 1 gmake: * [cmTryCompileExec4203479411/fast] Error 2

File /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */

include

int main(int argc, char** argv) { (void)argv;

ifndef pthread_create

return ((int*)(&pthread_create))[argc];

else

(void)argc; return 0;

endif

}

Determining if the function pthread_create exists in the pthreads failed with the following output: Change Dir: /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTryCompileExec3959414027/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec3959414027.dir/build.make CMakeFiles/cmTryCompileExec3959414027.dir/build gmake[1]: Entering directory /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp' /usr/local/bin/cmake -E cmake_progress_report /home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec3959414027.dir/CheckFunctionExists.c.o /usr/local/Ureka/python/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec3959414027.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake-3.1/Modules/CheckFunctionExists.c Linking C executable cmTryCompileExec3959414027 /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3959414027.dir/link.txt --verbose=1 /usr/local/Ureka/python/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec3959414027.dir/CheckFunctionExists.c.o -o cmTryCompileExec3959414027 -rdynamic -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: ld returned 1 exit status gmake[1]: Leaving directory/home/ianc/Downloads/MultiNest/build/CMakeFiles/CMakeTmp' gmake[1]: * [cmTryCompileExec3959414027] Error 1 gmake: * [cmTryCompileExec3959414027/fast] Error 2

Upvotes: 0

Views: 768

Answers (2)

j13r
j13r

Reputation: 2671

Install these libraries and their devel versions for the build headers

libblas{3,-dev} liblapack{3,-dev} libatlas{3-base,-dev} cmake build-essential gfortran

You can also try installing compat packages.

Upvotes: 1

bkloppenborg
bkloppenborg

Reputation: 101

The error above indicates that the POSIX threading library, libpthreads, cannot be found on your system. This error originates from your system-provided FindLAPACK.cmake script rather than from something in the MultiNest package.

I don't know the specific library which provides this on RedHat, but you should be able to check using yum provides pthread. After this you can install it using yum install M where M is whatever library provides libpthread from the previous command.

Upvotes: 0

Related Questions