mshr-1.6 cgal compilation problem

Issue #40 resolved
Thomas Hisch created an issue

After a recent system upgrade I can no longer successfully compile mshr. I guess that it has to do with the new cmake version shipped in fedora 23 (cmake 3.4.1) but I'm not sure. Here is the output of make (Note that I also have the output of the successful execution of make (before the system upgrade) a few days ago, if you need it)

 fenics16_petsc36_bemppdevel/mshr/build » make
Scanning dependencies of target tet
[  2%] Building CXX object 3rdparty/tetgen1.5.0/CMakeFiles/tet.dir/tetgen.cxx.o
/home/thomas/miniconda/envs/fenics16_petsc36_bemppdevel/mshr/3rdparty/tetgen1.5.0/tetgen.cxx: In member function int tetgenmesh::add_steinerpt_in_segment(tetgenmesh::face*, int)’:
/home/thomas/miniconda/envs/fenics16_petsc36_bemppdevel/mshr/3rdparty/tetgen1.5.0/tetgen.cxx:19048:7: warning: variable success set but not used [-Wunused-but-set-variable]
   int success;
       ^
[  5%] Building CXX object 3rdparty/tetgen1.5.0/CMakeFiles/tet.dir/predicates.cxx.o
[  8%] Linking CXX static library libtet.a
[  8%] Built target tet
Scanning dependencies of target CGAL-4.6
[ 11%] Creating directories for 'CGAL-4.6'
[ 14%] No download step for 'CGAL-4.6'
[ 17%] No patch step for 'CGAL-4.6'
[ 20%] No update step for 'CGAL-4.6'
[ 22%] Performing configure step for 'CGAL-4.6'
-- The CXX compiler identification is GNU 5.3.1
-- The C compiler identification is GNU 5.3.1
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- 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: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
== Setting paths ==
-- Build CGAL from release in directory CGAL-4.6
-- Packagenames: CGAL-4.6
== Setting paths (DONE) ==

== Generate version files ==
-- CGAL_MAJOR_VERSION=4
-- CGAL_MINOR_VERSION=6
-- CGAL_BUGFIX_VERSION=0
-- CGAL_SONAME_VERSION=11
-- CGAL_SOVERSION     =11.0.0
-- CGAL_REFERENCE_CACHE_DIR=
-- Building static libraries
-- Targetting Unix Makefiles
-- Using /bin/c++ compiler.
-- USING CMake version: 3.4.1
-- System: Linux
-- USING GCC_VERSION = '5.3.1 20151207 (Red Hat 5.3.1-2)'
== Generate version files (DONE) ==

== Set up flags ==
-- Build type: Release
-- USING CXXFLAGS = ' -fPIC -O3 -DNDEBUG'
-- USING LDFLAGS = ' '
== Set up flags (DONE) ==

== Detect external libraries ==
-- External libraries supported: GMP;GMPXX;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
-- Preconfiguring library: GMP ...
-- GMP has been preconfigured:
--   UseGMP-file:      
--   GMP include:      /usr/include
--   GMP libraries:    /lib64/libgmp.so
--   GMP definitions:  
-- USING GMP_VERSION = '6.0.0'
-- Preconfiguring library: MPFR ...
-- MPFR has been preconfigured:
--   UseMPFR-file:      
--   MPFR include:      /usr/include
--   MPFR libraries:    /lib64/libmpfr.so
--   MPFR definitions:  
-- USING MPFR_VERSION = '3.1.3'
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   thread
--   system
-- Boost include:     /usr/include
-- Boost libraries:   /usr/lib64/libboost_thread.so;/usr/lib64/libboost_system.so
-- Boost definitions: 
-- USING BOOST_VERSION = '1.58.0'
== Detect external libraries (DONE) ==

== Write compiler_config.h ==
-- Performing Test CGAL_CFG_BOOST_VARIANT_SWAP_BUG - Success
-- Performing Test CGAL_CFG_DENORMALS_COMPILE_BUG - Success
-- Performing Test CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG - Success
-- Performing Test CGAL_CFG_IEEE_754_BUG - Success
-- Performing Test CGAL_CFG_ISTREAM_INT_BUG - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_5 - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_6 - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_7 - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_8 - Success
-- Performing Test CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG - Success
-- Performing Test CGAL_CFG_NO_LIMITS - Success
-- Performing Test CGAL_CFG_NO_NEXTAFTER - Success
-- Performing Test CGAL_CFG_NO_STL - Success
-- Performing Test CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG - Success
-- Performing Test CGAL_CFG_NUMERIC_LIMITS_BUG - Success
-- Performing Test CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG - Success
-- Performing Test CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG - Success
-- Performing Test CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG - Success
-- Performing Test CGAL_CFG_USING_BASE_MEMBER_BUG_2 - Success
== Write compiler_config.h (DONE) ==

== Generating build files ==
Configuring libCGAL
-- Requested component: MPFR
-- Requested component: GMP
libCGAL is configured
-- Sources for CGAL component library 'CGAL_Qt4/CMakeLists.txt' detected
CMake Error at src/CMakeLists.txt:81 (add_subdirectory):
  add_subdirectory given source
  "/home/thomas/miniconda/envs/fenics16_petsc36_bemppdevel/mshr/3rdparty/CGAL-4.6/src/CGAL_Qt4/CMakeLists.txt"
  which is not an existing directory.
Call Stack (most recent call first):
  src/CMakeLists.txt:140 (configure_component)


