[Gmsh] "CMAKE" SUCCEEDS but "MAKE" FAILS for GMSH 3.0.7 (and earlier versions) with MinGW compiler toolchain (gcc 6.4.0) using CYGWIN
John Staples
john.f.staples at gmail.com
Sat Feb 24 17:09:26 CET 2018
Thank you for the advice to use the
-DCMAKE_CXX_COMPILER=/usr/bin/x86_64-w64-mingw32-g++.exe
option on the cmake command line. Your help is very much appreciated.
I am now stumbling on something that may be simple: how to specify the path
to the linker libraries? I am guessing -Dlink_directories(directory1
directory2 ...) but can't find the paths for 'ldl' and 'lcgywin'
as identified in the following:
johnf at INSPI13 /cygdrive/c/gmsh/build
$ make
Scanning dependencies of target gmsh
[ 0%] Building CXX object CMakeFiles/gmsh.dir/Fltk/Main.cpp.o
[ 0%] Building CXX object CMakeFiles/gmsh.dir/Common/GmshGlobal.cpp.o
---
----
[ 99%] Building C object
CMakeFiles/gmsh.dir/contrib/mmg3d/build/sources/analarcutting.c.o
[ 99%] Building C object
CMakeFiles/gmsh.dir/contrib/mmg3d/build/sources/analar.c.o
[100%] Linking CXX executable gmsh.exe
/usr/lib/gcc/x86_64-w64-mingw32/6.4.0/../../../../x86_64-w64-mingw32/bin/ld:
cannot find -ldl
/usr/lib/gcc/x86_64-w64-mingw32/6.4.0/../../../../x86_64-w64-mingw32/bin/ld:
cannot find -ldl
/usr/lib/gcc/x86_64-w64-mingw32/6.4.0/../../../../x86_64-w64-mingw32/bin/ld:
cannot find -lcygwin
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/gmsh.dir/build.make:18362: gmsh.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:420: CMakeFiles/gmsh.dir/all] Error 2
make: *** [Makefile:161: all] Error 2
Thank you again for any hints/assistance.
John
On Thu, Feb 22, 2018 at 3:29 AM, Christophe Geuzaine <cgeuzaine at uliege.be>
wrote:
>
>
> On 19 Feb 2018, at 04:20, John Staples <john.f.staples at gmail.com> wrote:
>
> Greetings All,
>
> Thank you for any help with the following:
>
> On Windows10, I've successfully installed CYGWIN 64bit shell (
> https://cygwin.com/install.html) with FLTK, OPENGL, BLAS, LAPACK, etc..
> (everything but OCC for now)
>
> Make doesn't build - aborts with errors, ‘usleep’ was not declared in
> this scope, etc.
>
> $ make
> Scanning dependencies of target gmsh
> [ 0%] Building CXX object CMakeFiles/gmsh.dir/Fltk/Main.cpp.o
> [ 0%] Building CXX object CMakeFiles/gmsh.dir/Common/GmshGlobal.cpp.o
> In file included from /cygdrive/c/gmsh/Common/onelab.h:40:0,
> from /cygdrive/c/gmsh/Common/onelabUtils.h:9,
> from /cygdrive/c/gmsh/Common/GmshGlobal.cpp:36:
> /cygdrive/c/gmsh/Common/GmshSocket.h: In member function ‘void
> GmshSocket::_Sleep(int)’:
> /cygdrive/c/gmsh/Common/GmshSocket.h:150:21: error: ‘usleep’ was not
> declared in this scope
> usleep(1000 * ms);
> ^
> /cygdrive/c/gmsh/Common/GmshSocket.h: In member function ‘int
> GmshSocket::Select(int, int, int)’:
> /cygdrive/c/gmsh/Common/GmshSocket.h:179:5: error: ‘fd_set’ was not
> declared in this scope
> fd_set rfds;
> ^~~~~~
> /cygdrive/c/gmsh/Common/GmshSocket.h:180:14: error: ‘rfds’ was not
> declared in this scope
> FD_ZERO(&rfds);
> ^~~~
> /cygdrive/c/gmsh/Common/GmshSocket.h:180:18: error: ‘FD_ZERO’ was not
> declared in this scope
> FD_ZERO(&rfds);
> ^
> /cygdrive/c/gmsh/Common/GmshSocket.h:181:20: error: ‘FD_SET’ was not
> declared in this scope
> FD_SET(s, &rfds);
> ^
> /cygdrive/c/gmsh/Common/GmshSocket.h:184:48: error: ‘select’ was not
> declared in this scope
> return select(s + 1, &rfds, NULL, NULL, &tv);
> ^
> make[2]: *** [CMakeFiles/gmsh.dir/build.make:87:
> CMakeFiles/gmsh.dir/Common/GmshGlobal.cpp.o] Error 1
> make[1]: *** [CMakeFiles/Makefile2:420: CMakeFiles/gmsh.dir/all] Error 2
> make: *** [Makefile:161: all] Error 2
>
>
>
>
> Results from "cmake .." command are good:
>
> $ cmake ..
> -- The CXX compiler identification is GNU 6.4.0
> -- The C compiler identification is GNU 6.4.0
> -- Check for working CXX compiler: /usr/bin/c++.exe
> -- Check for working CXX compiler: /usr/bin/c++.exe -- works
>
>
> It seems that you are using the cygwin compilers, not the mingw ones. You
> can specify the compiler with e.g.
>
> cmake -DCMAKE_CXX_COMPILER=/usr/bin/x86_64-w64-mingw32-g++.exe
>
> Christophe
>
>
>
>
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> -- 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
> -- Looking for sys/types.h
> -- Looking for sys/types.h - found
> -- Looking for stdint.h
> -- Looking for stdint.h - found
> -- Looking for stddef.h
> -- Looking for stddef.h - found
> -- Check size of void*
> -- Check size of void* - done
> -- Found 64Bit
> -- Performing Test STDCXX11
> -- Performing Test STDCXX11 - Success
> -- The Fortran compiler identification is GNU 6.4.0
> -- Check for working Fortran compiler: /usr/bin/gfortran.exe
> -- Check for working Fortran compiler: /usr/bin/gfortran.exe -- works
> -- Detecting Fortran compiler ABI info
> -- Detecting Fortran compiler ABI info - done
> -- Checking whether /usr/bin/gfortran.exe supports Fortran 90
> -- Checking whether /usr/bin/gfortran.exe supports Fortran 90 -- yes
> -- Looking for Fortran sgemm
> -- Looking for Fortran sgemm - found
> -- Looking for pthread.h
> -- Looking for pthread.h - found
> -- Looking for pthread_create
> -- Looking for pthread_create - found
> -- Found Threads: TRUE
> -- A library with BLAS API found.
> -- Found Blas
> -- A library with BLAS API found.
> -- Looking for Fortran cheev
> -- Looking for Fortran cheev - found
> -- A library with LAPACK API found.
> -- Found Lapack
> -- Found Mesh
> -- Found Solver
> -- Found Post
> -- Found Plugins
> -- Found Parser
> -- Found Fltk
> -- Using fltk-config script for Fltk 1.3
> -- Found NativeFileChooser
> -- Found ONELAB
> -- Found ONELABMetamodel
> -- Found JPEG: /usr/lib/libjpeg.dll.a
> -- Found Jpeg
> -- Found ZLIB: /usr/lib/libz.dll.a (found version "1.2.11")
> -- Found Zlib
> -- Found PNG: /usr/lib/libpng.dll.a (found version "1.6.34")
> -- Found Png
> -- Found Mpeg
> -- Found OpenGL: /usr/lib/libGL.dll.a
> -- Found OpenGL
> -- System ANN not found: using contrib/ANN instead
> -- Found Ann
> -- Found Bfgs
> -- Found DIntegration
> -- Found OptHom
> -- Found Kbipack
> -- Found GMP
> -- Found MathEx
> -- System METIS not found: using contrib/metis instead
> -- Found Metis
> -- Found TetGen/BR
> -- System voro++ not found: using contrib/voro++ instead
> -- Found Voro++
> -- Found Blossom
> -- Found Netgen
> -- Found Bamg
> -- System MMG3D not found: using contrib/mmg3d instead
> -- Found Mmg3d
> -- HDF5: Using hdf5 compiler wrapper to determine C configuration
> -- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
> -- Found HDF5: hdf5_cpp;hdf5;z;dl;m;/usr/lib/libhdf5_cpp.dll.a;HDF5_hdf5_
> fortran_LIBRARY-NOTFOUND;/usr/lib/libhdf5.dll.a (found version "1.8.20")
> -- System GMM not found: using contrib/gmm instead
> -- Found Gmm
> -- Looking for vsnprintf
> -- Looking for vsnprintf - found
> -- Looking for sys/socket.h
> -- Looking for sys/socket.h - found
> -- Check size of socklen_t
> -- Check size of socklen_t - done
> -- Check size of intptr_t
> -- Check size of intptr_t - done
> -- Looking for dlfcn.h
> -- Looking for dlfcn.h - found
> -- Found Dlopen
> -- Looking for linux/joystick.h
> -- Looking for linux/joystick.h - not found
> -- Performing Test WALL
> -- Performing Test WALL - Success
> -- Performing Test WCAST
> -- Performing Test WCAST - Failed
> -- Performing Test WDEPREC
> -- Performing Test WDEPREC - Success
> -- Performing Test WIND
> -- Performing Test WIND - Success
> -- Performing Test NOWARN
> -- Performing Test NOWARN - Success
> -- Performing Test NOOPT
> -- Performing Test NOOPT - Success
> --
> -- Gmsh 3.0.7 has been configured for Windows64
> --
> -- * Build options: 64Bit Ann Bamg Bfgs Blas Blossom DIntegration Dlopen
> Fltk GMP Gmm Jpeg Kbipack Lapack MathEx Mesh Metis Mmg3d Mpeg
> NativeFileChooser Netgen ONELAB ONELABMetamodel OpenGL OptHom Parser
> Plugins Png Post Solver TetGen/BR Voro++ Zlib
> -- * Build type: RelWithDebInfo
> -- * C compiler: /usr/bin/cc
> -- * C++ compiler: /usr/bin/c++.exe
> -- * Install prefix: /usr/local
> --
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /cygdrive/c/gmsh/build
>
> Any help would be much appreciated.
>
> Thanks,
> Joh
>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>
>
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180224/95649ff4/attachment-0001.html>
More information about the gmsh
mailing list