Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#5307 closed enhancement (fixed)

Update OMDev to include clang and updated QT libraries

Reported by: casella Owned by: adrpo
Priority: blocker Milestone: 1.17.0
Component: Build Environment Version:
Keywords: Cc:

Description

We need to update OMDev to the latest version of MSYS. This will include clang (#5043) and hopefully resolve some issues of QT in OMEdit (#5290). We should try to get this done before we release 1.14.0.

The work is already mostly done on Adrian's branch, but it needs more testing before being pushed to master.

Change History (21)

comment:1 Changed 5 years ago by casella

@adrpo, what is the status with this development?

comment:2 Changed 5 years ago by casella

@adrpo, this could also give a major boost to performance of OMEdit under Linux, because it will slash the compilation time by a factor four or more. Do you think it will be possible to get this in 1.14.0?

comment:3 follow-up: Changed 5 years ago by adrpo

@casella: on Linux we already do compile with clang and you can use clang to build the models.

I will start testing with a new msys/clang after the 1.14 beta is out.

comment:4 in reply to: ↑ 3 Changed 5 years ago by casella

Replying to adrpo:

@casella: on Linux we already do compile with clang and you can use clang to build the models.

I know. In fact, that's why I want it in Windows, because I've seen the performance you can get :)

I will start testing with a new msys/clang after the 1.14 beta is out.

OK

comment:5 Changed 5 years ago by casella

  • Milestone changed from 1.14.0 to 2.0.0

We should do this properly in 2.0.0. Too late for 1.14.0.

comment:6 Changed 5 years ago by ceraolo

Is there a chance of having this addressed for 1.14? I think of comment 3 for this.

Note that this should solve the years-long issue of a plus sign appearing after a few clicks on package leaves (which is huge on 4k screens) in libraries browser. Maybe it can solve also ticket #5645

comment:7 Changed 5 years ago by casella

@ceraolo, I am afraid that the potential of this change to break things are extensive, particularly since there are so many different Windows installations out there, including national locales, non-ASCII characters and stuff like that. We also need to make sure that it doesn't break FMI, OMSimulator, etc. The short beta testing period may not be long enough for that.

We are already very late with 1.14.0, I don't think trying to push this in 1.14.0 would be wise. I think it should be pushed ASAP on master after branching 1.14.0; we could then have one more release 1.15.0 before 2.0.0 that addresses this issue, and possibly includes some more funcitonality by the new front-end, in a not too distant future.

comment:8 follow-up: Changed 3 years ago by adrpo

  • Component changed from Third-Party Libraries to Build Environment
  • Milestone changed from 2.0.0 to 1.17.0

Everything builds with clang on msys2/mingw using these changes:

https://github.com/OpenModelica/OpenModelica/pull/6871

