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

build from source OpenModelica for raspberry pi 2

build from source OpenModelica for raspberry pi 2

i tried to build OpenModelica from source for raspberry pi 2 (armv7 architecture). I am using Ubuntu Mate.

Code:

$./configure --without-paradiseo --without-omc --disable-modelica3d

So everything went fine, except I had to manually build antlr using

Code:

 ./configure  --disable-abiflags

After changing this and running make again I get following error. Could you please point me out, what now could be a problem? Thank you.

...
gcc build/_main.o -Wl,-z,origin -Wl,-rpath,'$ORIGIN/../lib/armv7l-linux-gnueabihf/omc' -Wl,-rpath,'$ORIGIN' -g -O2 -fno-stack-protector -fPIC -I"/home/abizjak/programs/OpenModelica/build/include/omc/c"  -DADD_METARECORD_DEFINITIONS= -o build/omc -L.  -Lbuild/ -L"/home/abizjak/programs/OpenModelica/build/lib/armv7l-linux-gnueabihf/omc" -lomparse -lomcruntime -lOpenModelicaRuntimeC -lModelicaExternalC -lomantlr3  -L/home/abizjak/programs/OpenModelica/OMCompiler/3rdParty/FMIL/install/lib -lfmilib -L/home/abizjak/programs/OpenModelica/OMCompiler/3rdParty/graphstream/gs-netstream/c++/ -lnetstream    -lomcgc  -lpthread -lm -ldl  -lstdc++ -rdynamic  -llpsolve55_pic -lcolamd -lm -ldl   -lhwloc -L/home/abizjak/programs/OpenModelica/build/lib/armv7l-linux-gnueabihf/omc -lmetis -lexpat -llapack -lblas -lOpenModelicaCompiler
cp -a build/OpenModelicaScriptingAPI.h /home/abizjak/programs/OpenModelica/build/include/omc/scripting-API
cp -a build/omc /home/abizjak/programs/OpenModelica/build/bin/
cp -a /home/abizjak/programs/OpenModelica/build/lib/armv7l-linux-gnueabihf/omc/libOpenModelicaCompiler.so /home/abizjak/programs/OpenModelica/build/bin/
make[4]: Leaving directory '/home/abizjak/programs/OpenModelica/OMCompiler/Compiler/boot'
Bootstrapping phase 1/3 completed
make -f Makefile clean OMC=/home/abizjak/programs/OpenModelica/build/bin/omc
make[4]: Entering directory '/home/abizjak/programs/OpenModelica/OMCompiler/Compiler/boot'
rm -rf build/
rm -f Makefile.sources LoadCompilerInterface.mos Makefile.depends
make[4]: Leaving directory '/home/abizjak/programs/OpenModelica/OMCompiler/Compiler/boot'
make -f Makefile generate-files-in-steps OMC=/home/abizjak/programs/OpenModelica/build/bin/omc
make[4]: Entering directory '/home/abizjak/programs/OpenModelica/OMCompiler/Compiler/boot'
make -f Makefile templates scripting
make[5]: Entering directory '/home/abizjak/programs/OpenModelica/OMCompiler/Compiler/boot'
make -f Makefile --no-print-directory -C /home/abizjak/programs/OpenModelica/OMCompiler/Compiler/Template
** AbsynDumpTpl template compilation **
/home/abizjak/programs/OpenModelica/build/bin/omc AbsynDumpTpl.tpl > AbsynDumpTpl.mo.log || (cat AbsynDumpTpl.mo.log && false)

Limited backtrace at point of segmentation fault
Segmentation fault (core dumped)
Makefile.common:8: recipe for target 'AbsynDumpTpl.mo' failed
make[6]: *** [AbsynDumpTpl.mo] Error 1
Makefile.common:63: recipe for target 'templates' failed
make[5]: *** [templates] Error 2
make[5]: Leaving directory '/home/abizjak/programs/OpenModelica/OMCompiler/Compiler/boot'
Makefile.common:22: recipe for target 'generate-files-in-steps' failed
make[4]: *** [generate-files-in-steps] Error 2
make[4]: Leaving directory '/home/abizjak/programs/OpenModelica/OMCompiler/Compiler/boot'
Makefile.common:35: recipe for target 'bootstrap-from-tarball' failed
make[3]: *** [bootstrap-from-tarball] Error 2
make[3]: Leaving directory '/home/abizjak/programs/OpenModelica/OMCompiler/Compiler/boot'
Makefile.common:14: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/abizjak/programs/OpenModelica/OMCompiler/Compiler/boot'
Makefile:79: recipe for target 'omc-bootstrapped' failed
make[1]: *** [omc-bootstrapped] Error 2
make[1]: Leaving directory '/home/abizjak/programs/OpenModelica/OMCompiler'
Makefile:6: recipe for target 'omc' failed
make: *** [omc] Error 2


