Build and package SlicerCAT on manylinux

Hi,

How can I build and package SlicerCAT (C++17) so it was available on many linux distributions?
For now all Linux staff I do on Ubuntu 20.04

I don’t think you need to do anything special, just build Slicer as usual and follow the installation instructions. Maybe @RafaelPalomar can give you some more details.

1 Like

You should be right

I just experienced a little problem:
I compiled and packaged SlicerCAT on my Ubuntu 20.04 and tried to run it on clean Debian 11.
While I can run it on clean Ubuntu 20.4 and 22.04 (I use virtual machines) I was unable to run it on Debian 11: linking error something like Unable to link to libjpeg8.so

I guess some of my dependencies linked to Ubuntu’s libjpeg8.so but Debian doesn’t have it. It is just my assumption.

Worth to try to compile and package it on clean Debian 11 rather than on Ubuntu.

Some succes

The goal is to build SlicerCAT for Linux for many distributions and many releases.

My steps:

  1. install CentOS 7
  2. install latest devtoolset 11 (more recent GCC instead of the default 4.8.5)
  3. install qt (I prefer Qt installer), cmake, git
  4. to avoid following errors:
    Could NOT find Patch (missing: Patch_EXECUTABLE) (it means GNU PATCH)
    Failed to find “GL/gl.h” in “/usr/include/libdrm”.
    Could NOT find LibUUID (missing: LibUUID_LIBRARY LibUUID_INCLUDE_DIR)
    install the following packages (can be found in Slicer doc)
    sudo yum install patch mesa-libGL-devel libuuid-devel
  5. build and pack

After packaging I succeded to run on fresh:
Debian 10.12
Debian 11.3
Ubuntu 18.04
Ubuntu 20.04
Ubuntu 22.04
Fedora 34

+install the xinerama following Slicer installation instruction
even though Debian 10.12 also needed sudo ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so /usr/lib/x86_64-linux-gnu/libxcb-util.so.1 to solve the error:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

simply installing sudo apt-get install --reinstall libxcb-xinerama0 is not enough in this case.

I also tried to build/package SlicerCAT on Debian 11, Ubuntu 20.04, Fedora 34 but when trying to run the packaged app I discovered that on some platform I was unable to run it.

3 Likes

Thank you for sharing this. Would you mind submitting a pull request with any necessary changes/additions for the [Slicer installation instructions] (Getting Started — 3D Slicer documentation)?

2 Likes

PR is ready

1 Like