Compilation error on Ubuntu 20.10

Hi all,
I tried to compile Slicer on Ubuntu 20.10, I had the following error:

  **[99%] Performing configure step for 'Slicer'
 * *loading initial cache file /home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-prefix/tmp/Slicer-cache-Debug.cmake
 * *CMake Error: The source directory "/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug" does not appear to contain CMakeLists.txt.
 * *make[2]: *** [CMakeFiles/Slicer.dir/build.make:139: Slicer-prefix/src/Slicer-stamp/Slicer-configure] Error 1
 * *make[1]: *** [CMakeFiles/Makefile2:197: CMakeFiles/Slicer.dir/all] Error 2
 * *make: *** [Makefile:95: all] Error 2

I tried setting BUILD_TYPE = Release and BUILD_TYPE = Debug but nothing changed.
Please, can anyone help me?

Many of us tested built on latest LTS (Ubuntu 20.04), see build instructions here. If these instructions do not work for 20.10 then you may need to dig into the differences between 20.04 and 20.10.

What was your build command? Can you upload the full build log somewhere and post the link here?

Hi @lassoan,
thanks for the reply,
the command I used is
make -j5 -k
and this is the output https://pastebin.pl/view/e23bfb04.

It seems that you have mixed Debug and Release configurations:

loading initial cache file /home/ciro/Scrivania/Slicer/Slicer-Release/Slicer-prefix/tmp/Slicer-cache-Release.cmake
loading initial cache file /home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-prefix/tmp/Slicer-cache-Debug.cmake

You could try to find where the remnants of the Slicer-SuperBuild-Debug configuration come from and fix it (e.g., remove Slicer-build and Slicer-prefix subfolders and configure&generate the top-level project using CMake), but it would probably take less of your time if you wipe your complete build tree and start the build from scratch.

I deleted all the code and tried to download and compile again.
Now I have a problem with VTK, this is the output: https://pastebin.pl/view/29d86a54

Have you followed the build instructions? It seems that some external VTK build was found that of course was not compatible.

Yes, I followed the build instructions for Ubuntu 20.04.

I managed to compile, but Slicer quits after a few seconds.
This is the output:

ciro@ciro:~/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build$ ./Slicer --launcher-verbose
info: AdditionalSettingsFilePath []
info: LauncherSplashImagePath [/home/ciro/Scrivania/Slicer/Applications/SlicerApp/Resources/Images/Slicer-SplashScreen.png]
info: LauncherSplashScreenHideDelayMs [3000]
info: ApplicationToLaunch [/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/bin/./SlicerApp-real]
info: ApplicationToLaunchArguments []
info: AdditionalSettingsFilePath []
info: LauncherDir [/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build]
info: LauncherName [Slicer]
info: OrganizationDomain [www.na-mic.org]
info: OrganizationName [NA-MIC]
info: ApplicationName [Slicer]
info: ApplicationRevision [29523]
info: SettingsFileName [/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/./SlicerLauncherSettings.ini]
info: SettingsDir [/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build]
info: UserAdditionalSettingsDir [/home/ciro/.config/NA-MIC]
info: UserAdditionalSettingsFileName [/home/ciro/.config/NA-MIC/Slicer-29523.ini]
info: UserAdditionalSettingsFileBaseName []
info: AdditionalSettingsDir []
info: AdditionalSettingsExcludeGroups []
info: LauncherNoSplashScreen [0]
info: AdditionalLauncherHelpShortArgument [-h]
info: AdditionalLauncherHelpLongArgument [–help]
info: AdditionalLauncherNoSplashArguments [–no-splash,–help,–version,–home,–program-path,–no-main-window,–settings-path,–temporary-path]
info: DetachApplicationToLaunch [0]
info: LoadEnvironment [-1]
info: LauncherSplashImagePath [/home/ciro/Scrivania/Slicer/Applications/SlicerApp/Resources/Images/Slicer-SplashScreen.png]
info: LauncherSplashScreenHideDelayMs [3000]
info: ApplicationToLaunch [/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/bin/./SlicerApp-real]
info: ApplicationToLaunchArguments []
info: <APPLAUNCHER_DIR> -> [/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build]
info: <APPLAUNCHER_NAME> -> [Slicer]
info: <APPLAUNCHER_SETTINGS_DIR> (RegularSettings) -> [/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build]
info: <APPLAUNCHER_SETTINGS_DIR> (UserAdditionalSettings) -> [/home/ciro/.config/NA-MIC]
info: <APPLAUNCHER_SETTINGS_DIR> (AdditionalSettings) -> [<APPLAUNCHER_SETTINGS_DIR-NOTFOUND>]
info: -> [:]
info: Setting env. variable [SLICER_HOME]:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build
info: Setting env. variable [PIP_REQUIRE_VIRTUALENV]:0
info: Setting env. variable [ITK_AUTOLOAD_PATH]:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.13/ITKFactories/.
info: Setting env. variable [PYTHONNOUSERSITE]:1
info: Setting env. variable [PYTHONHOME]:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/python-install
info: Setting env. variable [SSL_CERT_FILE]:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/share/Slicer-4.13/Slicer.crt
info: Setting env. variable [LD_LIBRARY_PATH]:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/bin/.:…/lib/Slicer-4.13/qt-loadable-modules:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.13/cli-modules/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.13/qt-loadable-modules/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/OpenSSL:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/python-install/lib:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/VTK-build/lib/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/teem-build/bin/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/DCMTK-build/lib/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/ITK-build/lib/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/CTK-build/CTK-build/bin/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/CTK-build/QtTesting-build/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/CTK-build/PythonQt-build/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/LibArchive-install/lib:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/SimpleITK-build/SimpleITK-build/lib/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/SlicerExecutionModel-build/ModuleDescriptionParser/bin/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/site-packages/numpy/core:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/site-packages/numpy/lib:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/JsonCpp-build/src/lib_json/.
info: Setting env. variable [PATH]:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/bin/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.13/cli-modules/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/python-install/bin:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/teem-build/bin/.
info: Setting env. variable [QT_PLUGIN_PATH]:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/bin:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/CTK-build/CTK-build/bin:/usr/lib/plugins
info: Setting env. variable [PYTHONPATH]:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/bin/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/bin/Python:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.13/qt-loadable-modules/.:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.13/qt-loadable-modules/Python:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/lib/Slicer-4.13/qt-scripted-modules:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/lib-dynload:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/site-packages:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/VTK-build/lib/python3.6/site-packages:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/CTK-build/CTK-build/bin/Python:/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/CTK-build/CTK-build/bin/.
info: Starting [/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/bin/./SlicerApp-real]
info: launcher-timeout (ms) [-1000]
info: DisableSplash [0]
error: [/home/ciro/Scrivania/Slicer/Slicer-SuperBuild-Debug/Slicer-build/bin/./SlicerApp-real] exit abnormally - Report the problem.

@CiroRaggio, have a look at this post: Can't start latest stable on ubuntu 20.04. You might have to pass a flag to the slicer python (-DBUILTIN_CTYPES=ON) to make it run properly in Ubuntu 20.10

1 Like