-- Sources for CGAL component library 'CGAL_ImageIO/CMakeLists.txt' detected
CMake Error at src/CMakeLists.txt:81 (add_subdirectory):
  add_subdirectory given source
  "/home/thomas/miniconda/envs/fenics16_petsc36_bemppdevel/mshr/3rdparty/CGAL-4.6/src/CGAL_ImageIO/CMakeLists.txt"
  which is not an existing directory.
Call Stack (most recent call first):
  src/CMakeLists.txt:140 (configure_component)


-- Sources for CGAL component library 'CGAL_Core/CMakeLists.txt' detected
CMake Error at src/CMakeLists.txt:81 (add_subdirectory):
  add_subdirectory given source
  "/home/thomas/miniconda/envs/fenics16_petsc36_bemppdevel/mshr/3rdparty/CGAL-4.6/src/CGAL_Core/CMakeLists.txt"
  which is not an existing directory.
Call Stack (most recent call first):
  src/CMakeLists.txt:140 (configure_component)


-- Sources for CGAL component library 'CGAL_Qt3/CMakeLists.txt' detected
CMake Error at src/CMakeLists.txt:81 (add_subdirectory):
  add_subdirectory given source
  "/home/thomas/miniconda/envs/fenics16_petsc36_bemppdevel/mshr/3rdparty/CGAL-4.6/src/CGAL_Qt3/CMakeLists.txt"
  which is not an existing directory.
Call Stack (most recent call first):
  src/CMakeLists.txt:140 (configure_component)


-- Sources for CGAL component libraries 'CGAL_Core/CMakeLists.txt;CGAL_ImageIO/CMakeLists.txt;CGAL_Qt3/CMakeLists.txt;CGAL_Qt4/CMakeLists.txt' detected
== Generating build files (DONE) ==

-- Configuring incomplete, errors occurred!
See also "/home/thomas/miniconda/envs/fenics16_petsc36_bemppdevel/mshr/build/3rdparty/CGAL-4.6-prefix/src/CGAL-4.6-build/CMakeFiles/CMakeOutput.log".
3rdparty/CMakeFiles/CGAL-4.6.dir/build.make:105: recipe for target '3rdparty/CGAL-4.6-prefix/src/CGAL-4.6-stamp/CGAL-4.6-configure' failed
make[2]: *** [3rdparty/CGAL-4.6-prefix/src/CGAL-4.6-stamp/CGAL-4.6-configure] Error 1
CMakeFiles/Makefile2:163: recipe for target '3rdparty/CMakeFiles/CGAL-4.6.dir/all' failed
make[1]: *** [3rdparty/CMakeFiles/CGAL-4.6.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Comments (14)

  1. Johannes Ring

    The problem is with CGAL. Please try the latest development version of mshr. It includes a newer version of CGAL, which should work with CMake 3.4.1.

  2. Thomas Hisch reporter

    The devel version of mshr compiles with fenics-1.6. Therefore this issue can be closed. Thx

  3. Thomas Hisch reporter

    Using the devel version of mshr together with the release build of fenics leads to nasty segfaults even if compilation succeeds. However, it is possible to successfully compile the released version of mshr with an older cmake version, e.g., cmake-3.1.3.

  4. Benjamin Dam Kehlet

    So the problem is with Dolfin 1.6 and the tip of mshr's master branch? Do you have a simple code example that reprouces the issue?

  5. Rafal Skolasinski

    cmake=3.1.3 I don't see available on conda, I tried 2.8.9 though just now. Problem mentioned above didn't appear in this case but I had following problems in the end of compilation: http://pastebin.com/XnGL2Dyw

    Shall I try both older cmake and master branch of mshr?

  6. Thomas Hisch reporter

    Yes, exactly. Try to compile mshr with a recent version of cmake, e.g., 3.4.1. to reproduce the issue.

  7. Thomas Hisch reporter

    @rafal_skolasinski due to issue(s) with the cmake packages shipped with conda, I manually compiled cmake (/bootstrap --system-curl --prefix=/usr/local && make -j8 && sudo make install) I can only speak about cmake version 3.1.3., please try that version and see if that fixes the compilation errors.

  8. Rafal Skolasinski

    Thanks for tips, I found cmake 3.5.0 on conda and trying with that. If it fails I will try to include 3.1.3 tomorrow. (I need to do it through conda cause I need package for our environment).

  9. Rafal Skolasinski

    So... 3.5.0 failed. 3.1.3 failed as well. Here is log from my last attempt using 3.1.3 and master branch of mshr: http://pastebin.com/kMBwvMyM

    It looks now like sightly different error. Maybe I should open an separate issue about it?

  10. smfcoding

    Hi, I run into the same issue today, building fenics with hashdist. The bug is in CGAL's string replace in

    /tmp/mshr-1.6.0/3rdparty/CGAL-4.6/src/CMakeLists.txt
    

    .Here is a diff to fix it.

    121c121,122
    <     string(REPLACE "//CMakeLists.txt" "" CGAL_CONFIGURED_LIBRARY_NAME ${libconfigfile})
    ---
    >     string(REPLACE "/CMakeLists.txt" "" CGAL_CONFIGURED_LIBRARY_NAME ${libconfigfile})
    >     message(${CGAL_CONFIGURED_LIBRARY_NAME})
    

    Since it is marked as resolved with upstream CGAL, I think it still might be useful to fix this. If someone wants to explicit use mshr-1.6.0 with fenics, it builds correctly with it.

    Do I need to report this to CGAL as well?

  11. Log in to comment