Can't start Slicer on Linux on one machine

This information is very helpful. Have you tried to google for possible solutions?

For example, this one is interesting:

The problem is that user site packages are attempted to loaded (...user_site = getusersitepackages()...). They shouldn’t be loaded (see here).

Does any of the followings work?

  1. ./PythonSlicer
  2. ./PythonSlicer -s
  3. ./PythonSlicer -S

Does settings PYTHONNOUSERSITE=1 environment variable make any difference?

Can you investigate why user site packages loading is not prevented (by reviewing content and adding print statements to the .py files listed in the call stack)?

Well my Python knowledge is very scarce. In the --launch(ed) terminal, PythonSlicer {,-s,-S} works.

In that terminal, even launching ‘gdb’ without any argument generates the above mentioned Python errors.

PYTHONNOUSERSITE is already set to 1 in that terminal. Experimented with 0 to no avail.

Blindly, I unset PYTHONHOME, and then I could get a gdb prompt, with this console output :

Console output

Reading symbols from bin/SlicerApp-real…
(gdb) r
Starting program: /home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/SlicerApp-real
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/usr/lib/libthread_db.so.1”.
Traceback (most recent call last):
File “/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.26-gdb.py”, line 18, in
import gdb
File “/usr/share/gdb/python/gdb/init.py”, line 16, in
import traceback
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/traceback.py”, line 5, in
import linecache
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/linecache.py”, line 11, in
import tokenize
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/tokenize.py”, line 33, in
import re
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/re.py”, line 123, in
import sre_compile
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/sre_compile.py”, line 17, in
assert _sre.MAGIC == MAGIC, “SRE module mismatch”
AssertionError: SRE module mismatch
Traceback (most recent call last):
File “/usr/share/gdb/auto-load/usr/lib/libglib-2.0.so.0.6000.6-gdb.py”, line 2, in
import gdb
File “/usr/share/gdb/python/gdb/init.py”, line 16, in
import traceback
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/traceback.py”, line 5, in
import linecache
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/linecache.py”, line 11, in
import tokenize
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/tokenize.py”, line 33, in
import re
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/re.py”, line 123, in
import sre_compile
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/sre_compile.py”, line 17, in
assert _sre.MAGIC == MAGIC, “SRE module mismatch”
AssertionError: SRE module mismatch

Program received signal SIGILL, Illegal instruction.
Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
0x00007fffdf555ba5 in v3p_netlib_slamc2_ (Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
beta=beta@entry=0x7fffffffcc48, t=t@entry=0x7fffffffcc40, rnd=rnd@entry=0x7fffffffcc60,
eps=eps@entry=0x7fffdf627884 , emin=emin@entry=0x7fffffffcc50, rmin=rmin@entry=0x7fffdf627880 , emax=0x7fffffffcc58,
rmax=0x7fffdf62787c ) at /home/arc/src/Slicer-SuperBuild/ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/blas/slamch.c:719
719 /home/arc/src/Slicer-SuperBuild/ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/blas/slamch.c: No such file or directory.
(gdb) bt
Python Exception <class ‘AssertionError’> SRE module mismatch:
#0 0x00007fffdf555ba5 in v3p_netlib_slamc2_ (beta=beta@entry=0x7fffffffcc48, t=t@entry=0x7fffffffcc40, rnd=rnd@entry=0x7fffffffcc60,
eps=eps@entry=0x7fffdf627884 , emin=emin@entry=0x7fffffffcc50, rmin=rmin@entry=0x7fffdf627880 , emax=0x7fffffffcc58,
rmax=0x7fffdf62787c ) at /home/arc/src/Slicer-SuperBuild/ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/blas/slamch.c:719
#1 0x00007fffdf5564b0 in v3p_netlib_slamch_ (cmach=cmach@entry=0x7fffdf612923 " ", cmach_len=cmach_len@entry=1)
at /home/arc/src/Slicer-SuperBuild/ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/blas/slamch.c:165
#2 0x00007fffdf5568b1 in v3p_netlib_slamch_init ()
at /home/arc/src/Slicer-SuperBuild/ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/blas/slamch.c:53
Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
#3 0x00007fffdf54c3f5 in v3p_netlib_initialize ()
at /home/arc/src/Slicer-SuperBuild/ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_init.c:19
Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
#4 0x00007ffff7fe279a in call_init.part () from /lib64/ld-linux-x86-64.so.2
Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
#5 0x00007ffff7fe28a1 in _dl_init () from /lib64/ld-linux-x86-64.so.2
Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
#6 0x00007ffff7fd413a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
#7 0x0000000000000001 in ?? ()
Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
#8 0x00007fffffffd28d in ?? ()
Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
#9 0x0000000000000000 in ?? ()
Python Exception <class ‘NameError’> Installation error: gdb.execute_unwinders function is missing:
(gdb)

dmesg shows this error with libitkv3p_netlib :

[ 7052.275896] traps: SlicerApp-real[4907] trap invalid opcode ip:7f5e91312ba5 sp:7ffe51239fa0 error:0 in libitkv3p_netlib-5.0.so.1[7f5e912fe000+e4000]

I understand, perhaps wrongly, that the runtime error first occurs at

ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/blas/slamch.c:719

or at

ITK/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_init.c:19

Please note that Slicer built in Debug mode runs normally. Slicer crashes when built in Release or in RelWithDebInfo modes only.

Regards.

There should be no need to change PYTHONHOME (it would just break everything). Instead, add print statements to show values of variables that control usage of user site packages to find out why getusersitepackages is called.

You may also try to clear out your user-specific site.py file (and parent folders) to confirm that it causes the Python startup failure.

Also check out this and this.

I’m quite lost with Python. If I call _main() in lib/Python/lib/python3.6/sysconfig.py at line 421 to get some information, the output is :

$ gdb
Platform: “linux-x86_64”
Python version: “3.7”
Current installation scheme: “posix_prefix”

Paths:
data = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python”
include = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/include/python3.7m”
platinclude = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/include/python3.7m”
platlib = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.7/site-packages”
platstdlib = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.7”
purelib = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.7/site-packages”
scripts = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/bin”
stdlib = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.7”

Variables:
abiflags = “m”
base = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python”
exec_prefix = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python”
installed_base = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python”
installed_platbase = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python”
platbase = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python”
prefix = “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python”
projectbase = “/usr/bin”
py_version = “3.7.4”
py_version_nodot = “37”
py_version_short = “3.7”
Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site.py”, line 553, in
main()
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site.py”, line 539, in main
known_paths = addusersitepackages(known_paths)
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site.py”, line 282, in addusersitepackages
user_site = getusersitepackages()
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site.py”, line 258, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site.py”, line 248, in getuserbase
USER_BASE = get_config_var(‘userbase’)
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/sysconfig.py”, line 602, in get_config_var
return get_config_vars().get(name)
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/sysconfig.py”, line 551, in get_config_vars
_init_posix(_CONFIG_VARS)
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/sysconfig.py”, line 422, in _init_posix
_temp = import(name, globals(), locals(), [‘build_time_vars’], 0)
ModuleNotFoundError: No module named ‘_sysconfigdata_m_linux_x86_64-linux-gnu’

Here system Python 3.7 is being called.

$ env |grep PYTHON
PYTHONNOUSERSITE=1
PYTHONPATH=/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.11:/home/user/programs/Test/Sli
cer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.11/qt-scripted-modules:/home/user/programs/Test/Slicer-4.11.0-2019-08-
22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.11/qt-loadable-modules:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelW
ithDebInfo-O2/bin/…/lib/vtkTeem:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/bin/Python:/home/user/
programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.11/qt-loadable-modules/Python:/home/user/programs/Tes
t/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-lin
ux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/lib-dynload:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDe
bInfo-O2/bin/…/lib/Python/lib/python3.6/site-packages:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/
./lib/Slicer-4.11/python3.6/site-packages
PYTHONHOME=/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python

