OpenModelica


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » josemaria.alkala
  • » Profile

Posts

Posts

Just for other who might hit this thread:
https://openmodelica.org/forum/default- … ak-v1-13-2

Jun-17-19 13:14:51
Packaging OpenModelica as a Flatpak
Category: Developer
Jun-17-19 13:12:57
Distribution of OpenModelica plus libraries using flatpak
Category: Developer

Dear all,
I have updated the flatpak to support v1.13.2. It was much less painful than when I created from scratch.

For those interested, it is at https://github.com/mantielero/openmodelica

As it is explained it requires, first to add the flathub remote. Then to install three dependences.

Later it requires BaseApp (it contains many of the dependencies for OpenModelica -in fact it has not changed from last version-).

Finally, installing Omedit.

TODO:
1. To create more desktop files to give access to other elements installed within the package (not just OMEdit).
2. Trying to make it part of flathub, for an easier installation (not requiring the compiling step).

With the hope of this being useful for somebody else, and without any kind of warranty of course.

Regards,
José M.

Jan-01-19 22:32:05
Packaging OpenModelica as a Flatpak
Category: Developer

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

Dec-22-18 13:38:06
Packaging OpenModelica as a Flatpak
Category: Developer

I left everything that could in
github - openmodelica

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

Dec-18-18 17:49:17
Packaging OpenModelica as a Flatpak
Category: Developer

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.

Sep-30-18 09:27:04
Packaging OpenModelica as a Flatpak
Category: Developer

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.



Sep-29-18 16:53:00
Packaging OpenModelica as a Flatpak
Category: Developer

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

Jul-02-18 11:39:37
Packaging OpenModelica as a Flatpak
Category: Developer

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.

Jul-02-18 09:32:42
Packaging OpenModelica as a Flatpak
Category: Developer

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.



                        May-30-17 17:45:39
                        Proposal about making easier for new users trying OpenModelica
                        Category: Developer

                        Dear all,
                        I suggest using Cameyo or ThinApp to create a portable version of the software for windows. I have tried myself but I failed  current/sad .

                        I also suggest creating an AppImage for Linux. This would be even more useful to avoid issues about dependencies in different distributions. I have tried to try the application under ArchLinux and it failed.

                        Kind regards,
                        José M.

                        • Index
                        • » Users
                        • » josemaria.alkala
                        • » Profile
                        You are here: