Closed beew closed 6 years ago
Did you try to set SuiteSparse_DIR in CMake to the directory where SuiteSparse was built?
I set it to the SuiteSparse install directory (with subdirectories lib, include, share) there is no cmake file.
I am not sure why I am supposed to keep the build directory after make install.
I mean setting the cmake variable SuiteSparse_DIR
to the directory where you built the lib. Something like -DSuiteSparse_DIR=XXXX
I did
-DSuiteSparse_DIR=$HOME/opt/suitesparse
it is where suitesparse is installed, not where it is built, I deleted the built directory since normally there is no reason to keep the build directory around once the software is installed. Still get same error
Using CCMAKE (gui) to set SuiteSparse directory and it just says doesn't found after configure (pressing c)
Indeed had I installed suitesparse from repository there won't even be an install folder but the files would be in /usr/lib and /usr/include. I don't think it is reasonable for the install script to look for suitesparse' build directory instead of just linking to the required .so files or .h files once it is told where they are,
It would help if you have the output of the cmake configuration step for the examples of Surface_mesh_parametrization
.
Note that you could you just try configuring the examples in Surface_mesh_parametrization
(setting CGAL_DIR to the patch where you compile the CGAL lib and calling cmake on examples/Surface_mesh_parametrization
.
The cmake configuration for Surface_mesh_parametrization
Configuring test in test/Surface_mesh_parameterization
-- Build type: Release
-- USING CXXFLAGS = ' -O3 -DNDEBUG'
-- USING LDFLAGS = ' '
-- Code taken from Git branch: n/a
-- Requested component: MPFI
-- UseMPFI
-- MPFI include: /usr/include
-- MPFI definitions:
-- MPFI libraries: /usr/lib/x86_64-linux-gnu/libmpfi.so
-- Configured MPFI from UseLIB-file: CGAL_UseMPFI
-- Requested component: MPFR
-- Requested component: GMP
-- Requested component: NTL
-- Found Eigen3: /usr/include/eigen3 (found suitable version "3.3.2", minimum required is "3.1.0")
That doesn't seem to have any problem. I think the issue is right before make examples failed
undefined reference to `umfpack_di_solve'
collect2: error: ld returned 1 exit status
examples/Surface_mesh_parameterization/CMakeFiles/orbifold.dir/build.make:109: recipe for target 'examples/Surface_mesh_parameterization/orbifold' failed
I have google 'undefined reference to `umfpack_di_solve' and find a bunch of hits but the solutions fly through my head and seem would involve editing some config files in the make files (cmake files?) for the example in question
There is a mismatch between Configuring test in test/Surface_mesh_parameterization
and examples/Surface_mesh_parameterization
in your report.
Here is the interesting part when I configure examples:
-- SuiteSparse_LIBS: optimized;/usr/lib/x86_64-linux-gnu/libamd.so;debug;/usr/lib/x86_64-linux-gnu/libcamd.so;/usr/lib/x86_64-linux-gnu/libccolamd.so;/usr/lib/x86_64-linux-gnu/libcolamd.so;/usr/lib/x86_64-linux-gnu/libcholmod.so;/usr/lib/x86_64-linux-gnu/libspqr.so;/usr/lib/x86_64-linux-gnu/libldl.so;/usr/lib/x86_64-linux-gnu/libbtf.so;/usr/lib/x86_64-linux-gnu/libklu.so;/usr/lib/x86_64-linux-gnu/libcxsparse.so;/usr/lib/x86_64-linux-gnu/libumfpack.so;/usr/lib/libblas.so;/usr/lib/liblapack.so
-- Orbifold Tutte Embeddings will use UmfPackLU
Ah, good catch.
But the suitesparse libs are not in /usr/lib/x86_64-linux-gnu/ they are in /usr/local/lib/suitesparse (symlinked to $HOME/opt/suitesparse)
How can I make cgal see that?
I'm asking for your cmake output because if the compilation of the example using SuiteSparse is activated it means cmake found it. Then we need to check what's library cmake associated to it.
If it is not using umfpack then why did I get 'undefined reference to `umfpack_di_solve'?
:) I don't know, which is why if I don't have your cmake output it will be hard to help you.
Do you mean this?
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_examples=true -DWITH_demos=true -DWITH_BLAS=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda -DCUDA_SDK_ROOT_DIR=$HOME/opt/cuda-samples/common -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON WITH_CGAL_ImageIO=ON -DWITH_CGAL_Qt5=ON -DWITH_GMP=ON -DWITH_LAPACK=ON -DWITH_MPFI=ON -DWITH_MPFR=ON -DWITH_NTL=ON -DWITH_OpenGL=ON -DWITH_ZLIB=ON -DWITH_QGLViewer=ON -DWITH_CGAL_Core=ON -DQGLVIEWER_INCLUDE_DIR=/home/bernard/opt/libQGLViewer/include -DQGLVIEWER_LIBRARY_RELEASE=/home/bernard/opt/libQGLViewer/lib/libQGLViewer-qt5.so -DCIMG_INCLUDE_DIR=/home/bernard/opt/cimg -DWITH_tests=ON -DSuiteSparse_DIR=$HOME/opt/suitesparse/lib ..
== CMake setup ==
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- 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
-- 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
== CMake setup (DONE) ==
== Setting paths ==
-- Build CGAL from n/a-branch: n/a
-- Removed not-a-package: .gitattributes;.github;.gitignore;.travis;.travis.yml;CGALConfig.cmake;Documentation;INSTALL.md;LICENSE.md;Miscellany;README.md;build;cmake_uninstall.cmake.in
-- Installation package directory: /home/bernard/Downloads/cgal-releases-CGAL-4.12.1/Installation
-- Maintenance package directory: /home/bernard/Downloads/cgal-releases-CGAL-4.12.1/Maintenance
-- Core package directory: /home/bernard/Downloads/cgal-releases-CGAL-4.12.1/Core
-- Packagenames: AABB_tree;Advancing_front_surface_reconstruction;Algebraic_foundations;Algebraic_kernel_d;Algebraic_kernel_for_circles;Algebraic_kernel_for_spheres;Alpha_shapes_2;Alpha_shapes_3;Apollonius_graph_2;Arithmetic_kernel;Arrangement_on_surface_2;BGL;Barycentric_coordinates_2;Boolean_set_operations_2;Bounding_volumes;Box_intersection_d;CGAL_Core;CGAL_ImageIO;CGAL_ipelets;Cartesian_kernel;Circular_kernel_2;Circular_kernel_3;Circulator;Classification;Combinatorial_map;Cone_spanners_2;Convex_decomposition_3;Convex_hull_2;Convex_hull_3;Convex_hull_d;Distance_2;Distance_3;Envelope_2;Envelope_3;Filtered_kernel;Generalized_map;Generator;Geomview;GraphicsView;HalfedgeDS;Hash_map;Homogeneous_kernel;Inscribed_areas;Installation;Interpolation;Intersections_2;Intersections_3;Interval_skip_list;Interval_support;Inventor;Jet_fitting_3;Kernel_23;Kernel_d;LEDA;Linear_cell_complex;MacOSX;Maintenance;Matrix_search;Mesh_2;Mesh_3;Mesher_level;Minkowski_sum_2;Minkowski_sum_3;Modifier;Modular_arithmetic;Nef_2;Nef_3;Nef_S2;NewKernel_d;Number_types;OpenNL;Operations_on_polyhedra;Optimal_transportation_reconstruction_2;Optimisation_basic;Partition_2;Periodic_2_triangulation_2;Periodic_3_triangulation_3;Point_set_2;Point_set_3;Point_set_processing_3;Point_set_shape_detection_3;Poisson_surface_reconstruction_3;Polygon;Polygon_mesh_processing;Polyhedron;Polyhedron_IO;Polyline_simplification_2;Polynomial;Polytope_distance_d;Principal_component_analysis;Principal_component_analysis_LGPL;Profiling_tools;Property_map;QP_solver;Random_numbers;Ridges_3;STL_Extension;Scale_space_reconstruction_3;Scripts;SearchStructures;Segment_Delaunay_graph_2;Segment_Delaunay_graph_Linf_2;Set_movable_separability_2;Skin_surface_3;Snap_rounding_2;Solver_interface;Spatial_searching;Spatial_sorting;Straight_skeleton_2;Stream_lines_2;Stream_support;Subdivision_method_3;Surface_mesh;Surface_mesh_deformation;Surface_mesh_parameterization;Surface_mesh_segmentation;Surface_mesh_shortest_path;Surface_mesh_simplification;Surface_mesh_skeletonization;Surface_mesher;Surface_sweep_2;TDS_2;TDS_3;Testsuite;Three;Triangulation;Triangulation_2;Triangulation_3;Union_find;Visibility_2;Voronoi_diagram_2;wininst
== Setting paths (DONE) ==
== Generate version files ==
-- CGAL_VERSION is 4.12.1-I-900
-- CGAL_VERSION_NR is 1041210900
-- CGAL_GIT_HASH is
-- CGAL_CREATED_SVN_REVISION is 99999 (dummy)
-- CGAL_MAJOR_VERSION=4
-- CGAL_MINOR_VERSION=12
-- CGAL_BUGFIX_VERSION=1
-- CGAL_BUILD_VERSION=900
-- CGAL_SONAME_VERSION=13
-- CGAL_SOVERSION =13.0.2
-- CGAL_REFERENCE_CACHE_DIR=
-- Building shared libraries
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- USING CMake version: 3.5.1
-- System: Linux
-- USING GCC_VERSION = '5.4.0 20160609'
-- Using gcc version 4 or later. Adding -frounding-math
== Generate version files (DONE) ==
-- Build type: Release
-- USING CXXFLAGS = ' -O3 -DNDEBUG'
-- USING LDFLAGS = ' '
== 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 ...
-- Found GMP: /usr/local/lib/libgmp.so
-- GMP has been preconfigured:
-- UseGMP-file:
-- GMP include: /usr/local/include
-- GMP libraries: /usr/local/lib/libgmp.so
-- GMP definitions:
-- USING GMP_VERSION = '6.1.2'
-- Preconfiguring library: MPFR ...
-- Found MPFR: /usr/lib/x86_64-linux-gnu/libmpfr.so
-- MPFR has been preconfigured:
-- UseMPFR-file:
-- MPFR include: /usr/include
-- MPFR libraries: /usr/lib/x86_64-linux-gnu/libmpfr.so
-- MPFR definitions:
-- USING MPFR_VERSION = '3.1.4'
-- Preconfiguring library: ZLIB ...
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- ZLIB has been preconfigured:
-- UseZLIB-file:
-- ZLIB include: /usr/include
-- ZLIB libraries: /usr/lib/x86_64-linux-gnu/libz.so
-- ZLIB definitions:
-- Preconfiguring library: OpenGL ...
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- OpenGL has been preconfigured:
-- UseOpenGL-file:
-- OpenGL include:
-- OpenGL libraries:
-- OpenGL definitions:
-- Preconfiguring library: MPFI ...
-- Found MPFI: /usr/lib/x86_64-linux-gnu/libmpfi.so
-- USING MPFR_VERSION = '3.1.4'
-- USING MPFI_VERSION = '1.5.1'
-- MPFI has been preconfigured:
-- UseMPFI-file: CGAL_UseMPFI
-- MPFI include: /usr/include
-- MPFI libraries: /usr/lib/x86_64-linux-gnu/libmpfi.so
-- MPFI definitions:
-- Preconfiguring library: BLAS ...
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- A library with BLAS API found.
-- BLAS has been preconfigured:
-- UseBLAS-file: CGAL_UseBLAS
-- BLAS include:
-- BLAS libraries: /usr/lib/libblas.so;/usr/lib/x86_64-linux-gnu/libf2c.so
-- BLAS definitions: -DBLAS_USE_F2C
-- Preconfiguring library: LAPACK ...
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- LAPACK has been preconfigured:
-- UseLAPACK-file: CGAL_UseLAPACK
-- LAPACK include:
-- LAPACK libraries: /usr/local/lib/liblapack.so;/usr/lib/x86_64-linux-gnu/libf2c.so
-- LAPACK definitions: -DLAPACK_USE_F2C
-- Preconfiguring library: QGLViewer ...
-- Found QGLViewer: Qt5::Xml;Qt5::OpenGL;/usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGL.so;/home/bernard/opt/libQGLViewer/lib/libQGLViewer-qt5.so
-- QGLViewer has been preconfigured:
-- UseQGLViewer-file:
-- QGLViewer include: /home/bernard/opt/libQGLViewer/include
-- QGLViewer libraries: Qt5::Xml;Qt5::OpenGL;/usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGL.so;/home/bernard/opt/libQGLViewer/lib/libQGLViewer-qt5.so
-- QGLViewer definitions:
-- Preconfiguring library: NTL ...
-- USING GMP_VERSION = '6.1.2'
-- DETECTED NTL_VERSION = '6.2.0'
-- Found NTL: /usr/lib/libntl.so
-- NTL has been preconfigured:
-- UseNTL-file:
-- NTL include: /usr/include
-- NTL libraries: /usr/lib/libntl.so
-- NTL definitions:
-- __cplusplus is 199711
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- thread
-- system
-- chrono
-- date_time
-- atomic
-- Boost include dirs: /usr/include
-- Boost libraries: /usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libpthread.so
== Detect external libraries (DONE) ==
== Write compiler_config.h ==
-- 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_NO_LIMITS - Success
-- Performing Test CGAL_CFG_NO_NEXTAFTER - Success
-- Performing Test CGAL_CFG_NO_STL - 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
-- Using gcc version 4 or later. Adding -frounding-math
-- USING GMP_VERSION = '6.1.2'
-- USING MPFR_VERSION = '3.1.4'
-- USING BOOST_VERSION = '1.58.0'
libCGAL is configured
-- Sources for CGAL component library 'CGAL_Core' detected
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- thread
-- system
-- chrono
-- date_time
-- atomic
Configuring libCGAL_Core
libCGAL_Core is configured
-- Sources for CGAL component library 'CGAL_ImageIO' detected
Configuring libCGAL_ImageIO
-- USING ZLIB_VERSION = '1.2.8'
libCGAL_ImageIO is configured
-- Sources for CGAL component library 'CGAL_Qt5' detected
Configuring libCGAL_Qt5
-- USING Qt5_VERSION = '5.9.6'
libCGAL_Qt5 is configured
-- Sources for CGAL component libraries 'CGAL_Core;CGAL_ImageIO;CGAL_Qt5' detected
== Generating build files (DONE) ==
== Generating build files for examples ==
Then for
-- Configuring examples in examples/Surface_mesh_parameterization
-- Build type: Release
-- USING CXXFLAGS = ' -O3 -DNDEBUG'
-- USING LDFLAGS = ' '
-- Code taken from Git branch: n/a
-- Requested component: MPFI
-- UseMPFI
-- MPFI include: /usr/include
-- MPFI definitions:
-- MPFI libraries: /usr/lib/x86_64-linux-gnu/libmpfi.so
-- Configured MPFI from UseLIB-file: CGAL_UseMPFI
-- Requested component: MPFR
-- Requested component: GMP
-- Requested component: NTL
-- Found Eigen3: /usr/include/eigen3 (found suitable version "3.3.2", minimum required is "3.1.0")
-- SuiteSparse_LIBS: /usr/lib/libblas.so;/usr/local/lib/liblapack.so
-- Orbifold Tutte Embeddings will use UmfPackLU
I am finally able to build all the examples successfully by editing CmakeCache.txt generated from running cmake --options .. I have to manually fill in all the suitesparse filepaths that cmake cannot discover on its own
I have tried cmake option -DSuiteSparse_DIR=$HOME/opt/suitesparse/lib cmake option -DSuiteSparse_DIR=$HOME/opt/suitesparse export LDFLAGS="-L/usr/local/lib/suitesparse" and export LD_LIBRARY_PATH=/usr/local/lib/suitesparse:$LD_LIBRARY_PATH None worked. Though cmake is able to find the headers in /usr/local/include/suitesparse on its own.
Is there a way to make cmake find the filepaths without to edit Cmake.Cache.txt?
Edited: it would also work if I symlink/copy all the contents in $HOME/opt/suitesparse/lib (same as /usr/local/lib/suitesparse, which is a symlink to the former) to /usr/lib/x86_64-linux-gnu/. I did an experiment by just symlinking one file there,--which I later removed,-- and cmake found it, but I would rather not dump files/symlinks all over the places.
But I do have umfpack, only that cmake is not picking it up.
I know, but my guess is that is is not in a standard location, right? If this is the case, then there is no other option but specifying the location of the include files and libraries.
But how to specify the locations of the libraries?
Try setting SuiteSparse_UMF_INCLUDE_DIR and at least one of SuiteSparse_UMFPACK_LIBRARY_RELEASE and SuiteSparse_UMFPACK_LIBRARY_DEBUG to you UMFPACK installation.
That is cmake -DSuiteSparse_UMFPACK_LIBRARY_RELEASE=....
The PR #3331 has been merged, and will be in CGAL-4.13.
I am trying to compile cgal 4.12.1 from source. It built successfully but make examples always failed with these errors
Platform is Ubuntu 16.04 64 bit, Openmesh 7.2 (and tried 7.1 before), gcc 5.4
I built with the cmake command
Not sure if this has to do with anything but ccmake (the cmake gui) complains suitesparse-dir not found . The suitesparse dir is described as a directory that contains a cmake file for suitesparse. But suitesparse doesn't have a cmake file (I compiled suitesparse 5.2 from source it is in my $HOME but it doesn't have a cmake file)