Xiangyu-Hu / SPHinXsys

SPHinXsys provides C++ APIs for engineering simulation and optimization. It aims at complex systems driven by fluid, structure, multi-body dynamics and beyond. The multi-physics library is based on a unique and unified computational framework by which strong coupling has been achieved for all involved physics.
https://xiangyu-hu.github.io/SPHinXsys/
Apache License 2.0
311 stars 230 forks source link

Build Error: Ubuntu #116

Closed AhmedSalih3d closed 2 years ago

AhmedSalih3d commented 2 years ago

Hello!

I get this error:

[ 5%] Building CXX object SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/boundary_condition/inflow_boundary.cpp.o make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:79: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/adaptations/adaptation.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.cpp:6: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.cpp:6: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.cpp:7: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.cpp:7: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/fluid_body.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/fluid_body.cpp:6: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/fluid_body.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/fluid_body.cpp:6: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/solid_body.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/solid_body.cpp:7: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/solid_body.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/solid_body.cpp:7: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:93: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/bodies/base_body.cpp.o] Error 1 In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/base_particle_dynamics.h:37, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/particle_dynamics_algorithms.h:39, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/all_particle_dynamics.h:7, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.cpp:2: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/base_particle_dynamics.h:37, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/particle_dynamics_algorithms.h:39, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/all_particle_dynamics.h:7, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.cpp:2: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/base_particle_dynamics.h:37, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/particle_dynamics_algorithms.h:39, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/all_particle_dynamics.h:7, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/inflow_boundary.h:33, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/inflow_boundary.cpp:2: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:107: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/bodies/body_relation.cpp.o] Error 1 In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/base_particle_dynamics.h:37, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/particle_dynamics_algorithms.h:39, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/all_particle_dynamics.h:7, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/inflow_boundary.h:33, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/inflow_boundary.cpp:2: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:121: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/bodies/fluid_body.cpp.o] Error 1 /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:135: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/bodies/solid_body.cpp.o] Error 1 make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:149: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/boundary_condition/boundary_face.cpp.o] Error 1 make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:163: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/boundary_condition/inflow_boundary.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:2205: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

I've been following the guide here: https://www.sphinxsys.org/html/installation.html

Can you help me fix it?

Kind regards

AhmedSalih3d commented 2 years ago

I tried the whole process again, now I get:

/home/aas/SPHinXsys/SPHINXsys/src/shared/common/vector_functions.cpp:8:10: fatal error: Eigen/Eigenvalues: No such file or directory 8 | #include <Eigen/Eigenvalues> | ^~~~~~~

  How can this be?
AhmedSalih3d commented 2 years ago

https://github.com/opencv/opencv/issues/14868

sudo ln -s /usr/include/eigen3/Eigen /usr/include/Eigen

Xiangyu-Hu commented 2 years ago

Thanks for the question. As the master branch is using Eigen 3 now, you need initialize this submodule within the repository.