Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Flatpak for OpenModelica

Flatpak for OpenModelica

I have packaged part of OpenModelica as a Flatpak. I have hit many walls so far. The good news is that I can run OMEdit. The bad news is that when I try to run a simulation the pop-up window with the tab "Compilation" displays:

Code:

make -j8 -f ThermoSysPro.Examples.SimpleExamples.TestBend.makefile

execvp: No such file or directory

On the other hand, folder: /tmp/Openmodelica_user/OMEdit seems to be properly populated (ThermoSysPro.Examples.SimpleExamples.TestBend.makefile is there).

I have tried to keep dependencies to a minimum, so there probably I missed something important.

When I start OMEdit, I get also the following message:

Code:

[1] 10:59:15 Scripting Error

libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
sh: perl: command not found

The question is: is there a way to found out what is the piece I am missing? The message "execvp: No such file or directory" is not very helpful.

I'm NOT experienced neither with flatpak nor with openmodelica.

Regarding flatpak, currently I am packaging:

    omniorb
      omniorbpy
        lapack
          boost
            lpsolve55
              qtwebkit
                fmilib
                  openmodelica-omc
                    openmodelica-omplot
                      openmodelica-omedit
                        openmodelica-omlibraries

                        If you need further information, don't hesitate to ask.

                        Regards,
                        José M.



                        Re: Flatpak for OpenModelica

                        Well, the reason seemed to be that "make" wasn't available at all. It is availble during flatpak's building phase, but not during the execution phase.

                        Re: Flatpak for OpenModelica

                        Hi josemaria,

                        how did you get lpsolve to work with flatpak? Do you have a manifest?

                        Best regards,

                        Martin

                        Re: Flatpak for OpenModelica

                        The file that I had was:

                        Code:


                        {
                           "app-id": "org.kde.Openmodelica",
                           /* "runtime": "org.kde.Platform", */
                           "runtime" : "org.kde.Sdk",
                           "runtime-version": "5.11",
                           "sdk": "org.kde.Sdk",
                           "sdk-extensions": [
                              "org.freedesktop.Sdk.Extension.openjdk9",
                              "org.freedesktop.Sdk.Extension.gfortran-62"
                           ],
                           "command": "OMEdit",
                           "finish-args": [
                              "--share=ipc", "--socket=x11",
                              "--socket=pulseaudio",
                              "--share=network",
                              "--device=all",
                              "--filesystem=home",
                              "--filesystem=/tmp",
                              "--env=SALOMEDIR=/app/bin",
                              "--env=PATH=/usr/lib/sdk/gfortran-62/bin:/usr/lib/sdk/openjdk9/bin:/app/bin:/usr/bin",
                              "--env=LD_LIBRARY_PATH=/usr/lib/sdk/gfortran-62/lib:/app/lib:/app/lib64",
                              "--env=LIBRARY_PATH=/usr/lib/sdk/gfortran-62/lib:/app/lib:/app/lib64",
                              "--env=JAVA_HOME=/usr/lib/sdk/openjdk9/bin",
                              "--env=BOOST_ROOT=/app",
                              "--env=BOOST_LIBRARYDIR=/app/lib",
                              "--env=BOOST_INCLUDE_DIR=/app/include/boost",
                              "--env=CC=/usr/bin/clang",
                              "--env=CXX=/usr/bin/clang++"
                           ],

                           "modules": [
                              {
                                 "name": "omniorb",
                                 "sources": [
                                    {
                                       "type": "archive",
                                       "url": "https://sourceforge.net/projects/omniorb/files/omniORB/omniORB-4.2.2/omniORB-4.2.2.tar.bz2",
                                       "sha256": "ddd909ce31014be2beebf67a5e9fabbf03b5bb0c26b8c53ab64d470d77348ece"
                                    }
                                 ]
                              },
                              {
                                 "name": "omniorbpy",
                                 "sources": [
                                    {
                                       "type": "archive",
                                       "url": "https://sourceforge.net/projects/omniorb/files/omniORBpy/omniORBpy-4.2.2/omniORBpy-4.2.2.tar.bz2",
                                       "sha256": "f3686e5f85b7c7fec83a1ec97dc6874d336e24830c0e68f1e1ecbd798fa1696a"
                                    }
                                 ]
                              },
                              {
                                 "name": "lapack",
                                 "buildsystem": "cmake",
                                 "builddir": true,
                                 "config-opts": [
                                    "-DCMAKE_BUILD_TYPE=Release",
                                    "-DCMAKE_SKIP_RPATH=ON",
                                    "-DBUILD_SHARED_LIBS=ON",
                                    "-DBUILD_TESTING=OFF",
                                    "-DCMAKE_INSTALL_PREFIX=/app",
                                    "-DCMAKE_INSTALL_LIBDIR=lib",
                                    "-DCMAKE_Fortran_COMPILER=gfortran",
                                    "-DLAPACKE_WITH_TMG=ON",
                                    "-DCBLAS=ON",
                                    "-DBUILD_DEPRECATED=ON"
                                 ],
                                 "build-options": {
                                    "env": {
                                       "PATH": "/usr/lib/sdk/gfortran-62/bin:/app/bin:/usr/bin"
                                    }
                                 },
                                 "sources": [
                                    {
                                       "type": "archive",
                                       "url": "http://www.netlib.org/lapack/lapack-3.8.0.tar.gz",
                                       "sha256": "deb22cc4a6120bff72621155a9917f485f96ef8319ac074a7afbc68aab88bcf6"
                                    }
                                 ]
                              },
                              {
                                 "name": "boost",
                                 "buildsystem": "simple",
                                 "build-commands": [
                                    "./bootstrap.sh --prefix=/app --with-toolset=gcc --with-icu --with-python=/usr/bin/python2",
                                    "./b2",
                                    "./bjam install"
                                 ],
                                 "sources": [
                                    {
                                       "type": "archive",
                                       "url": "https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz",
                                       "sha256": "8aa4e330c870ef50a896634c931adf468b21f8a69b77007e45c444151229f665"
                                    }
                                 ]
                              },
                              {
                                 "name": "lpsolve55",
                                 "buildsystem": "simple",
                                 "build-commands": [
                                    "pwd",
                                    "ls --color",
                                    "cd /run/build/lpsolve55/lpsolve55 && sh -x ccc",
                                    "cd /run/build/lpsolve55/lp_solve && sh -x ccc",
                                    "install -m 755 /run/build/lpsolve55/lpsolve55/bin/ux*/liblpsolve55.so /app/lib",
                                    "install -m 755 /run/build/lpsolve55/lp_solve/bin/ux*/* /app/bin",
                                    "install -d /app/include/lpsolve",
                                    "install -m 644 /run/build/lpsolve55/lp*.h /app/include/lpsolve/"


                                 ],
                                 "sources": [
                                    {
                                       "type": "archive",
                                       "url": "https://sourceforge.net/projects/lpsolve/files/lpsolve/5.5.2.5/lp_solve_5.5.2.5_source.tar.gz",
                                       "sha256": "201a7c62b8b3360c884ee2a73ed7667e5716fc1e809755053b398c2f5b0cf28a"
                                    },
                                    {
                                        "type": "patch",
                                        "path": "cflags.patch"
                                    },
                                    {
                                        "type": "patch",
                                        "path": "lpsolve-5.5.2.0.defines.patch"
                                    }
                                 ]
                              },

                              /* qtwebkit */
                              {
                                 "name": "qtwebkit",
                                 "buildsystem": "cmake",
                                 "builddir": true,
                                 "config-opts": [
                                    "-DCMAKE_BUILD_TYPE=Release",
                                    "-DPORT=Qt",
                                    "-DENABLE_TOOLS=OFF",
                                    "-DCMAKE_INSTALL_PREFIX=/app"
                                 ],
                                 "build-options" : {
                                    "env" : {
                                       "CC" : "/usr/bin/clang",
                                       "CXX" : "/usr/bin/clang++"
                                    }
                                 },
                                 "sources": [
                                    {
                                       "type": "git",
                                       "url": "http://code.qt.io/cgit/qt/qtwebkit.git/",
                                       "branch" : "5.212", /*                "tag" : "v5.212.0-alpha2", */
                                       /* "commit" : "025cd3fc8d29620535309aa3e2ab7075aad36044", */
                                       "disable-shallow-clone" : true
                                    }
                                 ],

                                 "post-install" : [
                                       "sed -e 's|/app/include/Qt5WebKit|/app/include/QtWebKit|' -i /app/lib64/pkgconfig/Qt5WebKit.pc",
                                       "sed -e 's|/app/include/Qt5WebKitWidgets|/app/include/QtWebKitWidgets|' -i /app/lib64/pkgconfig/Qt5WebKitWidgets.pc"
                                 ]
                              },

                              {
                                 "name": "fmilib",
                                 "buildsystem": "simple",
                                 "build-commands" : [
                                    "mkdir fmilib/build_dir",
                                    "sed -i '/CMAKE_INSTALL_PREFIX/d' fmilib/CMakeLists.txt",
                                    "cd fmilib/build_dir && cmake -DCMAKE_INSTALL_PREFIX=/app ..",
                                    "cd fmilib/build_dir && make",
                                    "cd fmilib/build_dir && make install"
                                 ],

                                 "sources": [
                                    {
                                     "type": "svn",
                                     "url": "https://svn.jmodelica.org/FMILibrary/tags/2.0.3/",
                                     "dest" : "fmilib"
                                    }
                                 ]
                              },

                              {
                                 "name": "openmodelica-omc",
                                 "buildsystem": "simple",
                                 "build-options": {
                                    "env": {
                                       "PATH": "/usr/lib/sdk/gfortran-62/bin:/usr/lib/sdk/openjdk9/bin:/app/bin:/usr/bin",
                                       "LD_LIBRARY_PATH": "/usr/lib/sdk/gfortran-62/lib:/app/lib",
                                       "LIBRARY_PATH": "/usr/lib/sdk/gfortran-62/lib:/app/lib",
                                       "JAVA_HOME": "/usr/lib/sdk/openjdk9/bin",
                                       "BOOST_ROOT" : "/app",
                                       "BOOST_LIBRARYDIR" : "/app/lib",
                                       "BOOST_INCLUDE_DIR" : "/app/include/boost",
                                       "CC" : "/usr/bin/clang",
                                       "CXX" : "/usr/bin/clang++",
                                       "CPPFLAGS" : "-DH5_USE_18_API"
                                    }
                                 },
                                 "build-commands": [
                                    "autoconf",
                                    "./configure --prefix=/app --disable-modelica3d --without-omc  --with-omniORB  --with-cppruntime --with-lapack='-llapack -lblas'",
                                    "make -j8",
                                    "cd build && cp -r * /app"
                                 ],
                                 "sources": [
                                    {
                                     "type": "git",
                                     "url": "https://github.com/OpenModelica/OMCompiler.git"
                                    }
                                 ]
                              },

                              {
                                 "name": "openmodelica-omplot",
                                 "buildsystem": "simple",
                                 "build-options": {
                                    "env": {
                                       "PATH": "/usr/lib/sdk/gfortran-62/bin:/usr/lib/sdk/openjdk9/bin:/app/bin:/usr/bin",
                                       "LD_LIBRARY_PATH": "/usr/lib/sdk/gfortran-62/lib:/app/lib",
                                       "LIBRARY_PATH": "/usr/lib/sdk/gfortran-62/lib:/app/lib",
                                       "JAVA_HOME": "/usr/lib/sdk/openjdk9/bin",
                                       "BOOST_ROOT" : "/app",
                                       "BOOST_LIBRARYDIR" : "/app/lib",
                                       "BOOST_INCLUDE_DIR" : "/app/include/boost",
                                       "CC" : "/usr/bin/clang",
                                       "CXX" : "/usr/bin/clang++",
                                       "CPPFLAGS" : "-DH5_USE_18_API"
                                    }
                                 },
                                 "build-commands": [
                                    /* Building qwt */
                                    "cd qwt && pwd",
                                    "cd qwt && ls --color",
                                    "autoconf",
                                    "./configure --prefix=/app --with-omniORB",
                                    "make qwt-build",
                                    "cd qwt/build && cp -r include /app",
                                    "cd qwt/build && cp -r include /app",
                                    "cd qwt/build && cp -r features /app",
                                    "cd qwt/build && cp -r lib /app",
                                    /* Building omplot */
                                    "make",
                                    "make install",
                                    "mkdir -p /app/include/omplot",
                                    "cp -a OMPlot/OMPlotGUI/*.h /app/include/omplot"
                                 ],
                                 "sources": [
                                    {
                                     "type": "git",
                                     "url": "https://github.com/OpenModelica/OMPlot.git"
                                    }
                                 ]
                              },


                           {
                              "name": "openmodelica-omedit",
                              "buildsystem": "simple",
                              "build-options": {
                                 "env": {
                                    "PATH": "/usr/lib/sdk/gfortran-62/bin:/usr/lib/sdk/openjdk9/bin:/app/bin:/usr/bin",
                                    "LD_LIBRARY_PATH": "/usr/lib/sdk/gfortran-62/lib:/app/lib:/app/lib64",
                                    "LIBRARY_PATH": "/usr/lib/sdk/gfortran-62/lib:/app/lib:/app/lib64",
                                    "JAVA_HOME": "/usr/lib/sdk/openjdk9/bin",
                                    "BOOST_ROOT" : "/app",
                                    "BOOST_LIBRARYDIR" : "/app/lib",
                                    "BOOST_INCLUDE_DIR" : "/app/include/boost",
                                    "CC" : "/usr/bin/clang",
                                    "CXX" : "/usr/bin/clang++",
                                    "CPPFLAGS" : "-DH5_USE_18_API",
                                    "OPENMODELICAHOME" : "/app",
                                    "PKG_CONFIG_PATH" : "/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/app/lib64/pkgconfig",
                                    "QMAKEPATH" : "/app"
                                 }
                              },
                              "build-commands": [
                                 "autoconf",
                                 "./configure --prefix=/app --with-omniORB  --with-cppruntime --with-lapack='-llapack -lblas'",
                                 "make",
                                 "cd build && cp -r * /app"
                              ],
                              "sources": [
                                 {
                                 "type": "git",
                                 "url": "https://github.com/OpenModelica/OMEdit.git"
                              },
                              {
                                 "type": "file",
                                 "path": "org.kde.Openmodelica.omedit.desktop"
                              },
                              {
                                 "type": "file",
                                 "path": "org.kde.Openmodelica.omedit.256.png"
                              },
                              {
                                 "type": "file",
                                 "path": "org.kde.Openmodelica.omedit.128.png"
                              },
                              {
                                 "type": "file",
                                 "path": "org.kde.Openmodelica.omedit.64.png"
                              }
                              ],
                              "post-install" : [
                                    "install -Dm644 org.kde.Openmodelica.omedit.desktop /app/share/applications/org.kde.Openmodelica.OMEdit.desktop",
                                    "install -Dm644 org.kde.Openmodelica.omedit.256.png /app/share/icons/hicolor/256x256/apps/org.kde.Openmodelica.OMEdit.png",
                                    "install -Dm644 org.kde.Openmodelica.omedit.128.png /app/share/icons/hicolor/128x128/apps/org.kde.Openmodelica.OMEdit.png",
                                    "install -Dm644 org.kde.Openmodelica.omedit.64.png /app/share/icons/hicolor/64x64/apps/org.kde.Openmodelica.OMEdit.png"
                              ]
                           },

                           /*   LIBRARIES */

                           {
                              "name": "openmodelica-omlibraries",
                              "buildsystem": "simple",
                              "build-commands": [
                                 "mkdir -p /app/lib/omlibrary",
                                 "mv * /app/lib/omlibrary"
                              ],
                              "sources": [
                                 {
                                 "type": "archive",
                                 "path": "openmodelica-omlibreries_20180630.tar.gz"
                                 }
                              ]

                           },

                           /* Compiling simulations */
                           {
                              "name" : "make",
                              "buildsystem" : "autotools",

                              "sources" : [
                                 {
                                    "type" : "archive",
                                    "url" : "https://ftp.gnu.org/gnu/make/make-4.2.tar.gz",
                                    "sha256": "e968ce3c57ad39a593a92339e23eb148af6296b9f40aa453a9a9202c99d34436"
                                 }
                              ]
                           },


                           {
                              "name" : "isl",
                              "no-autogen" : true,
                              "sources" : [
                                 {
                                    "type" : "archive",
                                    "url" : "http://isl.gforge.inria.fr/isl-0.19.tar.bz2",
                                    "sha256": "d59726f34f7852a081fbd3defd1ab2136f174110fc2e0c8d10bb122173fa9ed8"
                                 }

                              ]
                           }







                           ]
                        }

                        I hope this helps you.

                        Cheers,
                        José María

                        Re: Flatpak for OpenModelica

                        Hi Maria,

                        thank you very much. Do you have also the patches used in this manifest?

                        Cheers,

                        Martin

                        Re: Flatpak for OpenModelica

                        Yes I have. You can find it here:

                        https://drive.google.com/file/d/17C3wiN … sp=sharing

                        Please, leave me a comment when you download it in order to delete it.

                        I played a bit with flatpak and then I don't remember why I stopped. I think I stopped when I started to think on the OpenModelica libraries.

                        I succeed more than myself. It would help a lot to make easier working with OpenModelica under Linux distributions.

                        Regards,
                        José M.



                        Re: Flatpak for OpenModelica

                        josemaria.alkala wrote:



                        I succeed more than myself. It would help a lot to make easier working with OpenModelica under Linux distributions.

                        Yes this is also my reason I would like to create one. If I have a working manifest, I will upload to github, so everybody can use it.

                        I downloaded the patches. Thanks

                        Here you can find my manifest:
                        https://github.com/Murmele/OpenModelica/tree/Flatpak

                        at the moment I have the problem, that some functions are undefined. I added now some flags from your manifest. hopefully it solves this problem.

                        Edited by: Murmele93 - Sep-30-18 09:41:51

                        Re: Flatpak for OpenModelica

                        Dear all,
                        Finally I have created a flatpak for OpenModelica. I left a single file: OpenModelica.flatpak (213Mb) to make an easy and quick (avoiding compilation) installation. Only for x64 right now.

                        You need to have "flatpak" installed on your Linux distribution.

                        In order to install it:

                        Code:


                        flatpak install OpenModelica.flatpak

                        In order to execute you can try:

                        Code:


                        flatpak run sci.openmodelica.Omedit

                        or directly:

                        Code:


                        sci.openmodelica.Omedit

                        Regards,
                        José M.

                        Edited by: josemaria.alkala - Dec-18-18 17:50:25

                        Re: Flatpak for OpenModelica

                        Hi José M. ,

                        great work! Can I see the manifest so I can see what I did wrong? ^^

                        Best regards,

                        Martin

                        Re: Flatpak for OpenModelica

                        I left everything that could in
                        github - openmodelica

                        I hope to solve the issue with the libraries this Christmas time.

                        Re: Flatpak for OpenModelica

                        Solved. I have managed to build OMLibraries. The code in github now should work.

                        Re: Flatpak for OpenModelica

                        Congratulation! I will test it the next days current/smile

                        Re: Flatpak for OpenModelica

                        There are 0 guests and 0 other users also viewing this topic
                        You are here: