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

Error when building from source

Error when building from source

I am trying to build OpenModelica from source (https://github.com/OpenModelica/OpenModelica), following the instructions on GitHub.
I successfully installed all dependencies except clang++ (which is optional). Then I cloned

Code:

> MY_FORK=MyGitHubUserName ; git clone https://openmodelica.org/git-readonly/OpenModelica.git --recursive && (cd OpenModelica && git remote set-url --push origin git@github.com:$MY_FORK/OpenModelica.git && git submodule foreach --recursive 'git remote set-url --push origin `git config --get remote.origin.url | sed s,^.*/,git@github.com:'$MY_FORK'/,`')

and after I did

Code:

> autoconf

> ./configure
> make -j8

The building starts, but after a while it gets the following Error:

Code:

./simulation/solver/solver_main.c: In function ‘rungekutta_step_ssc’: 


./simulation/solver/solver_main.c:858:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

   const short isMaxStepSizeSet = (short) omc_flagValue[FLAG_MAX_STEP_SIZE];

                                  ^

gcc -c -I. -I../../Compiler/runtime -I../../3rdParty/gc/include -I../../3rdParty/FMIL/install/include/ -I../../3rdParty/lis-1.4.12/include/ -I../../3rdParty/Ipopt/include/ -I/home/osboxes/Downloads/OpenModelica/build/include/omc/c/sundials/  -DGC_REDIRECT_TO_LOCAL -I/home/osboxes/Downloads/OpenModelica/build/include/omc/c -Wno-parentheses-equality -Wno-unused-variable -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -g -O2 -fno-stack-protector -fPIC   -o build/c/./simulation/solver/linearSolverKlu.o ./simulation/solver/linearSolverKlu.c

In file included from ./simulation/solver/kinsolSolver.c:65:

/home/osboxes/Downloads/OpenModelica/build/include/omc/c/sundials/kinsol/kinsol_klu.h:25:10: fatal error: kinsol/kinsol_sparse.h: No such file or directory

#include "kinsol/kinsol_sparse.h"

          ^~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make[3]: *** [Makefile.common:216: build/c/./simulation/solver/kinsolSolver.o] Error 1

make[3]: *** Waiting for unfinished jobs....

./simulation/solver/solver_main.c: At top level:

cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’

make[3]: Leaving directory '/home/osboxes/Downloads/OpenModelica/OMCompiler/SimulationRuntime/c'

make[2]: *** [Makefile.common:115: interactive] Error 2

make[2]: Leaving directory '/home/osboxes/Downloads/OpenModelica/OMCompiler'

make[1]: *** [Makefile:96: omc-bootstrapped] Error 2

make[1]: Leaving directory '/home/osboxes/Downloads/OpenModelica/OMCompiler'

make: *** [Makefile:9: omc] Error 2

With apt-get everything works finde, but I would like to get it from source...

My System:
Ubuntu 18.10 64-Bit

Thanks for your Help!
Manuel

Re: Error when building from source

Does nobody of you has this problem? Is there something I did completly wrong??

Re: Error when building from source

I managed to solve the problem:
If you use clang for compiling it works just fine. So clang is not optional like in the README on GitHub (https://github.com/OpenModelica/OpenModelica). You must have clang to compile successfully...

Re: Error when building from source

gcc works fine as well (but only some versions of gcc; especially some recent gcc versions broke backwards compatibility)

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