$ env |grep python
PYTHONPATH=/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.11:/home/user/programs/Test/Sli
cer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.11/qt-scripted-modules:/home/user/programs/Test/Slicer-4.11.0-2019-08-
22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.11/qt-loadable-modules:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelW
ithDebInfo-O2/bin/…/lib/vtkTeem:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/bin/Python:/home/user/
programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.11/qt-loadable-modules/Python:/home/user/programs/Tes
t/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-lin
ux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/lib-dynload:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDe
bInfo-O2/bin/…/lib/Python/lib/python3.6/site-packages:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/
./lib/Slicer-4.11/python3.6/site-packages
LD_LIBRARY_PATH=/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/bin:/home/user/programs/Test/Slicer-4.1
1.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.11:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebIn
fo-O2/bin/…/lib/Slicer-4.11/cli-modules:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.1
1/qt-loadable-modules:…/lib/Slicer-4.11/qt-loadable-modules:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/b
in/…/lib/Python/lib:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Teem-1.12.0:/home/user/program
s/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/PythonQt:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd6
4-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site-packages/numpy/core:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-Rel
WithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site-packages/numpy/lib

$ echo $PATH
/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/bin:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-l
inux-amd64-RelWithDebInfo-O2/bin/…/lib/Slicer-4.11/cli-modules:/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O
2/bin/…/lib/Slicer-4.11/qt-loadable-modules:/home/user/.bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/si
te_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Can’t know how to interpret all these.

Trying with lldb :

$ lldb ./bin/SlicerApp-real
(lldb) target create “./bin/SlicerApp-real”
Current executable set to ‘./bin/SlicerApp-real’ (x86_64).
(lldb) r
Process 13686 launched: ‘/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/SlicerApp-real’ (x86_64)
Process 13686 stopped

  • thread #1, name = ‘SlicerApp-real’, stop reason = signal SIGILL: illegal instruction operand
    frame #0: 0x00007fffdf555ba5 libitkv3p_netlib-5.0.so.1`v3p_netlib_slamc2_(beta=0x00007fffffffc0a8, t=0x00007fffffffc0a0, rnd=0x00007fffffffc0c0, eps=0x00007fffdf627884, emin=0x00007fffffffc0b0, rmin=0x00007fffdf627880, emax=0x00007fffffffc0b8, rmax=0x00007fffdf62787c) at slamch.c:719:11
    (lldb) bt
  • thread #1, name = ‘SlicerApp-real’, stop reason = signal SIGILL: illegal instruction operand
    • frame #0: 0x00007fffdf555ba5 libitkv3p_netlib-5.0.so.1v3p_netlib_slamc2_(beta=0x00007fffffffc0a8, t=0x00007fffffffc0a0, rnd=0x00007fffffffc0c0, eps=0x00007fffdf627884, emin=0x00007fffffffc0b0, rmin=0x00007fffdf627880, emax=0x00007fffffffc0b8, rmax=0x00007fffdf62787c) at slamch.c:719:11 frame #1: 0x00007fffdf5564b0 libitkv3p_netlib-5.0.so.1v3p_netlib_slamch_(cmach=" ", cmach_len=) at slamch.c:165:9
      frame #2: 0x00007fffdf54c3f5 libitkv3p_netlib-5.0.so.1v3p_netlib_initialize at v3p_netlib_init.c:19:5 frame #3: 0x00007ffff7fe279a ld-2.29.socall_init.part.0 + 154
      frame #4: 0x00007ffff7fe28a1 ld-2.29.so_dl_init + 129 frame #5: 0x00007ffff7fd413a ld-2.29.so_dl_start_user + 50

I think we run into the same problem on a very old computer (with Intel Core i7-3770 CPU) running Windows 10.

Slicer does not start but instead this error is shown in a popup:

The application was unable to start correctly (0xc0000142). Click OK to close the application

Windows application log tells that it is an exception 0xc000001d (Illegal instruction) in ITKIOGDCM-5.1.dll. Attaching a debugger and looking at the disassembly I found that indeed there was an shlx instruction where the exception was thrown, which is a BMI2 instruction that is not supported in 3rd-generation (3xxx, Ivy Bridge) CPUs but only in 4th generation (4xxx, Haswell) and later.

@chir.set Can you confirm that you had this problem on a 3rd-generation CPU?

We should either change build options to disable using BMI2 instruction set or check CPU type in the launcher and show a warning if non-compatible CPU is found. I’ve created an issue for this to make sure we follow up: Slicer fails to start in Intel Ivy Bridge or older CPUs · Issue #4712 · Slicer/Slicer · GitHub

