Qt5 build recompiles on Linux?

[split from Nightly binaries Qt5/VTK9?]


How would Qt5 library version be managed on Linux ? From 5.9.2 to 5.9.3, I had to recompile, Qt says ‘mismatch version’ otherwise. This was not a problem for no longer developed Qt4.

What do you mean?
What did you have to recompile?

On switching from Qt 5.9.1 to 5.9.2, and from 5.9.2 to 5.9.3 through system upgrade on Arch Linux, I had to recompile Slicer. Slicer compiled with one version of Qt won’t run with the next version. AFAICT, Slicer does not ship Qt binaries, but relies on system Qt libraries on Linux. The Qt4 libraries have been stable for years, Qt5 is ongoing development. It seems to me that Slicer may have to include Qt binaries against which it was compiled. I don’t know if there are special configuration switches that would allow cross-version application execution.

Slicer install package includes Qt libraries. You only need to rebuild Slicer if you’ve built it yourself and chose to use system Qt for the build.

OK. Just found they are in lib/Slicer-4.9/ from the downloaded package, and also in the self compiled one. Just added a working LD_LIBRARY_PATH in my startup script. Nice hint, thanks.

If you start the application with the Slicer executable (the “launcher”) then it should set up LD_LIBRARY_PATH to include all necessary folders and then it starts SlicerApp-real executable.

That’s what I do since years :

export LC_NUMERIC=C
$HOME/bin/Slicer4/Slicer

where Slicer4 is a symlink.

I booted on a partition with Qt5 5.9.1 and Failed to run Slicer built with 5.9.3 :

#[user@vasc2 ~][0]$ export LC_NUMERIC=C
#[user@vasc2 ~][0]$ bin/Slicer4/Slicer
An OpenGL Core Profile was requested, but it is not supported on the current platform. Falling back to a non-Core profile. Note that this might cause rendering issues.
Qt WebEngine ICU data not found at /usr/share/qt/resources. Trying parent directory…
Qt WebEngine ICU data not found at /usr/share/qt. Trying application directory…
Qt WebEngine ICU data not found at /home/user/bin/Slicer-4.9.0-2017-11-23-linux-amd64/bin. Trying fallback directory… The application MAY NOT work.
Path override failed for key base::DIR_QT_LIBRARY_DATA and path ‘/home/user/.Slicer’
[1128/151322.965258:ERROR:icu_util.cc(178)] Invalid file descriptor to ICU data received.
error: [/home/user/bin/Slicer4/bin/SlicerApp-real] exit abnormally - Report the problem.
#[user@vasc2 ~][1]$ export LD_LIBRARY_PATH=/home/user/bin/Slicer4/lib/Slicer-4.9
#[user@vasc2 ~][0]$ bin/Slicer4/Slicer
An OpenGL Core Profile was requested, but it is not supported on the current platform. Falling back to a non-Core profile. Note that this might cause rendering issues.
Qt WebEngine ICU data not found at /usr/share/qt/resources. Trying parent directory…
Qt WebEngine ICU data not found at /usr/share/qt. Trying application directory…
Qt WebEngine ICU data not found at /home/user/bin/Slicer-4.9.0-2017-11-23-linux-amd64/bin. Trying fallback directory… The application MAY NOT work.
Path override failed for key base::DIR_QT_LIBRARY_DATA and path ‘/home/user/.Slicer’
[1128/151443.117284:ERROR:icu_util.cc(178)] Invalid file descriptor to ICU data received.
error: [/home/user/bin/Slicer4/bin/SlicerApp-real] exit abnormally - Report the problem.

If you build Slicer using system Qt then you need to rebuild Slicer if you update system Qt (maybe not needed for some small patch updates). If you build using your own Qt or use a pre-built binary package then upgrading system Qt has no effect on your Slicer builds. If you find that you build your own Qt and Slicer still uses system Qt then it’s probably a launcher configuration error and it will be addressed when Slicer nightly will switch to Qt5 (in a few weeks).