Opened 5 years ago

Closed 4 years ago

#5950 closed defect (wontfix)

omc crashes during bootstrapping on fresh Debian Buster

Reported by: Rüdiger Franke Owned by: Martin Sjölund
Priority: blocker Milestone: 1.17.0
Component: Build Environment Version:
Keywords: Cc:

Description

Compiled OpenModelica according to docu:

echo deb http://build.openmodelica.org/apt bionic nightly | sudo tee -a /etc/apt/sources.list
echo deb-src http://build.openmodelica.org/apt bionic nightly | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get build-dep openmodelica
git clone --recursive https://openmodelica.org/git-readonly/OpenModelica.git OpenModelica
cd OpenModelica
autoconf
./configure --with-cppruntime
make -j4

Compilation crashes with:

make -f Makefile --no-print-directory -C /home/rfranke/OpenModelica/OMCompiler/Compiler/Script OMBUILDDIR=/home/rfranke/OpenModelica/build
/home/rfranke/OpenModelica/build/bin/omc -d=failtrace -g=MetaModelica OpenModelicaScriptingAPI.mos

Limited backtrace at point of segmentation fault
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaRuntimeC.so(+0x17c34)[0x7f7ff15ffc34]
/lib/x86_64-linux-gnu/libc.so.6(+0x37840)[0x7f7ff17bc840]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_FGraphBuildEnv_mkProgramGraph+0x33)[0x7f7ff1e62c03]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Builtin_initialGraph+0x1a1)[0x7f7ff21553e1]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Inst_makeEnvFromProgram+0x40)[0x7f7ff2015ec0]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_SymbolTable_buildEnv+0x43)[0x7f7ff1dbeea3]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Interactive_evaluateExpr+0x108)[0x7f7ff1e24388]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Interactive_evaluateExprToStr+0x1b3)[0x7f7ff1e24743]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Interactive_evaluate2+0x1c5)[0x7f7ff1e26925]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Interactive_evaluateToStdOut+0x9e)[0x7f7ff1e2732e]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Main_translateFile+0x5d3)[0x7f7ff1c34633]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Main_main2+0x468)[0x7f7ff1c36138]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Main_main+0x414)[0x7f7ff1c36814]
/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(__omc_main+0x1e6)[0x7f7ff2180186]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)[0x7f7ff17a909b]
make[6]: *** [Makefile.common:4: OpenModelicaScriptingAPI.mo] Segmentation fault
make[5]: *** [Makefile.common:104: scripting] Error 2
make[4]: *** [Makefile.common:11: generate-files-in-steps] Error 2
make[3]: *** [Makefile.common:6: all] Error 2
make[3]: Leaving directory '/home/rfranke/OpenModelica/OMCompiler/Compiler/boot'
make[2]: *** [Makefile:99: omc-bootstrapped] Error 2
make[2]: Leaving directory '/home/rfranke/OpenModelica/OMCompiler'
make[1]: *** [Makefile.common:227: all-runtimeCPPinstall] Error 2
make[1]: Leaving directory '/home/rfranke/OpenModelica/OMCompiler'
make: *** [Makefile:12: omc.skip] Error 2

I think that the same happens for the maintenance/v1.15 branch.

Change History (10)

comment:1 by Adrian Pop, 5 years ago

Ouch. How did you configure? Did you use gcc/g++ or clang/clang++?

comment:2 by Rüdiger Franke, 5 years ago

Just configure --with-cppruntime as stated in the opener of this ticket.

comment:3 by Rüdiger Franke, 5 years ago

gcc -v gives: gcc version 8.3.0 (Debian 8.3.0-6)
clang -v gives: clang version 7.0.1-8 (tags/RELEASE_701/final)

Tried:

./configure CC=clang CXX=clang++ --with-cppruntime

This time the compilation already fails in sundials

CMake Error at CMakeListrs.txt:1104 (add_subdirectory):
  add_subdirectory given source "examples" which is not an existing
  directory.

I updated before the compilation. A lot of strange things seem to be happening recently (like the sundials cmake 3.4 problem last week). Do you commit instable versions to the master branch meanwhile?

Last edited 5 years ago by Rüdiger Franke (previous) (diff)

comment:4 by Adrian Pop, 5 years ago

It is because OMCompiler/3rdParty is on master instead of 745e134e15b9ff857c2fc58ae4e0d41e20774076 which is the
one in the OpenModelica project.

Solve this by doing:

cd OpenModelica
git checkout master
git pull
# force submodules to be on the tested commits from OpenModelica glue project, not on master
git submodule update --force --init --recursive 

comment:5 by Adrian Pop, 5 years ago

We need to change the way we are working with OMCompiler-3rdParty.
I have discussed with Martin about this and we propose to use branches instead of directly master as sketched here:
https://github.com/OpenModelica/OpenModelica/blob/master/CONTRIBUTING.md
at the bottom of the page.
I'll ask Andreas to do this until he finishes his work to update sundials.

comment:6 by Rüdiger Franke, 5 years ago

Clang avoids the crash of omc during bootstrapping. Btw. flex appears missing in the build dependencies.

Hours later everything compiled. Now clang fails to generate an executable for a simulation though:

/usr/bin/ld: /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/omsicpp/libOMCppOMCFactory.a(OMCFactory.cpp.o): undefined reference to symbol 'pthread_join@@GLIBC_2.2.5'
/usr/bin/ld: //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Modelica.Fluid.Examples.Tanks.ThreeTanks.makefile:79: Modelica.Fluid.Examples.Tanks.ThreeTanks] Error 1

comment:7 by Francesco Casella, 4 years ago

Milestone: 1.15.01.16.0

Release 1.15.0 was scrapped, because replaceable support eventually turned out to be more easily implemented in 1.16.0. Hence, all 1.15.0 tickets are rescheduled to 1.16.0

comment:8 by Francesco Casella, 4 years ago

@rfranke, was this issue resolved?

comment:9 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:10 by Francesco Casella, 4 years ago

Resolution: wontfix
Status: newclosed

@rfranke, please reopen if the issue is still relevant.

Note: See TracTickets for help on using tickets.