Opened 10 years ago
Closed 10 years ago
#3231 closed defect (fixed)
/usr/lib/omc/libSimulationRuntimeC.so: undefined symbol: GC_set_force_unmap_on_gcollect
Reported by: | anonymous | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.3 |
Component: | Build Environment | Version: | trunk |
Keywords: | GC_set_force_unmap_on_gcollect | Cc: |
Description
When trying to simulate a random Modelica example with the current Debian 7 wheezy packages from the stable APT repository at http://build.openmodelica.org/apt, the compilation succeeds, but the simulation aborts with messages like:
/tmp/OpenModelica_foobar/OMEdit/Modelica.Blocks.Examples.Filter: symbol lookup error: /usr/lib/omc/libSimulationRuntimeC.so: undefined symbol: GC_set_force_unmap_on_gcollect
I have not tried all examples (obviously, because that would take to long), but this occurs with every example I tried so far. Current package version for omc is 25115-1 from the APT repository mentioned abobe. Installed GCC packages are gcc-4.6 (4.6.3-14) and gcc-4.7 (4.7.2-5) from the official Debian repositories, if that helps to pin down the reason for this error.
Steps to reproduce the error:
- Install Debian packages (version 25115-1) for OpenModelica from http://build.openmodelica.org/apt at a machine running on Debian 7.8 "Wheezy".
- Open the OpenModelica Connection Editor.
- Pick an example model, e.g. Modelica.Blocks.Examples.Filter for simulation.
- Click "Simulate".
Change History (6)
follow-up: 3 comment:1 by , 10 years ago
comment:2 by , 10 years ago
The problem is most likely that you're using an older version of libgc which didn't have the profile statistics implemented yet. OpenModelica ships its own version which should be used instead.
comment:3 by , 10 years ago
Replying to sjoelund.se:
If you run ldd on /usr/lib/omc/libSimulationRuntimeC.so and /tmp/OpenModelica_foobar/OMEdit/Modelica.Blocks.Examples.Filter, do they list /usr/lib/omc/libgc.so or another version of libgc?
$ ldd /tmp/OpenModelica_foobar/OMEdit/Modelica.Blocks.Examples.Filter linux-gate.so.1 => (0xb7710000) libModelicaExternalC.so.0 => /usr/lib/omc/libModelicaExternalC.so.0 (0xb7707000) libSimulationRuntimeC.so => /usr/lib/omc/libSimulationRuntimeC.so (0xb75c1000) liblapack.so.3 => /usr/lib/liblapack.so.3 (0xb6dcf000) libblas.so.3 => /usr/lib/libblas.so.3 (0xb6d4c000) libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb6d06000) libgc.so.1 => /usr/lib/libgc.so.1 (0xb6cc1000) libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb6ca7000) libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb6b43000) libhdf5.so.7 => /usr/lib/libhdf5.so.7 (0xb6862000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb6849000) librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xb6840000) libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb6817000) libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb6813000) libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6727000) libsundials_kinsol.so.1 => /usr/lib/libsundials_kinsol.so.1 (0xb6710000) libsundials_nvecserial.so.0 => /usr/lib/libsundials_nvecserial.so.0 (0xb670b000) libipopt.so.1 => /usr/lib/omc/libipopt.so.1 (0xb64e9000) libcoinmumps.so.1 => /usr/lib/omc/libcoinmumps.so.1 (0xb6361000) liblis.so.0 => /usr/lib/omc/liblis.so.0 (0xb62de000) libcminpack.so.1 => /usr/lib/omc/libcminpack.so.1 (0xb62c9000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb62ac000) libgfortran.so.3 => /usr/lib/i386-linux-gnu/libgfortran.so.3 (0xb61b1000) libquadmath.so.0 => /usr/lib/i386-linux-gnu/libquadmath.so.0 (0xb613a000) /lib/ld-linux.so.2 (0xb7711000)
$ ldd /usr/lib/omc/libSimulationRuntimeC.so linux-gate.so.1 => (0xb77a4000) librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xb7634000) libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb760c000) libgc.so.1 => /usr/lib/omc/libgc.so.1 (0xb7554000) libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb753b000) libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb7515000) libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb7511000) libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb7425000) libsundials_kinsol.so.1 => /usr/lib/libsundials_kinsol.so.1 (0xb740d000) libsundials_nvecserial.so.0 => /usr/lib/libsundials_nvecserial.so.0 (0xb7408000) liblapack.so.3 => /usr/lib/liblapack.so.3 (0xb6c16000) libblas.so.3 => /usr/lib/libblas.so.3 (0xb6b93000) libipopt.so.1 => /usr/lib/omc/libipopt.so.1 (0xb6972000) libcoinmumps.so.1 => /usr/lib/omc/libcoinmumps.so.1 (0xb67e9000) liblis.so.0 => /usr/lib/omc/liblis.so.0 (0xb6766000) libcminpack.so.1 => /usr/lib/omc/libcminpack.so.1 (0xb6751000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6734000) libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb65d0000) /lib/ld-linux.so.2 (0xb77a5000) libgfortran.so.3 => /usr/lib/i386-linux-gnu/libgfortran.so.3 (0xb64d5000) libquadmath.so.0 => /usr/lib/i386-linux-gnu/libquadmath.so.0 (0xb645e000)
So, yes, /usr/lib/omc/libSimulationRuntimeC.so links to OpenModelica's libgc in /usr/lib/omc/, but /tmp/OpenModelica_foobar/OMEdit/Modelica.Blocks.Examples.Filter links to the system's libgc, i.e. /usr/lib/libgc.so.1 in that case.
Replying to adrpo:
The problem is most likely that you're using an older version of libgc which is compiled with different flags. OpenModelica ships its own version which should be used instead.
As you can see from the output above, OpenModelica's version of libgc is used, but only in one case, not in both.
I suppose there could be a compiler option to tell g++ to look for libgc in /usr/lib/omc before falling back to the system default, but
- a) I do not know what that option is, and OpenModelica should use such an option by default, if it ships its own versions of system libraries. Otherwise one might encounter the same problem with other simulation models, too.
If that is not the way to go, then there might be another option:
- b) Don't ship own version of libgc (or other libraries) and make OpenModelica work with the libraries provided by the default Debian packages. In my opinion that would be the "cleanest" approach, but it might also be the one that requires the most work.
comment:4 by , 10 years ago
I noticed swapping on the link line
-L/usr/lib/" -Wl,-rpath="/usr/lib/" -L/usr/lib/omc" -Wl,-rpath="/usr/lib/omc"
to
-L/usr/lib/omc" -Wl,-rpath="/usr/lib/omc" -L/usr/lib/" -Wl,-rpath="/usr/lib/"
fixed the problem
comment:5 by , 10 years ago
Component: | Unknown → Build Environment |
---|---|
Owner: | changed from | to
Status: | new → assigned |
The current nightly should be working. The stable will become the same version later.
comment:6 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
If you run ldd on /usr/lib/omc/libSimulationRuntimeC.so and /tmp/OpenModelica_foobar/OMEdit/Modelica.Blocks.Examples.Filter, do they list /usr/lib/omc/libgc.so or another version of libgc?