Opened 8 years ago
Last modified 6 years ago
#4298 new defect
OMOptim build on linux amd64 failed due to gcc 6.0 bug 70129
Reported by: | Owned by: | Adrian Pop | |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | OMOptim | Version: | v1.12.0 |
Keywords: | gcc linux OMOptim | Cc: | smunns@…, masterharper1082@… |
Description
Compile of OMOptim of latest git pull failed in several files due to problem with:
#include_next <stdlib.h>
Failure text aligns with gcc bug 70129.
Google search "workaround for gcc bug 70129" shows that several other packages have been forced to deal with this issue.
Ubuntu Linux amd64
gcc --version
gcc (Ubuntu 6.2.0-7ubuntu11) 6.2.0 20161018
Sprinkling #include <stdlib.h> in:
OMOptim/OMOptim/Core/Dymola/Dymola.cpp
OMOptim/OMOptim/Core/Dymola/ModPlusDymolaCtrl.cpp
OMOptim/OMOptim/Core/FileData/CSV.cpp
OMOptim/OMOptim/Core/FileData/LoadOMOptim.h
OMOptim/OMOptim/Core/OptObjective.cpp
OMOptim/OMOptim/Core/ParetoDominance.cpp
OMOptim/OMOptim/Core/Project.cpp
OMOptim/OMOptim/GUI/MainWindow.cpp
makes the compiler problem go away but can't be a viable long-term solution.
Change History (3)
comment:1 by , 8 years ago
comment:2 by , 7 years ago
Component: | *unknown* → OMOptim |
---|---|
Owner: | changed from | to
comment:3 by , 6 years ago
Tried playing around with this again after failing OMOptim builds for months. I can solve it locally by changing all OMOptim Makefile, MakefileLib, Makefile.unix references to "-isystem /usr/include" to "-I/usr/include". This sort of solution was identified in several other open-source projects experiencing this error. However, I do not understand enough about how your configuration system is set up to understand how to make this change "permanent" if I reconfigure OpenModelica and rebuild from scratch.
Sorry, gcc version is irrelevant. Build was configured to use clang for C, and g++ for C++.