Main /
OpenModelicaResourcesInstallationThe installation instructions seem to change over time, so your best bet is to review the instructions at https://www.openmodelica.org/ Below are notes about issues when building for Mac OS X and Linux. 12/21/2015 Building OpenModelica Under Mac OS X 10.11.1 (El Capitan)MY_FORK=MyGitHubUserName ; git clone https://openmodelica.org/git-readonly/OpenModelica.git --recursive && (cd OpenModelica && git remote set-url --push origin git@github.com:$MY_FORK/OpenModelica.git && git submodule foreach --recursive 'git remote set-url --push origin `git config --get remote.origin.url | sed s,^.*/,git@github.com:'$MY_FORK'/,`') export CFLAGS=-I/opt/local/include export LDFLAGS=-L/opt/local/lib export PATH=/opt/local/libexec/qt4/bin:${PATH} cd OpenModelica autoconf ./configure --disable-omshell-terminal --disable-modelica3d --without-omc --prefix=/usr/local/openmodelica --without-paradiseo --disable-omnotebook --disable-python-interface --with-omniORB=/usr/local/omniORB-4.2.0 --with-lapack="-llapack -lblas make omc make install Mac: checking LAPACK/BLAS flags... configure: error: dgesv or dswap not foundWhile running checking for gethostbyname... yes checking LAPACK/BLAS flags... configure: error: dgesv or dswap not found configure: error: ./configure failed for OMCompiler Solution: Run Could not find qmake (QT4)checking for lrelease-qt4... no checking for lrelease... no configure: error: Could not find qmake (QT4) configure: error: ./configure failed for OMPlot Solution: export PATH=/opt/local/libexec/qt4/bin:${PATH} Installing via Macport does not include buildproject.Installing with Macports as per https://openmodelica.org/download/download-mac results in an installation that cannot build fmus: ealmac23:~ root# omc --version OpenModelica 1.9.4~dev-610-g940da3e bash-3.2$ omc VanDerPol.mos 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 /opt/local/include/omc/c/* VanDerPol.fmutmp/sources/include/ cp -a /opt/local/share/omc/runtime/c/fmi/buildproject/* VanDerPol.fmutmp/sources cp: /opt/local/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 /opt/local/include/omc/c/* VanDerPol.fmutmp/sources/include/ cp -a /opt/local/share/omc/runtime/c/fmi/buildproject/* VanDerPol.fmutmp/sources cp: /opt/local/share/omc/runtime/c/fmi/buildproject/*: No such file or directory make: *** [fmu] Error 1 " bash-3.2$ The workaround was to install and build from Github. CMake Error at cmake/Config.cmake:11 (message): Unsupported version of OS X : 10.11.1mkdir -p ParadisEO-2.0.1/build (cd ParadisEO-2.0.1/build && CC="gcc" CXX="g++" CFLAGS="-I/opt/local/include" CPPFLAGS="" CXXFLAGS="-g -O2" c\ make ..) -- The C compiler identification is AppleClang 7.0.2.7000181 -- The CXX compiler identification is AppleClang 7.0.2.7000181 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/g++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Doxygen: /Applications/Doxygen.app/Contents/Resources/doxygen (found version "1.8.9.1") CMake Error at cmake/Config.cmake:11 (message): Unsupported version of OS X : 10.11.1 Call Stack (most recent call first): CMakeLists.txt:41 (include) -- Configuring incomplete, errors occurred! See also "/Users/cxh/src/OpenModelica/OMOptim/ParadisEO-2.0.1/build/CMakeFiles/CMakeOutput.log". make[1]: *** [ParadisEO-2.0.1/build/Makefile] Error 1 make: *** [omoptim] Error 2 Solution: In string(REGEX REPLACE "10\\.([0-9]).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}") to: string(REGEX REPLACE "10\\.([0-9]*).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}") 12/20/2015 Building OpenModelica Under RHEL 6.7unset LD_LIBRARY_PATH MY_FORK=MyGitHubUserName ; git clone https://openmodelica.org/git-readonly/OpenModelica.git --recursive && (cd OpenModelica && git remote set-url --push origin git@github.com:$MY_FORK/OpenModelica.git && git submodule foreach --recursive 'git remote set-url --push origin `git config --get remote.origin.url | sed s,^.*/,git@github.com:'$MY_FORK'/,`') export LD_LIBRARY_PATH=/usr/local/gcc-4.9.2/lib64:/usr/local/omniORB-4.2.0/lib:${LD_LIBRARY_PATH} export LDFLAGS=-L/usr/local/omniORB-4.2.0/lib export PATH=/usr/lib64/qt4/bin:${PATH} autoconf ./configure --disable-modelica3d --without-omc --prefix=/usr/local/openmodelica --with-lapack="-L/usr/lib64 -llapack -lblas" --with-omniORB=/usr/local/omniORB-4.2.0 make clean make omc See Under RHEL, Below are the various error messages I ran in to when determining the above. Git fails with Error Setting Certificate Verify Locationsbash-4.1$ cat /etc/system-release Red Hat Enterprise Linux Server release 6.7 (Santiago) bash-4.1$ git --version git version 2.2.1 bash-4.1$ git clone https://github.com/OpenModelica/OpenModelica.git Cloning into 'OpenModelica'... fatal: unable to access 'https://github.com/OpenModelica/OpenModelica.git/': error setting certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none bash-4.1$ The message bash-4.1$ unset LD_LIBRARY_PATH bash-4.1$ git clone https://github.com/OpenModelica/OpenModelica.git Cloning into 'OpenModelica'... remote: Counting objects: 2906, done. remote: Compressing objects: 100% (56/56), done. remote: Total 2906 (delta 27), reused 0 (delta 0), pack-reused 2850 Receiving objects: 100% (2906/2906), 464.28 KiB | 508.00 KiB/s, done. Resolving deltas: 100% (1473/1473), done. Checking connectivity... done. bash-4.1$ autoconf fails because common/m4/pre-commit.m4 is not found.The bash-4.1$ rm -rf OpenModelica/ bash-4.1$ git clone https://github.com/OpenModelica/OpenModelica.git Cloning into 'OpenModelica'... remote: Counting objects: 2906, done. remote: Compressing objects: 100% (56/56), done. remote: Total 2906 (delta 27), reused 0 (delta 0), pack-reused 2850 Receiving objects: 100% (2906/2906), 464.28 KiB | 207.00 KiB/s, done. Resolving deltas: 100% (1473/1473), done. Checking connectivity... done. bash-4.1$ cd OpenModelica/ bash-4.1$ ls common CONTRIBUTING.md libraries Makefile.omdev.mingw OMEdit OMOptim OMShell testsuite configure.ac doc Makefile.in OMCompiler OMNotebook OMPlot README.md bash-4.1$ autoconf /usr/bin/m4:configure.ac:9: cannot open `common/m4/pre-commit.m4': No such file or directory /usr/bin/m4:configure.ac:10: cannot open `common/m4/ombuilddir.m4': No such file or directory /usr/bin/m4:configure.ac:11: cannot open `common/m4/omhome.m4': No such file or directory /usr/bin/m4:configure.ac:75: cannot open `common/m4/corba.m4': No such file or directory autom4te: /usr/bin/m4 failed with exit status: 1 bash-4.1$ This is because the OpenModelica repo is a superproject and requires further work. The OpenModelica GitHub repo is a superproject, see https://github.com/OpenModelica/OpenModelica RHEL 6.7 The # Replace the openmodelica.org pull URL with https://github.com/OpenModelica/OpenModelica.git if you want to pull directly from github # The default choice is to push to your fork on github.com (SSH). Replace MY_FORK with OpenModelica to push directly to the OpenModelica repositories (if you have access) MY_FORK=MyGitHubUserName ; git clone https://openmodelica.org/git-readonly/OpenModelica.git --recursive && (cd OpenModelica && git remote set-url --push origin git@github.com:$MY_FORK/OpenModelica.git && git submodule foreach --recursive 'git remote set-url --push origin `git config --get remote.origin.url | sed s,^.*/,git@github.com:'$MY_FORK'/,`') Configure fails with: Could not find qmake (QT4)Under RHEL 6.7, configure fails: checking for lrelease... no configure: error: Could not find qmake (QT4) configure: error: ./configure failed for OMPlo Solution: Install qt4-devel sudo yum install qt4-devel then bash-4.1$ /usr/lib64/qt4/bin/qmake --version QMake version 2.01a Using Qt version 4.6.2 in /usr/lib64 bash-4.1$ export PATH=/usr/lib64/qt4/bin:${PATH} libomniORB4.so.2: cannot open shared object file: No such file or directoryWhile running make -f Makefile templates scripting make[5]: Entering directory `/home/jenkins/src/OpenModelica/OMCompiler/Compiler/boot' make -f Makefile --no-print-directory -C /home/jenkins/src/OpenModelica/OMCompiler/Compiler/Template ** AbsynDumpTpl template compilation ** /home/jenkins/src/OpenModelica/build/bin/omc AbsynDumpTpl.tpl > AbsynDumpTpl.mo.log || (cat AbsynDumpTpl.mo.log && false) /home/jenkins/src/OpenModelica/build/bin/omc: error while loading shared libraries: libomniORB4.so.2: cannot open shared object file: No such file or directory Solution: export LD_LIBRARY_PATH=/usr/local/gcc-4.9.2/lib64:/usr/local/omniORB-4.2.0/lib make
Variable inVarInfo.numStateVars not found in scope SimCodeUtil.getDefaultValueReference/home/jenkins/src/OpenModelica/build/bin/omc -n=1 build/SimCodeUtil.stamp.mos 2 errors out of 2 messages: [/home/jenkins/src/OpenModelica/OMCompiler/Compiler/SimCode/SimCodeUtil.mo:11764:3-11764:146:writable] Error: Variable inVarInfo.numStateVars not found in scope SimCodeUtil.getDefaultValueReference. [/home/jenkins/src/OpenModelica/OMCompiler/Compiler/SimCode/SimCodeUtil.mo:32:1-11922:16:writable] Error: Failed to compile all functions in package SimCodeUtil. make[4]: *** [build/SimCodeUtil.stamp] Error 1 make[3]: *** [generate-files-in-steps] Error 2 To replicate: bash-4.1$ cat /etc/system-release Red Hat Enterprise Linux Server release 6.7 (Santiago) bash-4.1$ /home/jenkins/src/OpenModelica/build/bin/omc --version v1.9.4-dev.719+ga6c7cb2 bash-4.1$ pwd /home/jenkins/src/OpenModelica/OMCompiler/Compiler/boot bash-4.1$ /home/jenkins/src/OpenModelica/build/bin/omc -n=1 build/SimCodeUtil.stamp.mos 2 errors out of 2 messages: [/home/jenkins/src/OpenModelica/OMCompiler/Compiler/SimCode/SimCodeUtil.mo:11764:3-11764:146:writable] Error: Variable inVarInfo.numStateVars not found in scope SimCodeUtil.getDefaultValueReference. [/home/jenkins/src/OpenModelica/OMCompiler/Compiler/SimCode/SimCodeUtil.mo:32:1-11922:16:writable] Error: Failed to compile all functions in package SimCodeUtil. bash-4.1$ #2512 can't compile trunk because of template incompatibilities suggests removing Under RHEL,
|