Slicer-4.10.2 is almost two years old. I would recommend the latest Slicer master for any developments.
Iâm not an experienced linux developer, but managed to build and run it a few days ago without any issues on Ubuntu 20.04 just by closely following the build instructions.
Thank you for your response. I mistyped the version. Iâve built the latest version (i.e. Slicer-4.11). I had some problems building it on ubuntu 18 and got some qt randomgenerator errors and I saw in some forum that ubuntu 20 surpassed that problem. So, I built the whole thing on ubuntu 20. but, I still couldnât load Slicer.
I did run the following command to see whatâs going on
./Slicer --launcher-verbose
I only found that there is some missing directory for the following:
Iâm have no idea what the problem could be. I even spent hours browising through these forums but only found this https://github.com/Slicer/Slicer/issues/5000
which is somewhat similar but not totally.
Iâve just use this Ubuntu 20.04 image on virtualbox: https://www.osboxes.org/ubuntu/
Is your computer a physical linux computer that you use for other developments, too?
Can you run a simple OpenGL application, such as glxgears?
Aug 31 13:54:20 atabak-X550JX gnome-shell[2071]: Window manager warning: Invalid WM_TRANSIENT_FOR window 0x3a00004 specified for 0x3a00002.
Aug 31 13:54:21 atabak-X550JX kernel: [22784.692296] SlicerApp-real[30426]: segfault at 0 ip 00007f8421bfe9ee sp 00007ffd48fbe448 error 4 in libc-2.31.so[7f8421a9d000+178000]
Aug 31 13:54:21 atabak-X550JX kernel: [22784.692302] Code: 0f 84 fd fe ff ff e9 91 81 f3 ff 90 f3 0f 1e fa 89 f8 31 d2 c5 c5 ef ff 09 f0 25 ff 0f 00 00 3d 80 0f 00 00 0f 8f 52 03 00 00 fe 6f 0f c5 f5 74 06 c5 fd da c1 c5 fd 74 c7 c5 fd d7 c8 85 c9
Iâve tried to start Slicer in gdb on Linux by following these instructions, I get the error below. When I try to debug using VS Code, I get the same error.
osboxes@osboxes:~/D/Slicer-SuperBuild-Release/Slicer-build$ ./Slicer --launch /usr/bin/gnome-terminal
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "/home/osboxes/D/Slicer-SuperBuild-Release/python-install/lib/python3.6/site.py", line 553, in <module>
main()
File "/home/osboxes/D/Slicer-SuperBuild-Release/python-install/lib/python3.6/site.py", line 539, in main
known_paths = addusersitepackages(known_paths)
File "/home/osboxes/D/Slicer-SuperBuild-Release/python-install/lib/python3.6/site.py", line 282, in addusersitepackages
user_site = getusersitepackages()
File "/home/osboxes/D/Slicer-SuperBuild-Release/python-install/lib/python3.6/site.py", line 258, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/home/osboxes/D/Slicer-SuperBuild-Release/python-install/lib/python3.6/site.py", line 248, in getuserbase
USER_BASE = get_config_var('userbase')
File "/home/osboxes/D/Slicer-SuperBuild-Release/python-install/lib/python3.6/sysconfig.py", line 601, in get_config_var
return get_config_vars().get(name)
File "/home/osboxes/D/Slicer-SuperBuild-Release/python-install/lib/python3.6/sysconfig.py", line 550, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/home/osboxes/D/Slicer-SuperBuild-Release/python-install/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'
I did as you asked and I got the same error as you have!
atabak@atabak-X550JX:~/Slicer/Slicer-SuperBuild-Debug/Slicer-build$ ./Slicer --launch /usr/bin/gnome-terminal
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File â/home/atabak/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/site.pyâ, line 553, in
main()
File â/home/atabak/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/site.pyâ, line 539, in main
known_paths = addusersitepackages(known_paths)
File â/home/atabak/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/site.pyâ, line 282, in addusersitepackages
user_site = getusersitepackages()
File â/home/atabak/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/site.pyâ, line 258, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File â/home/atabak/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/site.pyâ, line 248, in getuserbase
USER_BASE = get_config_var(âuserbaseâ)
File â/home/atabak/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/sysconfig.pyâ, line 601, in get_config_var
return get_config_vars().get(name)
File â/home/atabak/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/sysconfig.pyâ, line 550, in get_config_vars
_init_posix(_CONFIG_VARS)
File â/home/atabak/Slicer/Slicer-SuperBuild-Debug/python-install/lib/python3.6/sysconfig.pyâ, line 421, in _init_posix
_temp = import(name, globals(), locals(), [âbuild_time_varsâ], 0)
ModuleNotFoundError: No module named â_sysconfigdata__linux_x86_64-linux-gnuâ
I often get debugging hints by running SlicerApp-real with strace to see the last system calls before it dies. You can start with Slicer --xterm and run it in that shell so you have the environment.
I have also recently built on ubuntu 20.04 with no problems.
OpenSSL error, as usual⌠There have been lots of problems with OpenSLL, especially on Linux. Search for error reports on this topic on this forum and the Slicer issue tracker (both are indexed in Google), and try the proposed solutions.
The error occurred while executing an avx2 instruction. Is it possible that your computer does not support __strcmp_avx2 instruction? (not very likely, as then the error should have been invalid instruction, but just in case) How old is your computer? What CPU does it have?
Yes those worked very well. And, yes after a successful build of the âdeveloperâ in ubuntu 20 I get a crash in the startup when I try to load Slicer.
No, I havenât built in the debug or release mode. Will that solve my problem stated in the beginning of this thread? I think you are trying to point out that it might be a hard-ware problem. Correct?
You always build in âDebugâ or âReleaseâ (or âDebWithRelInfoâ or âMinSizeRelâ) configuration. If you donât specify build mode then I think the default is âDebugâ (more verbose debug information but slower execution time).
Your CPU is quite old but it should still be able to build and run Slicer, so it is not a hardware problem.
I did a quick search. There used to be such errors at startup but they have all been fixed. Are you using the latest master version? What is your linux kernel, Qt, OpenSSL, and gcc compiler versions? (you may find some version information in your build log of top-level CMakeCache.txt file)
I am sorry for the late response. I came to a conclusion yesterday that upgrading my ubuntu from 18 to 20 wasnât a good idea and I decided to build Ubuntu 20 from scratch. And, I successfully built the Slicer-Developer without any errors.
FYI, all the versions of Qt, etc that you asked were based on this instruction:
So for other users out there, I would suggest not to upgrade their Linux- ubuntu version from 18 to 20 for the purpose of building Slicer cause they wonât be able to load the software itself, probably because of the versions of qt and other necessary softwares that are required for the build.
cd Slicer-SuperBuild-Debug/Slicer-build
ctest -j4
There is one more point that I want to mention. When I tried to test Slicer in ubuntu 20 that was upgraded from ubuntu 18 with the instruction mentioned above I had about 240 tests failed out of 680. But in ubuntu 20 that I installed from scratch, I only had 9 tests failed out of 680!
Andras - Thank you for your help throughout the troubleshooting. Your guidance was the main reason I got the intuition to reinstall ubuntu 20 from scratch.