Package Details: openmodelica-git

Git Clone URL: (read-only, click to copy)
Package Base: openmodelica-git
Description: The Open Source Modelica Suite
Upstream URL:
Licenses: OSMC-PL
Conflicts: openmodelica, openmodelica-dev, openmodelica-svn
Provides: openmodelica
Submitter: Xwang
Maintainer: ElMastro
Last Packager: ElMastro
Votes: 10
Popularity: 0.083533
First Submitted: 2015-06-20 11:21
Last Updated: 2021-02-13 23:23

Dependencies (18)

Required by (0)

Sources (10)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 ... Next › Last »

ppenguin commented on 2020-07-12 19:47


Just to clarify: I had to add the escapes in the CFLAGS to make it work within the PKGBUILD. Outside the PKGBUILD building has worked for me since I posted the ppenguin git fork the first time.

But what surprises me is the regression further down the line which is "escape related" but only occurs within the PKGBUILD. It is interesting however, that even so you get somewhat different errors with the PKGBUILD than I do.

But what I really don't understand is that the PKGBUILD behaves so much different from a manual compile, even though it "just" executes a few bash commands?

As for your last observation: indeed I have been (lightly) using the OM version I compiled manually from my fork and it was behaving well.

ElMastro commented on 2020-07-12 18:42

@ppenguin: it appears that the \ escape is valid only on Windows. I found that the error disappear changing

./configure --prefix=/opt/OpenModelica --without-ipopt --with-omlibrary=all CFLAGS='-I/usr/include/qwt -I/usr/include/coin-or -I/usr/include/coin -L/usr/lib'

After that I get

Error: Class realAlmostEq not found in scope CodegenFMUCommon.baseUnitAttributes.$match scope$.$pattern type scope$ (looking for a function or record)

I have tried compiling the package outside of the PKGBUILD in the last weeks, and for what I understand it seems to do always what is supposed to do.

ppenguin commented on 2020-07-11 18:45

I found a spare minute and checked out the PKGBUILD. I also got the qwt_plot.h error.

When cloning manually and executing the two .sh build scripts it again compiles successfully, but the PKGBUILD does not.

I noticed preceding the error that the expanded CFLAGS were missing spaces:

g++ -c -g -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -w -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WEBKITWIDGETS_LIB -DQT_WIDGETS_LIB -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qwt-I/usr/include/coin-or-I/usr/include/coin-L/usr/lib -I../../../build/include/omc/c -isystem /usr/include/qt -isystem /usr/include/qt/QtPrintSupport -isystem /usr/include/qt/QtWebKitWidgets -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtWebKit -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtXml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I../generatedfiles/moc -I/usr/lib/qt/mkspecs/linux-g++ -o moc_oms.o ../generatedfiles/moc/moc_oms.cpp
In file included from OMPlot.h:37,
                 from PlotZoomer.h:37,
                 from PlotZoomer.cpp:34:
PlotWindow.h:35:10: fatal error: qwt_plot.h: No such file or directory
   35 | #include <qwt_plot.h>

which would be a good explanation for the error. So this is something that happens in the PKGBUILD which doesn't happen during manual compile. I'm not sure about the workings of makepkg, but what did the trick for now was putting the contents of the build scripts directly in build() and escape the CFLAGS:

build() {

cd "$srcdir/OpenModelica"

git submodule foreach --recursive "git checkout master"
git submodule foreach --recursive "git pull"
git submodule update --force --init --recursive

rm -rf OMCompiler/3rdParty/Ipopt
rm -rf OMPlot/qwt

./configure --prefix=/opt/OpenModelica --without-ipopt --with-omlibrary=all CFLAGS='-I/usr/include/qwt\ -I/usr/include/coin-or\ -I/usr/include/coin\ -L/usr/lib'
make -j24


That seems to have taken care of that issue, but now another one pops up, also related to escaping:

make[5]: *** [Makefile.common:151: build/Util.stamp] Error 1
3 errors out of 3 messages:06/6562), 38.88 MiB | 460.00 KiB/s/s
[/home/jeroen/devel/tmp/AUR_test/openmodelica-git/src/OpenModelica/OMCompiler/Compiler/boot/build/] Error: Lexer treating \ as \\, since \  is not a valid Modelica escape sequence.
[/home/jeroen/devel/tmp/AUR_test/openmodelica-git/src/OpenModelica/OMCompiler/Compiler/boot/build/] Error: Lexer treating \ as \\, since \  is not a valid Modelica escape sequence.
[/home/jeroen/devel/tmp/AUR_test/openmodelica-git/src/OpenModelica/OMCompiler/Compiler/boot/build/] Error: Lexer treating \ as \\, since \  is not a valid Modelica escape sequence.

