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

Building OpenModelica on 64-bit Gentoo for Raspberry Pi

Building OpenModelica on 64-bit Gentoo for Raspberry Pi

Hello

I'm currently trying to build OpenModelica from source on  64-bit Gentoo for Raspberry Pi . I've managed to get the 3rd Party tools to compile by updating the config .guess and config.sub files to the system version in order to get the aarch64 architecture detected correctly.

The initial build of OMCompiler completes but I get a segmentation fault and core dump during the bootstrap process compiling CodegenCFunctions.stamp.mo.mos

Code:

          

           PID: 116062 (omc)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 11 (SEGV)
     Timestamp: Sun 2020-08-30 23:00:35 BST (15h ago)
  Command Line: /usr/local/src/OpenModelica/build/bin/omc -g=MetaModelica -n=1 build/CodegenCFunctions.stamp.mo.mos
    Executable: /usr/local/src/OpenModelica/build/bin/omc

I compiled the code with CLANG v10.0.1 configured using:

Code:


./configure CC=clang CXX=clang++ --prefix=/usr/local --disable-modelica3d --with-omniORB=/usr

Can anyone suggest how I investigate this issue further to find the root cause?

Many Thanks

Re: Building OpenModelica on 64-bit Gentoo for Raspberry Pi

I'm guessing somewhere in all that C-code there's the assumption that if it's an ARM system, pointers are 32-bit. You could run gdb on the executable so see where it crashes but the actual line of code that needs changing might be nowhere near that line of code...

Re: Building OpenModelica on 64-bit Gentoo for Raspberry Pi

That's for the hint, your guess was correct!

I managed to get a crash dump by running the command line that failed through GDB. This highlighted an issue with libantlr3c-3.2. Further investigation showed that although updating the config .guess and config.sub files was enough to get the code to compile, the flag to compile the library as a 64 bit library wasn't set.   So I've added another condition in the OMCompiler/Parser/Makefile.in to set the flag for aarch64. The build is now continuing! I'll let you know if I encounter any further issues!

Many thanks! 

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