View Issue Details

IDProjectCategoryView StatusLast Update
0004612Slicer4Core: Building (CMake, Superbuild)public2018-10-16 06:49
ReportertorquilAssigned Tojcfr 
Status assignedResolutionopen 
PlatformLinuxOSDebianOS VersionSid
Product Version 
Target VersionSlicer 4.11.0Fixed in Version 
Summary0004612: Build error with GCC/G++ 8.2.0

When building Slicer Git Master with GCC/G++ 8.2.0, the build fails with a segmentation fault:

[100%] Relocate and update pybuilddir.txt
cd /home/torquil/src/upstream/slicer/Slicer-Superbuild-Release/python-build/bin && env LD_LIBRARY_PATH=/home/torquil/src/upstream/slicer/Slicer-Superbuild-Release/python-build/lib /home/torquil/src/upstream/slicer/Slicer-Superbuild-Release/python-build/bin/python -E -S -m sysconfig --generate-posix-vars
Segmentation fault
make[5]: *** [CMakeBuild/python/CMakeFiles/update_sysconfig.dir/build.make:62: bin/pybuilddir.txt] Error 139
make[5]: Leaving directory '/home/torquil/src/upstream/slicer/Slicer-Superbuild-Release/python-build'
make[4]: *** [CMakeFiles/Makefile2:4390: CMakeBuild/python/CMakeFiles/update_sysconfig.dir/all] Error 2
make[4]: Leaving directory '/home/torquil/src/upstream/slicer/Slicer-Superbuild-Release/python-build'
make[3]: *** [Makefile:141: all] Error 2
make[3]: Leaving directory '/home/torquil/src/upstream/slicer/Slicer-Superbuild-Release/python-build'
make[2]: *** [CMakeFiles/python.dir/build.make:123: python-prefix/src/python-stamp/python-build] Error 2
make[2]: Leaving directory '/home/torquil/src/upstream/slicer/Slicer-Superbuild-Release'
make[1]: *** [CMakeFiles/Makefile2:833: CMakeFiles/python.dir/all] Error 2
make[1]: Leaving directory '/home/torquil/src/upstream/slicer/Slicer-Superbuild-Release'
make: *** [Makefile:98: all] Error 2

It seems that Slicer Git Master uses Python 2.7.13. Could it be related to this?:

In that case, perhaps this has been fixed in a newer version of Python 2.7?

Steps To Reproduce

To reproduce, build Slicer Git Master on Debian Sid Linux using GCC 8.2.0, using the following commands:

-DSlicer_USE_SYSTEM_QT:BOOL=1 -DQt5_DIR:PATH=/usr/include/x86_64-linux-gnu/qt5 \

make VERBOSE=1 -j1

Additional Information

$ gcc --version
gcc (Debian 8.2.0-7) 8.2.0

$ g++ --version
g++ (Debian 8.2.0-7) 8.2.0

TagsNo tags attached.




2018-09-18 13:31

developer   ~0016025

Last edited: 2018-09-18 19:25

View 3 revisions

Thanks for the detailed report.

Could you try to use the latest python2 instead of 2.7.13 to see if this solves it?

Change 2.7.13 for 2.7.15 in these 2 lines in your SuperBuild/External_python.cmake source folder

And the URL_MD5 to: "045fb3440219a1f6923fefdabde63342":

  set(python_SOURCE_DIR "${CMAKE_BINARY_DIR}/Python-2.7.15")

    URL ""
    URL_MD5 "045fb3440219a1f6923fefdabde63342"

And rebuild.

I am testing it too.



2018-09-18 20:09

developer   ~0016029

I tested it, and hitting this bug:

I am going to disable nis using this branch:

My work in progress to update python is in this branch:



2018-09-19 00:32

reporter   ~0016031

I tested with 2.7.15, and it built fine. When I try to start Slicer I built, I get a segmentation fault, but that might be unrelated to the Python problem (I also got it earlier when I managed to build Slicer using the system Python installation):

When running SlicerApp-real in gdb:

$ cd Slicer-Superbuild-Release/Slicer-build/bin
$ gdb SlicerApp-real
(gdb) run

Starting program: /home/torquil/src/upstream/slicer/Slicer-Superbuild-Release/Slicer-build/bin/SlicerApp-real
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
[New Thread 0x7fffce256700 (LWP 29316)]
[New Thread 0x7fffcd3af700 (LWP 29317)]

Thread 1 "SlicerApp-real" received signal SIGSEGV, Segmentation fault.
__strcmp_sse2_unaligned () at /build/glibc-hBZSf0/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:31
31 /build/glibc-hBZSf0/glibc-2.27/string/../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S: No such file or directory.

But I can report this in a different bug report, unless you immediately know what causes it? :-) At least the building works for me now.

Issue History

Date Modified Username Field Change
2018-09-18 02:51 torquil New Issue
2018-09-18 02:51 torquil Status new => assigned
2018-09-18 02:51 torquil Assigned To => jcfr
2018-09-18 13:31 phcerdan Note Added: 0016025
2018-09-18 13:32 phcerdan Note Edited: 0016025 View Revisions
2018-09-18 19:25 phcerdan Note Edited: 0016025 View Revisions
2018-09-18 20:09 phcerdan Note Added: 0016029
2018-09-19 00:32 torquil Note Added: 0016031
2018-10-16 06:48 jcfr Description Updated View Revisions
2018-10-16 06:48 jcfr Description Updated View Revisions
2018-10-16 06:49 jcfr Target Version => Slicer 4.11.0