Re: build from source OpenModelica for raspberry pi 2

You need to run the failing command through gdb to figure out what is going on. It might be as simple as running out of RAM (although the Pi 2 as 1GB, and I have built OMC succesfully on 512MB RAM + 256 swap on armhf).

It is also possible to cross-compile OMC; I did that a while back and got the following deb-files: https://dev.openmodelica.org/~marsj/tmp-armhf/

Re: build from source OpenModelica for raspberry pi 2

Hey,

I am willing to use OpenModelica on Raspberry Pi. Can you guide to on how I should go about it?

I have been using OMEdit and related packages on Windows and Linux for quite some time now and am comfortable with using them.

Re: build from source OpenModelica for raspberry pi 2

On Raspberry Pi 2/3, there are pre-built packages. Install them the same way you installed your Linux packages for x86 (Debian Jessie, Ubuntu trusty/xenial/yakkety have packages).

Re: build from source OpenModelica for raspberry pi 2

Yes, It works! thank you current/smile

Steps I followed:

  1. Got a Raspberry Pi 3 and a 32GB SD Card.

  2. Put the Ubuntu MATE image for Raspberry Pi on the SD Card and followed installation steps

  3. Once Installed executed the following ommands in shell:



I didn't install omlib- files due to space constraints on the SD Card as the Root partition was of 8GB. Using GParted this can be increased and omlib can be installed


Edited by: jalpanchal - Dec-13-16 08:11:10

Re: build from source OpenModelica for raspberry pi 2

Problem1.: I had installed openmodelica on Raspberry Pi 3 using this method and it was working fine. Recently I ran apt-get upgrade in raspberry pi and then OpenModelica got upgraded to version 1.13. It compiled the models but gave error in execution, though the same model works on other system.
So I removed OpenModelica 1.13 and tried installing older versions. The source list file did not pick up jessie packages and said n/a instead which could not install. So I manually modified source list file of openmodelica to load jessie packages and installed OpenModelica 1.11 and then 1.12 but both the times it did not compile the models at all. Compilation fails saying [ clang: error: the clang compiler does not support '-march=native' ]

Problem 2.: OMShell-Terminal is not working. Even after using sudo it says Error connecting to omc server in interactive mode. : Connection refused.

Please tell me how to solve those problems and get OpenModelica running on Raspberry Pi again.

Re: build from source OpenModelica for raspberry pi 2

HI There!
I am also facing the same issue as

ritexarma wrote:

Compilation fails saying [ clang: error: the clang compiler does not support '-march=native' ]

. Has anyone resolved this issue?

Re: build from source OpenModelica for raspberry pi 2

You could try the older OMC versions using the older repositories: https://openmodelica.org/download/download-linux (Installing older releases or using a specific OpenModelica version). Or changing the CFLAGS (https://openmodelica.org/doc/OpenModeli … etcflags).

I will see if I can remove the march=native flag (it anyway does not make much sense for FMUs), but it seems slightly odd that on the build system clang does support -march=native and on your system it doesn't. Anyway, that would only change OM 1.13 and not 1.11 or 1.12.

Re: build from source OpenModelica for raspberry pi 2

sjoelund.se wrote:

your system

May be a few details about my system would throw some light into the issue.

I am using Raspberry Pi 3 Model B V1.2 With Ubuntu Mate 16.04.3. The command

Code:

uname -a

gives the following output.

Code:

Linux mavlab-RPi3 4.14.24-v7+ #1097 SMP Mon Mar 5 16:42:05 GMT 2018 armv7l armv7l armv7l GNU/Linux

I tried using older versions of OM, but the issue still persists.
Please let me know if any more details are required in this regard.

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