Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Git compilation, OMCppSystem error: different return type

Git compilation, OMCppSystem error: different return type

I will be back from work, please take a look at the attachment. Thank you.
make-2>1-|-error.out

Edited by: tuanhtrng - Feb-02-17 20:36:01

Re: Git compilation, OMCppSystem error: different return type

I suspect you need a make clean and then re-compiling. The errors seem related to using different C++ compilers for different parts of the code.

Re: Git compilation, OMCppSystem error: different return type

(Or at least make clean in OMEdit; if your omc executable works fine there should be no need to clean that. Just make sure the same C++ compiler is used for OMEdit as for OMC)

Re: Git compilation, OMCppSystem error: different return type

I tried your suggestion and the problem seems to be gone. However, new error pops out.

Code:


[ 99%] Building CXX object Solver/Kinsol/CMakeFiles/OMCppKinsol.dir/KinsolLapack.cpp.o
cd /srv/source/OpenModelica/OMCompiler/SimulationRuntime/cpp/Build_dynamic/Solver/Kinsol && /usr/bin/clang++   -DOMC_BUILD -DOMCppKinsol_EXPORTS -DPMC_USE_SUNDIALS -DSUNDIALS_MAJOR_VERSION=2 -DSUNDIALS_MINOR_VERSION=7 -DUSE_DGESV -DUSE_LOGGER -DUSE_THREAD -std=c++11 -O2 -g -DNDEBUG -fPIC -I/srv/source/OpenModelica/OMCompiler/3rdParty/CMinpack/build/.. -I/srv/source/OpenModelica/OMCompiler/SimulationRuntime/cpp -I/srv/source/OpenModelica/OMCompiler/SimulationRuntime/cpp/Build_dynamic -I/srv/source/OpenModelica/OMCompiler/SimulationRuntime/cpp/Include -I/srv/source/OpenModelica/OMCompiler/SimulationRuntime/cpp/Solver    -o CMakeFiles/OMCppKinsol.dir/KinsolLapack.cpp.o -c /srv/source/OpenModelica/OMCompiler/SimulationRuntime/cpp/Solver/Kinsol/KinsolLapack.cpp
/srv/source/OpenModelica/OMCompiler/SimulationRuntime/cpp/Solver/Kinsol/KinsolLapack.cpp:44:22: error: assigning to
      'int (*)(struct KINMemRec *)' from incompatible type 'void (KINMem)': different return type ('int' vs 'void')
        kin_mem->kin_lfree  = KINLapackCompletePivotingFree;
                            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re: Git compilation, OMCppSystem error: different return type

./configure --without-cppruntime or figure out how to solve it manually with the newer Sundials version

Re: Git compilation, OMCppSystem error: different return type

I will give it a try. By the way, how did you know it was sundial problem? I am new to Linux.

There are 0 guests and 0 other users also viewing this topic
You are here: