[Gmsh] gmsh segfaulting on simple file

Crni Gorac cgorac at gmail.com
Wed Jun 2 11:28:16 CEST 2010


On Wed, Jun 2, 2010 at 10:29 AM, David Colignon
<David.Colignon at ulg.ac.be> wrote:
>
>
> Yes, CMake should refuse to build the Gmsh executable is Lapack is not
> detected and tested, but as long as you cannot indicate to CMake how to find
> a working Lapack library and you get the "Error   : Singular valu
> decomposition requires LAPACK" messages, you will have problems.
>
> Have you tried
>
> cmake -DCMAKE_PREFIX_PATH:string="/path/to/lapack/" ?
>
> It also could be a 32/64 bit version problem ...

My system is 64-bit only (it's Slackware 13.1), so I don't have
anything 32-bit at all.  I've tried with CMAKE_PREFIX_PATH too, no
difference this way (and it should not be, as ATLAS/LAPACK libraries
are installed in /usr/lib64, together with all other system libraries
on the system).  However, I found following in the CMakeError.log:

--------------------------------------------------------------------------
Determining if the Fortran cblas_dgemm exists failed with the following output:
Change Dir: /tmp/gmsh-2.4.2-source/Build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory `/tmp/gmsh-2.4.2-source/Build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/tmp/gmsh-2.4.2-source/Build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building Fortran object CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o
/usr/bin/gfortran  -o
CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o   -c
/tmp/gmsh-2.4.2-source/Build/CMakeFiles/CMakeTmp/testFortranCompiler.f
Linking Fortran executable cmTryCompileExec
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
/usr/bin/gfortran
CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o  -o
cmTryCompileExec -rdynamic /usr/lib64/libcblas.so
/usr/lib64/libf77blas.so /usr/lib64/libatlas.so
CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o: In function `MAIN__':
testFortranCompiler.f:(.text+0x19): undefined reference to `cblas_dgemm_'
collect2: ld returned 1 exit status
gmake[1]: Leaving directory `/tmp/gmsh-2.4.2-source/Build/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTryCompileExec] Error 1
gmake: *** [cmTryCompileExec/fast] Error 2

Determining if the function pthread_create exists in the pthreads failed with th
e following output:
Change Dir: /tmp/gmsh-2.4.2-source/Build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory `/tmp/gmsh-2.4.2-source/Build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/tmp/gmsh-2.4.2-source/Build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o
/usr/bin/gcc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o
CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o   -c
/usr/share/cmake-2.8/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
/usr/bin/gcc     -DCHECK_FUNCTION_EXISTS=pthread_create
CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o  -o
cmTryCompileExec -rdynamic -lpthreads
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../x86_64-slackware-linux/bin/ld:
cannot find -lpthreads
collect2: ld returned 1 exit status
gmake[1]: Leaving directory `/tmp/gmsh-2.4.2-source/Build/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTryCompileExec] Error 1
gmake: *** [cmTryCompileExec/fast] Error 2
--------------------------------------------------------------------------

I guess I'll have to examine further now where these problems come
from, but still: there is no "REQUIRED" option in "FindPackage(BLAS)"
statement in CMake build script for gmsh, and also from what follows
this statement I'd say gmsh is supposed to be built even without
BLAS/LAPACK support, so I'm wondering does this really have anything
to do with the segmentation fault errors I'm encountering?

Regards.