@lassoan I wonder if this the same/similar issue I have been encountering our old Sandy Bridge (Xeon E5-1620) computers that were recently updated to Windows 10 from Windows 7? Slicer preview versions used to work fine, and now getting and error message

Is there a work around? We really don’t toss them out as they are fairly usable computers.

Yes, it’s exactly the same error.

I would tend towards dropping support for these 6-8 years old computers. It’s not just the CPU instruction set but graphics card features are very limited, too (VTK’s OpenGL2 backend is not compatible with these old systems anyway).

himm. Actually they have all 1080Ti on them, as they have discrete GPUs that we can upgrade (as the power supply permitting).

It’s an old AMD Phenom II X6 1100T CPU. It has 20+ instruction sets missing compared to recent CPUs.

However, Slicer build and runs with the following tuning :

-march=amdfam10 -mtune=amdfam10 -mno-sse4.1 -mno-sse4.2 (CFLAGS, CXXFLAGS, ADDITIONAL_CXX_FLAGS)

The funny part is that when built with GCC 9.1, it crashes when reading the first DICOM file. I can get the backtrace later on if it’s of importance.

But Slicer just behaves normally when built with clang 8, using the same options. I gave it a blast today and it was rock solid. For how long ? I can also just change my work machine or the CPU, but that’s not scheduled for now.

Regards.

But the build itself can be tuned ! Dropping support won’t help anyone downloading binaries from your repository. The rationale of doing the extra work to drop support for old CPUs is not that clear.

We have a few options:

  • A: Tune the build options to not take advantage of new instruction sets and so potentially lose some performance/power optimization possibilities in current CPUs.
  • B. Improve CPU/GPU checks at startup to detect incompatible hardware and advise users to upgrade. This might not be very simple when a library crashes in its automatic initialization step (execution of the main application does not even start).
  • C. Do nothing. This may discourage some potential users.

C is the easiest to do (we are already doing it), but A or B would be of course better.

Probably disabling recent instruction sets would not cause significant performance degradation, so if someone prepared a pull request with the necessary compilation flag changes then we would integrate them.

These are my observations with today’s nightly :

Win 10 + E5-1620 gives the stated error.
Centos 7.6 + E5-2690 works fine.
(I will report on the Centos 7.6 + E5-1620 combination tomorrow).

These two CPUs are from the same generation. Are optimization flags OS specific?

Even worse, they are compiler-specific. It should be possible to find the right set of options for each toolchain but it may require a lot of iterations. By the time we get everything right (safely work on most systems but not to degrade performance on current systems), most of the old computers may be decommissioned.

I’ve checked recent ITK changes and maybe they messed up something there that can be reverted without too much pain. I’ve reported the issue to their forum.

1 Like

Did the discussion on ITK forum conclude for a course of action?

I’m testing a solution (setting ITK_*_OPTIMIZATION_FLAGS to empty in Slicer superbuild). Once I confirm that it works, I’ll send a pull request. Probably tomorrow.

Confirmed the fix works on Windows. Commited in rev28520.

2 Likes

I have the same issue recently:
Under Linux Mint 19.2 (Ubuntu 18.04), with Slicer trunk on 20191031
Here are what I trid:

  1. i tried both gcc 7.4 and gcc-6
  2. I tried release, debug, relwithdebinfo, all have the same result
  3. i changed the libarchive/archive_pack_dev.c suggested by Steve in https://issues.slicer.org/view.php?id=4616
  4. The CPU is Intel® Core™ i7-7700HQ CPU so I also comment out ITK_*_OPTIMIZATION_FLAGS suggested by Andras

But with no luck…

I ran:
./Slicer --launch mate-terminal
then in the term:
strace SlicerApp-real
I got ( the last part):

