Opened 7 years ago
Closed 7 years ago
#4772 closed defect (fixed)
Problems with Cpp runtime under Win32
Reported by: | Rüdiger Franke | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | normal | Milestone: | 1.13.0 |
Component: | Build Environment | Version: | |
Keywords: | Cc: | Niklas Worschech, Adrian Pop |
Description
The following model simulates and can be exported as FMU with the Cpp runtime under Linux.
model TableTest extends Modelica.Blocks.Tables.CombiTable2D( table = [0.0, 1.0, 2.0, 3.0; 1.0, 1.0, 3.0, 5.0; 2.0, 2.0, 4.0, 6.0]); annotation(uses(Modelica(version="3.2.2"))); end TableTest;
The 32bit Windows release of OpenModelica produces the following errors:
- Simulation from OMEdit stops with the error message:
simulation manager: Simulation failed for C:/Users/Someone/AppData/Local/Temp/OpenModelica/OMEdit/TableTest/TableTest_res.mat with error in simulation manager: Could not initialize system Could not read start values. Current variable reference is 1
- FMI export from OMEdit raises linker errors:
C:/OpenModelica1.13.0-dev-32bit//lib//omc\libModelicaIO.a(ModelicaIO.o): In function `readMatIO': C:\dev\OpenModelica32bit\OMCompiler\3rdParty\ModelicaExternalC\BuildProjects\autotools/../../C-Sources/ModelicaIO.c:446: undefined reference to `Mat_Open' C:\dev\OpenModelica32bit\OMCompiler\3rdParty\ModelicaExternalC\BuildProjects\autotools/../../C-Sources/ModelicaIO.c:455: undefined reference to `Mat_VarReadInfo' ...
It appears that EXTRA_LIBS
that is initialized during code generation from makefileParams.libs
has the wrong order:
-lModelicaStandardTables -lModelicaIO -lModelicaMatIO -lzlib
The linker error disappears with:
-lModelicaIO -lModelicaMatIO -lModelicaStandardTables
Btw. why do you link -lzlib
to the FMU?
Moreover, -lModelicaStandardTables
also finds in c:/OpenModelica1.13.0-dev-32bit/lib/omc/cpp
. Should this possibly be removed and taken from Modelica 3.2.2 Resources instead?
Change History (8)
comment:1 by , 7 years ago
Cc: | added |
---|
comment:2 by , 7 years ago
comment:3 by , 7 years ago
Priority: | blocker → normal |
---|
comment:4 by , 7 years ago
Commit 906217 removes duplicated and erroneous Modelica external C libs from the Cpp runtime.
Let's see if there are remaining issues with MSVC ...
comment:5 by , 7 years ago
The Windows build seems to work. Since two days it fails to deliver the result and send a notification about the failure though:
+ mv OpenModelica.exe /c/dev/OpenModelica_releases/v1.13.0-dev-476-g90621756a8/OpenModelica-v1.13.0-dev-476-g90621756a8-32bit.exe ... + ssh adrpo@build.openmodelica.org /c/dev/OpenModelica32bit/OpenModelicaSetup/BuildWindowsRelease.sh: line 205: ssh: command not found ... Sending e-mails to: adrian.pop@liu.se adeel.asghar@liu.se ERROR: Could not connect to SMTP host: localhost, port: 25
Is there anyone out there who cares about such problems?
See also ticket:4773 and ticket:4774.
comment:6 by , 7 years ago
@rfranke: I had to update git for windows to a newer version as github started to reject the one installed on that system. Then ssh was installed in a different place. Then our IT department wanted us to close ports on the test machine so we closed also 25 but it seems Hudson needs it.
All these should be solved now. I will restart the jobs.
A new ticket will be opened for the first problem.
Commt cacc8b works around the second problem.
The external function calls in
Modelica.Blocks.Tables
(MSL 3.2.2) define:It should be:
considering the order of mutual dependencies (if zlib is needed at all).
The questions arise, if MSL 3.2.2 is really wrong and why OpenModelica additionally links
-lModelicaIO
. Also the second linkage of-lModelicaStandardTables
should be removed once the order is correct.