How to build 3D Slicer for Raspberry?

I built Slicer on Odroid-U2 out of technical interest on Arch Linux for ARM. There was just one more step to do :

build CTKAPPLAUNCHER,
download CTKAppLauncher pre-compiled for amd64,
replace the x86_64 blob by the locally compiled ARM binary,
rename the package and patch the cmake file :

 diff --git a/SuperBuild/External_CTKAPPLAUNCHER.cmake b/SuperBuild/External_CTKAPPLAUNCHER.cmake
index dda4e1a54..911cdb428 100644
--- a/SuperBuild/External_CTKAPPLAUNCHER.cmake
+++ b/SuperBuild/External_CTKAPPLAUNCHER.cmake
@@ -30,7 +30,8 @@ if(Slicer_USE_CTKAPPLAUNCHER)
       set(CTKAPPLAUNCHER_ARCHITECTURE "i386")
       set(md5 "9fa2acb7d934a43720a0bee8679cbeff")
     elseif("${CTKAPPLAUNCHER_OS}" STREQUAL "linux")
-      set(md5 "57d9e6fc1fdfe42d78fc4e277b9559ba")
+      set(CTKAPPLAUNCHER_ARCHITECTURE "armv7l")
+      set(md5 "783455a7ee0bea086082f64da6adda1d")
     elseif("${CTKAPPLAUNCHER_OS}" STREQUAL "macosx")
       set(md5 "1f0d86b1eeb386d6892a76db7b111280")
     endif()

Please not that if CTKAPPLAUNCHER_ARCHITECTURE is not explicitely set, it defaults to i386. There’s probably a simpler way to build it automatically, I’m eager to learn about it.

It takes about 24 hours to build using all 4 cores with lowest nice priority. Here is a video captured with Slicer freshly started after rebooting the build device. (You may advance the video with the mouse, some simple steps are very long). Slices are never displayed in the viewers.

Of course it’s not for routine use. Just a curious thing to do in the background.

3 Likes