Since the Qt4 library has been removed from Ubuntu 20.04 due to its EOL, compiling Gplates from the source code on this platform seems to be hard.
I tried to install Qt4 libraries (libqt4-opengl-dev, libqt4-dev) from a third party ppa. They got installed successfully, but cmake still cannot find them on my platform.
Is there any solution for this problem? Is it possible to compile Gplates from source on Ubuntu 20.04?
Here’s the source code that compiles with Qt5. It has been successfully compiled on Ubuntu 20.04 and 20.10. It’s essentially GPlates 2.2 for Qt5 instead of Qt4. The dependencies to install are listed in
DEPS.Linux and the build instructions are in
BUILD.Linux. You might get some compilation warnings when building but you can ignore those.
Thanks a lot for the source code. It compiled and got installed smoothly.
Do you have a list of the Qt5 dependencies that GPlates requires? Arch Linux splits Qt5 into a heap of packages so there is no Qt5 package to install.
DEPS.Linux file lists them for Ubuntu…
qt5-default libqt5opengl5-dev libqt5svg5-dev libqt5xmlpatterns5-dev
qt5-base qt5-svg qt5-xmlpatterns
…if that is not enough then it might just be easier to install the entire
qt5 group (if that’s possible, perhaps by specifying
qt5) rather than installing the individual (sub)packages.
I just installed pygplates on Ubuntu 20.04 (new installation in a Windows Subsystem for Linux). When the python code tries to import pygplates, it returns an error:
ImportError: libQt5Core.so.5: cannot open shared object file: No such file or directory
Is there a (quick) fix for this? I am not familiar with compiling unlike Jovid and wouldn’t know where to start.
If it’s the source code link then that’s only meant for GPlates (the current PyGPlates can be found here).
I haven’t used Windows Subsystem for Linux yet, but I’ll give that a try
I installed from the DEB package. In my directory
/usr/lib/pygplates/revision28/ is one file:
pygplates.so. I have added it to the PYTHONPATH re the instruction on the sourceforge page and also added the
sys.path.insert(1, '/path/to/pygplates') to my script (with the correct path).
Edit: I solved it:
sudo apt-get install qtdeclarative5-dev (not sure if this is necessary or I overlooked the files, damn capitalization)
strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
I see you’ve edited your post to say that you’ve solved the issue. Nice one, that looked tricky. Seems like that strip command is needed because of the way Qt5 is built on WSL (Windows Subsystem for Linux). Interesting.
Regarding the need for
qtdeclarative5-dev, I don’t have that installed on my Ubuntu 20.04. I just installed
qt5-default libqt5opengl5-dev libqt5svg5-dev libqt5xmlpatterns5-dev. But then again I’m not using WSL.