#3610 closed defect (fixed)
Generating a fmu fails because share/omc/runtime/c is not present
| Reported by: | 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 , 10 years ago
| Milestone: | Future → 1.9.4 | 
|---|---|
| Owner: | changed from to | 
| Status: | new → accepted | 
comment:2 by , 10 years ago
| Component: | *unknown* → Build Environment | 
|---|---|
| Resolution: | → fixed | 
| Status: | accepted → closed | 
Version 0, edited 10 years ago by   (next)
          
  Note:
 See   TracTickets
 for help on using tickets.
    
This should have been fixed since 67773353f