# Can't start Slicer on Linux on one machine

**URL:** <https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175>\
**Category:** Support\
**Created:** [August 26, 2019, 7:12am UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175 "2019-08-26T07:12:06Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 1, 2019, 8:01pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/21 "2019-09-01T20:01:01Z")

</div>

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

For example, this one is interesting:

> <https://stackoverflow.com/questions/49921336/sysconfigdata-error-when-trying-to-freeze-a-python-3-6-5-application>

The problem is that user site packages are attempted to loaded (`...user_site = getusersitepackages()...`). They shouldn’t be loaded (see [here](https://github.com/Slicer/Slicer/blob/cbf742277b5b96cb81f66088d2ab2242b15f4a13/Base/QTCore/qSlicerCorePythonManager.cxx#L48-L56)).

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)?

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [September 1, 2019, 8:22pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/22 "2019-09-01T20:22:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 1, 2019, 9:05pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/23 "2019-09-01T21:05:13Z")

</div>

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](https://bugs.launchpad.net/ubuntu/+source/python3.3/+bug/1192890) and [this](https://askubuntu.com/questions/765566/rhythmbox-crashes-due-failed-to-import-the-site-module).

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [September 2, 2019, 7:38am UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/24 "2019-09-02T07:38:02Z")

</div>

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.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 frame #1: 0x00007fffdf5564b0 libitkv3p_netlib-5.0.so.1`v3p\_netlib\_slamch\_(cmach=" ", cmach\_len=) at slamch.c:165:9  
> frame #2: 0x00007fffdf54c3f5 libitkv3p\_netlib-5.0.so.1`v3p_netlib_initialize at v3p_netlib_init.c:19:5 frame #3: 0x00007ffff7fe279a ld-2.29.so`call\_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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 19, 2019, 6:32pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/25 "2019-09-19T18:32:15Z")

</div>

> [@chir.set](#):
>
> [21639.829126] traps: SlicerApp-real[15453] trap invalid opcode ip:7f8aa07fa1c8 sp:7ffce616fca8 error:0 in libitkgdcmcharls-5.0.so.1[7f8aa07e4000+84000]

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](https://en.wikipedia.org/wiki/Bit_Manipulation_Instruction_Sets#BMI2_(Bit_Manipulation_Instruction_Set_2)) 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](https://issues.slicer.org/view.php?id=4712)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 19, 2019, 7:22pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/26 "2019-09-19T19:22:21Z")

</div>

@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

> [@Application unable to start correctly (0xc0000142) error](https://discourse.slicer.org/t/application-unable-to-start-correctly-0xc0000142-error/8410/4):
>
> This was a windows 7 computer with a working Slicer that was recently migrated to Windows 10. It must be some sort of a corporate user policy change that probably broke the functionality. I managed to install other new programs (e.g., TurboVNC etc) that all seem to work. It will be hard to chase, so I will just have them do a fresh reinstall of OS.

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 19, 2019, 7:26pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/27 "2019-09-19T19:26:43Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 19, 2019, 7:27pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/28 "2019-09-19T19:27:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [September 19, 2019, 9:40pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/29 "2019-09-19T21:40:23Z")

</div>

> [@lassoan](#):
>
> Can you confirm that you had this problem on a 3rd-generation CPU?

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.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [September 19, 2019, 9:45pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/30 "2019-09-19T21:45:13Z")

</div>

> [@lassoan](#):
>
> I would tend towards dropping support for these 6-8 years old computers.

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 19, 2019, 11:03pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/31 "2019-09-19T23:03:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 19, 2019, 11:27pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/32 "2019-09-19T23:27:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 20, 2019, 12:27am UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/33 "2019-09-20T00:27:02Z")

</div>

> [@muratmaga](#):
>
> 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](https://discourse.itk.org/t/itk5-crashes-in-gdcm-on-older-cpus/2250/2?u=lassoan).

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 23, 2019, 5:19pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/34 "2019-09-23T17:19:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 23, 2019, 6:29pm UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/35 "2019-09-23T18:29:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 24, 2019, 3:16am UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/36 "2019-09-24T03:16:04Z")

</div>

Confirmed the fix works on Windows. Commited in rev28520.

---

<div class="post-metadata">

**Author:** ![gaoyi.cn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gaoyi.cn/32/1422_2.png) [@gaoyi.cn](https://discourse.slicer.org/u/gaoyi.cn)\
**Post date:** [October 31, 2019, 1:57am UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/37 "2019-10-31T01:57:06Z")

</div>

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](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!

---

<div class="post-metadata">

**Author:** ![gaoyi.cn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gaoyi.cn/32/1422_2.png) [@gaoyi.cn](https://discourse.slicer.org/u/gaoyi.cn)\
**Post date:** [October 31, 2019, 4:00am UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/38 "2019-10-31T04:00:51Z")

</div>

Solved using ssl:

> [@Building Slicer on a freshly installed Ubuntu 18.04](https://discourse.slicer.org/t/building-slicer-on-a-freshly-installed-ubuntu-18-04/5627/10):
>
> Here is what I am getting when I execute gdb with bin/SlicerApp-real: (gdb) exec-file SlicerApp-real (gdb) run Starting program: /home/satya/wrk/Slicer/build/Slicer-build/bin/SlicerApp-real [Thread debugging using libthread\_db enabled] Using host libthread\_db library “/lib/x86\_64-linux-gnu/libthread\_db.so.1”. [New Thread 0x7fffad95a700 (LWP 8620)] qt5ct: using qt5ct plugin [New Thread 0x7fffa59e1700 (LWP 8621)] [New Thread 0x7fffa5127700 (LWP 8622)] Thread 1 “SlicerApp-real” received s…

---

<div class="post-metadata">

**Author:** ![gaoyi.cn](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gaoyi.cn/32/1422_2.png) [@gaoyi.cn](https://discourse.slicer.org/u/gaoyi.cn)\
**Post date:** [October 31, 2019, 7:32am UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/39 "2019-10-31T07:32:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Leon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/leon/32/1468_2.png) [@Leon](https://discourse.slicer.org/u/Leon)\
**Post date:** [October 31, 2019, 11:50am UTC](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175/40 "2019-10-31T11:50:06Z")

</div>

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!

[Previous page](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175.md?page=1)

[Next page](https://discourse.slicer.org/t/cant-start-slicer-on-linux-on-one-machine/8175.md?page=3)
