Description
I can't build OMEdit with debug symbols and without copiler optimization, because OMSimulator has some troubles with CFLAGS="-g -O0.
Steps to reproduce the behavior
Clone the OpenModelica super project, go into path/to/OpenModelica and run
$ autoconf
$ ./configure CC=clang CFLAGS="-g -O0" CXX=clang++ CXXFLAGS="-g -O0" --without-omc --with-cppruntime
$ make omsimulator --output-sync -j
[...]
test ! -z "" || /home/username/workspace/OpenModelica/build/bin/OMSimulator --version
Segmentation fault
make[1]: *** [Makefile:133: OMSimulator] Error 139
make[1]: Leaving directory '/home/username/workspace/OpenModelica/OMSimulator'
make: *** [Makefile:39: omsimulator.skip] Error 2
The complete log build_omsimulator.log
Running gdb on OMSimulator:
(gdb) r --version
Starting program: /home/username/workspace/OpenModelica/build/bin/OMSimulator --version
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f2c506 in double3::double3 (this=0x675a18 <zerodouble3>, val=0) at ../include/double3.icc:23
23 : XX(val), YY(val), ZZ(val)
(gdb) bt
#0 0x00007ffff7f2c506 in double3::double3 (this=0x675a18 <zerodouble3>, val=0) at ../include/double3.icc:23
#1 0x00007ffff7ef5683 in __cxx_global_var_init () at double3.cc:14
#2 0x00007ffff7ef5699 in _GLOBAL__sub_I_double3.cc () from /home/username/workspace/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libomtlmsimulator.so
#3 0x00007ffff7fe0b8a in ?? () from /lib64/ld-linux-x86-64.so.2
#4 0x00007ffff7fe0c91 in ?? () from /lib64/ld-linux-x86-64.so.2
#5 0x00007ffff7fd013a in ?? () from /lib64/ld-linux-x86-64.so.2
#6 0x0000000000000002 in ?? ()
#7 0x00007fffffffe1e6 in ?? ()
#8 0x00007fffffffe225 in ?? ()
#9 0x0000000000000000 in ?? ()
(gdb)
Expected behavior
Pass the correct configure flags to OMSimulator and CMake.
Version and OS
- Version: OMSimulator on commit 4c7059b
OpenModelica on commit 392c5f9bed8c33020378583724c274a1d2c0e5f2
- OS: Ubuntu 20.04
Description
I can't build OMEdit with debug symbols and without copiler optimization, because OMSimulator has some troubles with
CFLAGS="-g -O0.Steps to reproduce the behavior
Clone the OpenModelica super project, go into
path/to/OpenModelicaand runThe complete log build_omsimulator.log
Running gdb on OMSimulator:
Expected behavior
Pass the correct configure flags to OMSimulator and CMake.
Version and OS
OpenModelica on commit 392c5f9bed8c33020378583724c274a1d2c0e5f2