Package Details: openmodelica-git 1.20.0.dev.r320.g9cbaf6232e-1

Git Clone URL: https://aur.archlinux.org/openmodelica-git.git (read-only, click to copy)
Package Base: openmodelica-git
Description: The Open Source Modelica Suite
Upstream URL: https://openmodelica.org
Licenses: OSMC-PL
Conflicts: openmodelica, openmodelica-dev, openmodelica-svn
Provides: openmodelica
Submitter: Xwang
Maintainer: ElMastro
Last Packager: ElMastro
Votes: 11
Popularity: 0.000000
First Submitted: 2015-06-20 11:21 (UTC)
Last Updated: 2022-10-02 22:56 (UTC)

Dependencies (19)

Required by (0)

Sources (10)

Latest Comments

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

ElMastro commented on 2020-07-26 22:22 (UTC) (edited on 2020-07-28 10:44 (UTC) by ElMastro)

@Xwang: 1) it appears that coin-or-ipopt is where it gets some problems. It depends most probably on the Fortran GUI. 2) I can't recreate this problem, on my system qwt_plot.h is in the qwt package. 3) Filing a Bug is probably a way; this is another confirmation.

About the icons the problem is in the package part (all the "install -D -m644") so if we understand the script works I can change this part easily. I do believe OMSens should stay in the /usr as implied in the openmodelica settings.

Xwang commented on 2020-07-26 09:55 (UTC) (edited on 2020-07-26 10:55 (UTC) by Xwang)

Moreover I've seen that the build.sh contains --prefix=/opt/OpenModelica, but then the package function copies things in the /usr so I wonder if we want to put OpenModelica in /opt or in /usr

Xwang commented on 2020-07-26 09:10 (UTC) (edited on 2020-07-26 09:11 (UTC) by Xwang)

Today I've tried again building the PKGBUILD taken from the pastebin link date 2020-06-27.

I can confirm that: 1) coin-or-ipopt must be added to the depends list 2) makepkg gives the "PlotWindow.h:35:10: fatal error: qwt_plot.h: No such file or directory" 3) however executing this procedure: a) execute makepkg -o b) then manually compile executing in a bas the same commands which are in the build() function c) execute makepkg -R a package is made. So while this semi manual procedure seems to be able to at least turn around the makepkg build issue, should we open a bug versus makepkg because it is not compiling something which is compilable in a terminal?

Moreover executing namcap:

namcap openmodelica-git-1.16.0.dev.r267.g0c0d97d31-3-x86_64.pkg.tar.xz openmodelica-git E: ELF file ('usr/OMSens/old/fortran/tmp/SystemDynamics.WorldDynamics.World3.Scenario_1') outside of a valid path. ...

I get messages which highlight that a lot of things (icons and OMSens folders) are installed under usr instead that /opt/OpenModelica.

Finally the makepkg -R printed a lot of warning like this:

strip: ./opt/OpenModelica/lib/omlibrary/Buildings latest/Resources/Library/win64/ModelicaBuildingsPython3.6.lib(ModelicaBuildingsPython3.6.dll): recognised but unhandled machine type (0x8664) in Import Library Format archive

Can we avoid building also the windows libraries?

ElMastro commented on 2020-07-13 16:20 (UTC)

@ppenguin: Now I understand. I don't know what to do because I'm pretty sure makepkg shouldn't make that difference.

In particular if 'make' command gives different results inside or outside the makepkg environment, I image it will become difficult to make a working PKGBUILD for everybody.

A way to do it could be to start from the .deb package, but I don't think this could be considered a clean solution. I'm giving it a couple more trying to see why this is happening....

ppenguin commented on 2020-07-12 19:47 (UTC)

@ElMastro

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 (UTC)

@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 (UTC)

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

autoconf
./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/Autoconf.interface.mo:5:42-5:217:writable] 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/Autoconf.interface.mo:5:42-5:241:writable] 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/Autoconf.interface.mo:5:42-5:262:writable] 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 (UTC) (edited on 2020-06-27 21:56 (UTC) by ElMastro)

@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 (UTC)

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 (UTC) (edited on 2020-06-27 17:07 (UTC) by Xwang)

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.