close(18) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, “/usr/lib/x86_64-linux-gnu/libssl.so.1.1”, O_RDONLY|O_CLOEXEC) = 18
read(18, “\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\325\1\0\0\0\0\0”…, 832) = 832
fstat(18, {st_mode=S_IFREG|0644, st_size=577312, …}) = 0
mmap(NULL, 2673024, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 18, 0) = 0x7fc2856d1000
mprotect(0x7fc285751000, 2097152, PROT_NONE) = 0
mmap(0x7fc285951000, 53248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 18, 0x80000) = 0x7fc285951000
close(18) = 0
mprotect(0x7fc285951000, 36864, PROT_READ) = 0
munmap(0x7fc285e29000, 109229) = 0
futex(0x7fc285e27810, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e27804, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e278d8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e277f0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e277e8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e25c7c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e276c4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e2765c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e27650, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e277fc, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e277b8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fc285e277b0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
openat(AT_FDCWD, “/usr/lib/ssl/openssl.cnf”, O_RDONLY) = 18
fstat(18, {st_mode=S_IFREG|0644, st_size=10998, …}) = 0
read(18, “#\n# OpenSSL example configuratio”…, 4096) = 4096
read(18, “tableString, T61String (no BMPSt”…, 4096) = 4096
read(18, “eting an end user certificate as”…, 4096) = 2806
read(18, “”, 4096) = 0
close(18) = 0
futex(0x7fc285e277e0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
— SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} —
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

Could I have some direction to try on?

Thanks!

Solved using ssl:

1 Like

with the very same ( i think) environment, i tried to repeat the success in an adjacent folder, just to make sure I really got it right. But this time the building stopped in the middle due to the python site module problem.

And i just realized that even for the “success build” i have, it actually is not so right: the numpy is not loaded:

Traceback (most recent call last):
File “”, line 1, in
File “/media/pv/data/pv/usr/work/namic/rls20191029/Slicer-sb/python-install/lib/python3.6/imp.py”, line 170, in load_source
module = _exec(spec, sys.modules[name])
File “”, line 618, in _exec
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/media/pv/data/pv/usr/work/namic/rls20191029/Slicer-sb/Slicer-build/lib/Slicer-4.11/qt-scripted-modules/DICOMScalarVolumePlugin.py”, line 1, in
import numpy
ModuleNotFoundError: No module named ‘numpy’
Traceback (most recent call last):
File “”, line 1, in
File “/media/pv/data/pv/usr/work/namic/rls20191029/Slicer-sb/python-install/lib/python3.6/imp.py”, line 170, in load_source
module = _exec(spec, sys.modules[name])
File “”, line 618, in _exec
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/media/pv/data/pv/usr/work/namic/rls20191029/Slicer-sb/Slicer-build/lib/Slicer-4.11/qt-scripted-modules/Editor.py”, line 4, in
import EditorLib
File “/media/pv/data/pv/usr/work/namic/rls20191029/Slicer-sb/Slicer-build/lib/Slicer-4.11/qt-scripted-modules/EditorLib/init.py”, line 37, in
exec(“from .{0} import {0}Options, {0}Tool, {0}Logic, {0}”.format(effectName))
File “”, line 1, in
File “/media/pv/data/pv/usr/work/namic/rls20191029/Slicer-sb/Slicer-build/lib/Slicer-4.11/qt-scripted-modules/EditorLib/PaintEffect.py”, line 10, in
import numpy
ModuleNotFoundError: No module named ‘numpy’
Traceback (most recent call last):
File “”, line 1, in
File “/media/pv/data/pv/usr/work/namic/rls20191029/Slicer-sb/python-install/lib/python3.6/imp.py”, line 170, in load_source
module = _exec(spec, sys.modules[name])
File “”, line 618, in _exec
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/media/pv/data/pv/usr/work/namic/rls20191029/Slicer-sb/Slicer-build/lib/Slicer-4.11/qt-scripted-modules/MultiVolumeImporterPlugin.py”, line 5, in
import vtk.util.numpy_support
File “/media/pv/data/pv/usr/work/namic/rls20191029/Slicer-sb/VTK-build/lib/python3.6/site-packages/vtkmodules/util/numpy_support.py”, line 31, in
import numpy
ModuleNotFoundError: No module named ‘numpy’
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘numpy’ is not defined

I’m investigating and will report back

I quickly run through this topic and I see that people build Slicer on their linux computer.
My question is ‘Why?’

I also run Slicer on a linux machine (LinuxMint 19.1) and I have never build it on that!
Just downloaded the linux package from the site, unpacked it in a folder called ‘Slicer’ and then run the executable ‘slicer’.
That’s it!