Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3610 closed defect (fixed)

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

Reported by: cxh@… Owned by: sjoelund.se
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 Changed 9 years ago by sjoelund.se

  • Milestone changed from Future to 1.9.4
  • Owner changed from somebody to sjoelund.se
  • Status changed from new to accepted

comment:2 Changed 9 years ago by sjoelund.se

  • Component changed from *unknown* to Build Environment
  • Resolution set to fixed
  • Status changed from accepted to closed

This should have been fixed since 67773353f

Last edited 9 years ago by sjoelund.se (previous) (diff)

comment:3 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.4-1.9.x

Milestone renamed

comment:4 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4-1.9.x to 1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.