Serious problems compiling ElmerGUI on Ubuntu 20.04

Discussion about building and installing Elmer
Post Reply
otokonohito1982
Posts: 3
Joined: 03 Sep 2020, 21:01
Antispam: Yes

Serious problems compiling ElmerGUI on Ubuntu 20.04

Post by otokonohito1982 »

Hi,

I am facing serious problems compiling ElmerGUI correctly. Managed to get it to work in 16.04 before, but it seems that the current version is simply broken.

Here are the issues:

1) Qt4 is used but no longer supported in 20.04. Run into serious system issues when I force install Qt4. Same with QWT
2) The basic GUI compiles, but I need OCC, which does not work (used to work in 16.04)
3) VTK has version conflict issues with Qt
4) MMG2DSolver/MMG3DSolver causes errors with compilation

Tried many options but none of them seem to work at all.

If anyone has a comprehensive step-by-step instructions to install, it would be great. Need to use ElmerGUI soon.

Thank you so much.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Serious problems compiling ElmerGUI on Ubuntu 20.04

Post by kevinarden »

I do not know of any case of ElmerGUI being compiled successfully in Ubuntu 20. Ubuntu 20 doesn't work with Qt4. I even tried to update the ElmerGUI Qt4 code, but Qt quit supporting many of the functions used in ElmerGUI. The only options I could find on Ubuntu 20 was to use a VM. However Ubuntu 20 requires so much more resources than Ubuntu 16, running a Vm on 20 is difficult for my machine. I went back to Ubuntu 16.

I believe, It will be a significant effort for a team to get ElmerGUI working in Ubuntu 20. I am not up to the task.
otokonohito1982
Posts: 3
Joined: 03 Sep 2020, 21:01
Antispam: Yes

Re: Serious problems compiling ElmerGUI on Ubuntu 20.04

Post by otokonohito1982 »

I use 18.04 and run into the same compile issues as 20.04.

Unfortunately, there isn't a Wifi driver that works on the laptop with 16.04. This is such a headache. Have spent a week trying to compile correctly.

In the 16.04 version, the compiler states the libraries, dependencies and version number required, which makes it possible to compile.

In the current version, I have no clue which version to use. There are too many possibilities to try, so how can we make it work?
dvlierop
Posts: 15
Joined: 16 Feb 2011, 23:21

Re: Serious problems compiling ElmerGUI on Ubuntu 20.04

Post by dvlierop »

I just managed to compile ElmerGUI on Ubuntu 20.04, partly thanks to this comment:

https://github.com/ElmerCSC/elmerfem/is ... -633071695

Anyway, this is the script that I'm using:

Code: Select all

#!/bin/bash
sudo apt-get install git cmake g++ gfortran 
sudo apt install qt5-default qtscript5-dev libqwt-qt5-dev libqt5svg5-dev
sudo apt-get install mpi-default-dev libatlas-base-dev liblapack-dev libmumps-dev libmetis-dev libparmetis-dev

mkdir src; cd src
git clone https://www.github.com/ElmerCSC/elmerfem

# See https://github.com/ElmerCSC/elmerfem/issues/225
sed -i 's/FIND_LIBRARY(QWT_LIBRARY qwt/FIND_LIBRARY(QWT_LIBRARY qwt-qt5/g' ./elmerfem/ElmerGUI/cmake/Modules/FindQwt.cmake

mkdir build; cd build
git checkout next_release # Close to relase 9.0

cmake -DWITH_Mumps:BOOL=TRUE -DWITH_ELMERGUI:BOOL=TRUE -DWITH_QT5:BOOL=TRUE -DCMAKE_INSTALL_PREFIX=/usr/local ../elmerfem

make -j12
sudo make install
I'm not completely sure that all the required packages are included in the first three lines, because my Ubuntu system is not a clean install, but it should be close
etorg
Posts: 2
Joined: 26 Oct 2020, 13:06
Antispam: Yes

Re: Serious problems compiling ElmerGUI on Ubuntu 20.04

Post by etorg »

I also had problems in installing Elmer in an upgraded Ubuntu-Mate 20.04.
I allways got the message by gdebi: missing libgfortran but I had installed gfortran in the versions 5., gfortran-9 and gfortran-10.

I succeded only after installing gfortran4.6 which is no longer in the repository of Ubuntu 20.04

I had to deb HTTP://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb HTTP://security.ubuntu.com/ubuntu trusty main restricted universe multiverse
and sudo apt-get install gfortran-4.6

Success: gdebi installed without problems including ElmerGUI and the next day even automatic update was offered.
Post Reply