This seems quite suspect, since it definitely doesn't happen on a "manual" build on my machine. In what way could makepkg mess up with escaping???

While at it: the lib32 deps don't appear to be necessary, and I removed the jdk8 dep as well (I suppose it needs some jdk, but I se a more modern one which works as well...).

ElMastro commented on 2020-06-27 21:54

@Xwang, qwt installs qwt_plot.h in /usr/include/qwt/qwt_plot.h. Probably there is something wrong there. About the errors mine is different, seems to be implied in the Models, as it says

make[4]:  [Makefile.common:153: build/CodegenFMUCommon.stamp] Errore 1
make[3]:  [Makefile.common:15: generate-files-in-steps] Errore 2
make[2]: *** [Makefile.common:6: all] Errore 2
So i suppose OMC compilation here works

Xwang commented on 2020-06-27 17:51

After addin the coni-or-ipopt dependencies, I've tried again and it give this error:

In file included from Plot.cpp:34:
PlotWindow.h:35:10: fatal error: qwt_plot.h: File o directory non esistente
   35 | #include <qwt_plot.h>

... but qwt is already a dependency.

Xwang commented on 2020-06-27 15:54

I've tried ant I've got the following error:

In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdlib.h:25,
                 from ./optimization/DataManagement/../../openmodelica.h:46,
                 from ./optimization/DataManagement/MoveData.c:34:
/usr/include/features.h:397:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
  397 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~
In file included from ./optimization/DataManagement/MoveData.c:37:
./optimization/DataManagement/../OptimizerData.h:38:10: fatal error: coin/IpStdCInterface.h: File o directory non esistente
   38 | #include <coin/IpStdCInterface.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile.common:260: build/c/./optimization/DataManagement/MoveData.o] Errore 1
make[3]: uscita dalla directory «/home/andreak/tmp/trizen-andreak/openmodelica-git/src/OpenModelica/OMCompiler/SimulationRuntime/c»
make[2]: *** [Makefile.common:122: interactive] Errore 2
make[2]: uscita dalla directory «/home/andreak/tmp/trizen-andreak/openmodelica-git/src/OpenModelica/OMCompiler»
make[1]: *** [Makefile:98: omc-bootstrapped] Errore 2
make[1]: uscita dalla directory «/home/andreak/tmp/trizen-andreak/openmodelica-git/src/OpenModelica/OMCompiler»
make: *** [Makefile:12: omc.skip] Errore 2
==> ERRORE: Si è verificato un errore in build().
    L'operazione sta per essere interrotta...

Did you get the same error? It seems it is looking for a file provided by the coin-or-ipopt package which is not in the dependencies list.

ElMastro commented on 2020-06-27 14:31

I can't make it work. Next week I'll sign on GIT and file the Issue. If someone would like to try it, I tried

ppenguin commented on 2020-06-24 17:07

@ElMastro are you cloning/pulling ppenguin/OpenModelica? Is actually pulling ppenguin/* subrepos? The general idea was that the scripts show how to basically do it in 3 steps:

  1. pull/clone ppenguin/OpenModelica
  2. run upd-submods
  3. run (actually this is just configure)

Then make && make install

If during these steps you get a failure, could you file an issue with description and outputs on

ElMastro commented on 2020-06-24 16:47

@ppenguin: I can't make it work. Could please a file with the instructions be added to confirm how to do it? I followed but I'm still doing something wrong...

ppenguin commented on 2020-06-21 12:55

@ElMastro It was a bit more involved, because the OpenModelica included qwt lib doesn't compile against Qt5.15. So I ended up forking the OM repo and the referenced sub-repos. Feel free to pull them from the PKGBUILD or fork them: ppenguin/OpenModelica. (Since it works now and I'm short on time I won't hack on them anytime soon.)

Then check the contents of upd-submod (basically just the same you normally do, probably no changes needed to PKGBUILD) and (for the configure CFLAGS, these are necessary).

With these I get a clean build, so what's left I guess is making sure to add qwt, coin-or-ipopt and mumps as dependencies.

One could consider to take sundials also out of the tree, and make it a normal dependency. (Would need updating submodule for 3rd party in repo).

Cheers, ppenguin