adrpo33@ida-0030 MINGW64 /c/home/adrpo33/dev/OpenModelica
# clang --version
clang version 11.0.0 (https://github.com/msys2/MINGW-packages 5153c6011279ba6c7e77b56e3565eb4567381531)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: E:\msys\mingw64\bin

# gcc --version
gcc.exe (Rev4, Built by MSYS2 project) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I haven't looked into compilation of simulation code yet, that is next.

The *only issue* is that the size of the msys2 installation will go up from 5.6GB o 11.4GB?!
That will make the OM installed size grow by about 2.5G.

Clang in msys2 is compiled statically so is huge, I solved that some time ago but they reverted my changes because lld randomly hanged.
https://github.com/msys2/MINGW-packages/issues/7190
I'll see if I can find another way to handle the clang size.

comment:9 in reply to: ↑ 8 Changed 3 years ago by casella

Replying to adrpo:

Everything builds with clang on msys2/mingw using these changes:

https://github.com/OpenModelica/OpenModelica/pull/6871

adrpo33@ida-0030 MINGW64 /c/home/adrpo33/dev/OpenModelica
# clang --version
clang version 11.0.0 (https://github.com/msys2/MINGW-packages 5153c6011279ba6c7e77b56e3565eb4567381531)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: E:\msys\mingw64\bin

# gcc --version
gcc.exe (Rev4, Built by MSYS2 project) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Good!

The *only issue* is that the size of the msys2 installation will go up from 5.6GB o 11.4GB?!
That will make the OM installed size grow by about 2.5G.

Do you mean "OM installer size"? Is it going from 1.3 GB to 3.8 GB? That won't be good.

However, we change MSYS once every pope's death (as we say in Italy). We could split the installer, so that you only install MSYS once (and you can choose not to uninstall it when you upgrade to a newer version). Or have an online installer that does the same, though I'd much prefer to have standalone installers, e.g. for easy classroom installation.

Maybe you can generate one big Windows nightly build installer that we can test and play around with and then revert to the old one while you find a solution.

comment:10 Changed 3 years ago by adrpo

OMDev has been updated, this PR will use clang to compile:
https://github.com/OpenModelica/OpenModelica/pull/6872

The installer is about 1.3 GB now compressed and unpacked 5GB.
The new one will be XX GB compressed unpacked 7GB.
XX to be determined on the first nightly build (if it works).

comment:11 Changed 3 years ago by adrpo

Finally PR: https://github.com/OpenModelica/OpenModelica/pull/6872
went through. Hopefully all stuff will be back to normal.

comment:12 Changed 3 years ago by adrpo

Latest issue: the installer is a bit more than 2GB compressed and NSIS doesn't want to build it.

comment:13 Changed 3 years ago by sjoelund.se

Remove all libraries?

comment:14 Changed 3 years ago by adrpo

Maybe just go for the core libraries?
The problem is really Clang and the fact is compiled statically.

comment:15 follow-up: Changed 3 years ago by adrpo

I will try to compile our own Clang with dynamic linking and if that fails I will go for the library removal.

comment:16 in reply to: ↑ 15 Changed 3 years ago by casella

Replying to adrpo:

I will try to compile our own Clang with dynamic linking and if that fails I will go for the library removal.

BTW, we do have a plan for the libraries, see #5726 and the new library manager. If we can follow suit on that before the release, I think having a larger nightly build installer for a while will be ok.

On the other hand, I guess compressed libraries do not take much space, they are annoying when uncompressed, because there are so many files.

comment:17 Changed 3 years ago by sjoelund.se

https://build.openmodelica.org/libraries/openmodelicalibraries_latest.tar.xz is 266 MB when xz-compressed; 370 MB gz-compressed. They are quite big...

comment:18 Changed 3 years ago by adrpo

We have a 64 bit installer now (only core libs):
https://build.openmodelica.org/omc/builds/windows/nightly-builds/64bit/
Happy testing!

There are some weird messages from clang when linking about duplicate sections but everything seems otherwise OK. #6099 works fine with clang.

comment:19 Changed 3 years ago by casella

  • Resolution set to fixed
  • Status changed from new to closed

There are some minor glitches, but overall this was succesful, and a big improvement in usability!

comment:20 Changed 3 years ago by adrpo

After we update to the dynamic linked clang we get:

adrpo33@ida-0030 MSYS /c/home/adrpo33
# pacman -Su
:: Starting core system upgrade...
 there is nothing to do
:: Starting full system upgrade...
:: Replace mingw-w64-i686-qhull-git with mingw32/mingw-w64-i686-qhull? [Y/n]
:: Replace mingw-w64-x86_64-qhull-git with mingw64/mingw-w64-x86_64-qhull? [Y/n]
:: Replace pkg-config with msys/pkgconf? [Y/n]
resolving dependencies...
looking for conflicting packages...

Packages (69) curl-7.73.0-2  file-5.39-2  gcc-libs-10.2.0-1  libcurl-7.73.0-2  libgnutls-3.6.15-3  mingw-w64-i686-SDL-1.2.15-9  mingw-w64-i686-SDL2-2.0.12-7
              mingw-w64-i686-adwaita-icon-theme-3.38.0-2  mingw-w64-i686-clang-11.0.0-4  mingw-w64-i686-fontconfig-2.13.92-3  mingw-w64-i686-gcc-10.2.0-5
              mingw-w64-i686-gcc-fortran-10.2.0-5  mingw-w64-i686-gcc-libgfortran-10.2.0-5  mingw-w64-i686-gcc-libs-10.2.0-5  mingw-w64-i686-gdal-3.1.3-3
              mingw-w64-i686-gdk-pixbuf2-2.40.0-4  mingw-w64-i686-gstreamer-1.18.1-1  mingw-w64-i686-gtk-update-icon-cache-3.24.23-3  mingw-w64-i686-gtk2-2.24.32-6
              mingw-w64-i686-hicolor-icon-theme-0.17-2  mingw-w64-i686-jasper-2.0.22-2  mingw-w64-i686-libass-0.15.0-1  mingw-w64-i686-libbluray-1.2.1-1  mingw-w64-i686-libc++-11.0.0-4
              mingw-w64-i686-libgcrypt-1.8.7-2  mingw-w64-i686-libmariadbclient-3.1.7-4  mingw-w64-i686-librsvg-2.50.1-1  mingw-w64-i686-llvm-11.0.0-4  mingw-w64-i686-openblas-0.3.12-3
              mingw-w64-i686-openmp-11.0.0-4  mingw-w64-i686-poppler-data-0.4.10-1  mingw-w64-i686-python-3.8.6-6  mingw-w64-i686-qhull-2020.2-1
              mingw-w64-i686-qhull-git-r166.f1f8b42-1 [removal]  mingw-w64-i686-vulkan-headers-1.2.158-1  mingw-w64-i686-vulkan-loader-1.2.158-1  mingw-w64-x86_64-SDL-1.2.15-9
              mingw-w64-x86_64-SDL2-2.0.12-7  mingw-w64-x86_64-adwaita-icon-theme-3.38.0-2  mingw-w64-x86_64-clang-11.0.0-4  mingw-w64-x86_64-fontconfig-2.13.92-3
              mingw-w64-x86_64-gcc-10.2.0-5  mingw-w64-x86_64-gcc-fortran-10.2.0-5  mingw-w64-x86_64-gcc-libgfortran-10.2.0-5  mingw-w64-x86_64-gcc-libs-10.2.0-5
              mingw-w64-x86_64-gdal-3.1.3-3  mingw-w64-x86_64-gdk-pixbuf2-2.40.0-4  mingw-w64-x86_64-gstreamer-1.18.1-1  mingw-w64-x86_64-gtk-update-icon-cache-3.24.23-3
              mingw-w64-x86_64-gtk2-2.24.32-6  mingw-w64-x86_64-hicolor-icon-theme-0.17-2  mingw-w64-x86_64-jasper-2.0.22-2  mingw-w64-x86_64-libass-0.15.0-1
              mingw-w64-x86_64-libbluray-1.2.1-1  mingw-w64-x86_64-libc++-11.0.0-4  mingw-w64-x86_64-libgcrypt-1.8.7-2  mingw-w64-x86_64-libmariadbclient-3.1.7-4
              mingw-w64-x86_64-librsvg-2.50.1-1  mingw-w64-x86_64-llvm-11.0.0-4  mingw-w64-x86_64-openblas-0.3.12-3  mingw-w64-x86_64-openmp-11.0.0-4  mingw-w64-x86_64-poppler-data-0.4.10-1
              mingw-w64-x86_64-python-3.8.6-6  mingw-w64-x86_64-qhull-2020.2-1  mingw-w64-x86_64-qhull-git-r166.f1f8b42-1 [removal]  mingw-w64-x86_64-vulkan-headers-1.2.158-1
              mingw-w64-x86_64-vulkan-loader-1.2.158-1  pkg-config-0.29.2-3 [removal]  pkgconf-1.7.3-2

Total Download Size:     413.04 MiB
Total Installed Size:   2489.19 MiB
Net Upgrade Size:      -3344.40 MiB

So that shaves off ~3GB.

Last edited 3 years ago by adrpo (previous) (diff)

comment:21 Changed 3 years ago by casella

Sounds good

Note: See TracTickets for help on using tickets.