Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3610 closed defect (fixed)

Generating a fmu fails because share/omc/runtime/c is not present

Reported by: cxh@… Owned by: Martin Sjölund
Priority: high Milestone: 1.9.4
Component: Build Environment Version:
Keywords: Cc:

Description

When building from the Github head, under both Mac OS X and RHEL 6.7, when building just omc, share/omc/runtime/c is not present so creating FMUs fails.

For my RHEL build steps, see #3609.

To replicate:

bash-4.1$ mkdir /tmp/fmi
bash-4.1$ cd /tmp/fmi
bash-4.1$ cp /home/jenkins/src/OpenModelica/OMCompiler/Examples/VanDerPol.mo .
bash-4.1$ cat VanDerPol.mos
loadModel(Modelica, {"3.2.1"});
getErrorString();
loadFile("VanDerPol.mo"); getErrorString();
OpenModelica.Scripting.translateModelFMU(
        className=VanDerPol,
        version="2.0");
getErrorString();
bash-4.1$ /usr/local/openmodelica/bin/omc --version
v1.9.4-dev.719+ga6c7cb2
bash-4.1$ /usr/local/openmodelica/bin/omc VanDerPol.mos
true
""
true
""

"Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
Error: Error building simulator. Build log: rm -f VanDerPol.fmutmp/sources/VanDerPol_init.xml
cp -a /usr/local/openmodelica/include/omc/c/* VanDerPol.fmutmp/sources/include/
cp -a /usr/local/openmodelica/share/omc/runtime/c/fmi/buildproject/* VanDerPol.fmutmp/sources
cp: cannot stat `/usr/local/openmodelica/share/omc/runtime/c/fmi/buildproject/*': No such file or directory
make: *** [fmu] Error 1
Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
Error: Error building simulator. Build log: rm -f VanDerPol.fmutmp/sources/VanDerPol_init.xml
cp -a /usr/local/openmodelica/include/omc/c/* VanDerPol.fmutmp/sources/include/
cp -a /usr/local/openmodelica/share/omc/runtime/c/fmi/buildproject/* VanDerPol.fmutmp/sources
cp: cannot stat `/usr/local/openmodelica/share/omc/runtime/c/fmi/buildproject/*': No such file or directory
make: *** [fmu] Error 1
"
bash-4.1$ 

Indeed, /usr/local/openmodelica/share/omc/ does not exist

bash-4.1$ ls -l /usr/local/openmodelica/share/omc/
total 12
drwxrwxr-x. 2 jenkins jenkins 4096 May 11  2015 java
-rw-rw-r--  1 jenkins jenkins  189 Dec 20 09:19 omc_communication.idl
drwxrwxr-x. 3 jenkins jenkins 4096 Dec 29  2014 scripts

The solution is to copy the directory:

bash-4.1$ cp -r ~/src/OpenModelica/build/share/omc/runtime /usr/local/openmodelica/share/omc
bash-4.1$ /usr/local/openmodelica/bin/omc VanDerPol.mos
true
""
true
""
"SimCode: The model VanDerPol has been translated to FMU"
"Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
"
bash-4.1$ ls -l *.fmu
-rw-rw-r-- 1 jenkins jenkins 866471 Dec 22 08:15 VanDerPol.fmu
bash-4.1$ 

Change History (4)

comment:1 by Martin Sjölund, 9 years ago

Milestone: Future1.9.4
Owner: changed from somebody to Martin Sjölund
Status: newaccepted

comment:2 by Martin Sjölund, 9 years ago

Component: *unknown*Build Environment
Resolution: fixed
Status: acceptedclosed

This should have been fixed since 67773353f

Version 0, edited 9 years ago by Martin Sjölund (next)

comment:3 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:4 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.