- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Shared library path when compiling...
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]
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Shared library path when compiling...