optimad / mimmo

Surface manipulation and mesh morphing library
http://optimad.github.io/mimmo
GNU Lesser General Public License v3.0
99 stars 21 forks source link

ClipGeometry build failing #129

Closed roccoarpa closed 4 years ago

roccoarpa commented 4 years ago

I tried ti build with the last commit 85bfe0e

ccmake looks like:

                                                     Page 1 of 1                 │
 BITPIT_DIR                       /usr/local/lib/cmake/bitpit-1.7                │
 BUILD_DOCUMENTATION              OFF                                            │
 BUILD_EXAMPLES                   ON                                             │
 BUILD_SHARED_LIBS                OFF                                            │
 BUILD_XMLTUI                     OFF                                            │
 CMAKE_BUILD_TYPE                 Debug                                          │
 CMAKE_INSTALL_PREFIX             /usr/local                                     │
 MAKE_EXECUTABLE                  /usr/bin/make                                  │
 MIMMO_MODULE_GEOHANDLERS         ON                                             │
 MIMMO_MODULE_IOCGNS              OFF                                            │
 MIMMO_MODULE_IOOFOAM             ON                                             │
 MIMMO_MODULE_IOVTK               ON                                             │
 MIMMO_MODULE_PROPAGATORS         OFF                                            │
 MIMMO_MODULE_UTILS               ON                                             │
 OPENFOAM_API                     1806                                           │
 OPENFOAM_DIR                     /home/s1291/OpenFOAM                           │
 OPENFOAM_DISTRO                  ESI-OpenFOAM-Plus                              │
 PETSC_ARCH                       arch-linux2-c-debug                            │
 PETSC_CURRENT                    ON                                             │
 PETSC_DIR                        /home/s1291/coding/gitProjects/petsc           │
 Qt5Core_DIR                      /opt/Qt5.11.1/5.11.1/gcc_64/lib/cmake/Qt5Core  │
 Qt5Gui_DIR                       /opt/Qt5.11.1/5.11.1/gcc_64/lib/cmake/Qt5Gui   │
 Qt5Sql_DIR                       /opt/Qt5.11.1/5.11.1/gcc_64/lib/cmake/Qt5Sql   │
 Qt5Widgets_DIR                   /opt/Qt5.11.1/5.11.1/gcc_64/lib/cmake/Qt5Widge │
 VERBOSE_MAKE                     OFF                                            │
 VTK_DIR                          /usr/local/lib/cmake/vtk-8.1                   │

But I got the following error:

Scanning dependencies of target IOOFOAM_TARGET_OBJECT
[ 24%] Building CXX object src/ioofoam/CMakeFiles/IOOFOAM_TARGET_OBJECT.dir/IOOFOAM.cpp.o
[ 24%] Building CXX object src/ioofoam/CMakeFiles/IOOFOAM_TARGET_OBJECT.dir/openFoamFiles_native.cpp.o
[ 24%] Built target IOOFOAM_TARGET_OBJECT
Scanning dependencies of target GEOHANDLERS_TARGET_OBJECT
[ 24%] Building CXX object src/geohandlers/CMakeFiles/GEOHANDLERS_TARGET_OBJECT.dir/ClipGeometry.cpp.o
In file included from /usr/include/c++/7/vector:62:0,
                 from /home/s1291/coding/gitProjects/mimmo/src/common/factory.hpp:29,
                 from /home/s1291/coding/gitProjects/mimmo/src/core/BaseManipulation.hpp:27,
                 from /home/s1291/coding/gitProjects/mimmo/src/geohandlers/ClipGeometry.hpp:27,
                 from /home/s1291/coding/gitProjects/mimmo/src/geohandlers/ClipGeometry.cpp:24:
/usr/include/c++/7/bits/stl_construct.h: In instantiation of ‘void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = bitpit::VTKField*]’:
/usr/include/c++/7/bits/stl_construct.h:206:15:   required from ‘void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator<_T2>&) [with _ForwardIterator = bitpit::VTKField*; _Tp = bitpit::VTKField]’
/usr/include/c++/7/bits/stl_vector.h:434:22:   required from ‘std::vector<_Tp, _Alloc>::~vector() [with _Tp = bitpit::VTKField; _Alloc = std::allocator<bitpit::VTKField>]’
/usr/local/include/bitpit/VTK.hpp:302:17:   required from here
/usr/include/c++/7/bits/stl_construct.h:138:5: internal compiler error: Segmentation fault
     }
     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
src/geohandlers/CMakeFiles/GEOHANDLERS_TARGET_OBJECT.dir/build.make:62: recipe for target 'src/geohandlers/CMakeFiles/GEOHANDLERS_TARGET_OBJECT.dir/ClipGeometry.cpp.o' failed
make[2]: *** [src/geohandlers/CMakeFiles/GEOHANDLERS_TARGET_OBJECT.dir/ClipGeometry.cpp.o] Error 1
CMakeFiles/Makefile2:511: recipe for target 'src/geohandlers/CMakeFiles/GEOHANDLERS_TARGET_OBJECT.dir/all' failed
make[1]: *** [src/geohandlers/CMakeFiles/GEOHANDLERS_TARGET_OBJECT.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Originally posted by @s1291 in https://github.com/optimad/mimmo/issues/126#issuecomment-549339698

roccoarpa commented 4 years ago

@s1291, I assume you are on the master branch, is this correct? You are using g++ 7 compiler, is this correct? Please let me know, the i'll check this new issue.

roccoarpa commented 4 years ago

@s1291 may I ask you, before proceeding further, if doing from build folder

make clean && cmake.. && make

get the same compiling error?

roccoarpa commented 4 years ago

@s1291 Anyway, i tested mimmo-master building on CentOS7, with a ccmake configuration like yours, i.e. accounting:

and everything builds fine. Don't know why it triggers errors in stl-vector coming with your compiler. Keep us posted.

s1291 commented 4 years ago

Of course, every time, I try to build, I start from scratch by cleaning the build folder. As I mentioned before I am using the latest master branch of mimmo (See the hash: 85bfe0ee91882751f9406fe9eb1507afe0eaf6a5 ).

I am using the following tools/libraries:

NOTE: In my case I always run ccmake from build folder like this:

ccmake .. -DPETSC_EXECUTABLE_RUNS=ON
s1291 commented 4 years ago

I tried again. This time it builds fine. It's strange!

roccoarpa commented 4 years ago

Good. Maybe some old built portions of code remains appended or cmake vars did not update properly. Sometimes it happens. Closing the issue.