OpenModelica / OpenModelica

OpenModelica is an open-source Modelica-based modeling and simulation environment intended for industrial and academic usage.
https://openmodelica.org
Other
848 stars 306 forks source link

pm_timer.hpp:72:10: fatal error: boost/chrono.hpp: No such file or directory #10982

Open jschueller opened 1 year ago

jschueller commented 1 year ago

Description

OMCompiler build fails when boost is not in system dirs, due to BOOSTHOME not being expanded in the compile command (-I@BOOSTHOME@):

2023-07-19T12:27:55.5242052Z $BUILD_PREFIX/bin/x86_64-conda-linux-gnu-c++ -std=c++14 -O3 -Wall -DGC_THREADS -DUSE_FLOW_SCHEDULER -I"../../c" -I@BOOSTHOME@ -I$SRC_DIR/OMCompiler/3rdParty/tbb/include -I$SRC_DIR/OMCompiler/3rdParty/gc/include -c pm_posix_timer.cpp
2023-07-19T12:27:55.5358562Z In file included from pm_posix_timer.cpp:37:
2023-07-19T12:27:55.5359110Z pm_timer.hpp:72:10: fatal error: boost/chrono.hpp: No such file or directory
2023-07-19T12:27:55.5359477Z    72 | #include <boost/chrono.hpp>
2023-07-19T12:27:55.5359765Z       |          ^~~~~~~~~~~~~~~~~~
2023-07-19T12:27:55.5360345Z compilation terminated.

Steps to Reproduce

got this error on conda-forge, using autotools build system

Expected Behavior

Screenshots

Version and OS

Linux, om 1.21.0

Additional Context

the BOOSTHOME variable is not configured anywhere but used in ParModelica folder:

./SimulationRuntime/ParModelica/auto/Makefile.in:9:BOOST_HOME = @BOOSTHOME@
mahge commented 1 year ago

Guessing from the error message here and also in #7064, I am guessing you are using the autoconf+Makefiles based build of OpenModelica. If so, OpenModelica has an alternative CMake based build system. You can find more information about it here. I think it might solve some of these issues so you can use OpenModelica until we solve these issues.

If you encounter issues with the CMake build system as well, please open new issues so we can track them as well.

jschueller commented 1 year ago

yes, I will try cmake as well

mahge commented 1 year ago

Please do and let me know how it goes.