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

Shared library path when compiling from source

Shared library path when compiling from source

I want to install OpenModelica on a computer running openSUSE. Hence, I am compiling from source.
I believe I have successfully installed it but I am not able to load the Modelica Standard Library in OMEdit.

I followed the Github readme with one difference that I have specified a location to install i.e.

Code:


> git clone --recursive https://openmodelica.org/git-readonly/OpenModelica.git  openmodelica_src
> cd openmodelica_src
> autoconf
> ./configure CC=clang CXX=clang++ --prefix=/opt/dist/openmodelica
> make -j8
> make install

Initially, on running /opt/dist/openmodelica/bin/OMEdit, I got an error saying libOMPlot.so.1 could not be found.
As a temporary fix, I set the LD_LIBRARY_PATH using

Code:


export LD_LIBRARY_PATH=/opt/dist/openmodelica/lib64/x86_64-linux-gnu/omc/:/opt/dist/openmodelica/lib64:$LD_LIBRARY_PATH

On doing this, I can start OMEdit but the MSL is not loaded automatically. I can't even load it manually using the Menu option, where only the top-level package gets loaded but not the sub-packages.

Does anyone have an idea to solve this issue or at least where I can look for a problem?

I have noticed one difference compared to an installation on an Ubuntu virtual machine.
On openSUSE:

Code:


> readelf -d /opt/dist/openmodelica/bin/OMEdit | grep PATH
0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../lib/x86_64-linux-gnu/omc:$ORIGIN/../lib:$ORIGIN]

On Ubuntu:

Code:


readelf -d OMEdit | grep PATH
0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/../lib/x86_64-linux-gnu/omc:$ORIGIN/../lib:$ORIGIN]

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