View Issue Details

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

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

[100%] Relocate _sysconfigdata.py 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?:
https://bugs.python.org/issue33374

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:

cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=1 -DCMAKE_BUILD_TYPE:STRING=Release \
-DSlicer_USE_SYSTEM_QT:BOOL=1 \
-DSlicer_USE_SYSTEM_QT:BOOL=1 -DQt5_DIR:PATH=/usr/include/x86_64-linux-gnu/qt5 \
../Slicer

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.

Activities

phcerdan

phcerdan

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

https://github.com/Slicer/Slicer/blob/master/SuperBuild/External_python.cmake#L56-L59

And the URL_MD5 to: "045fb3440219a1f6923fefdabde63342":

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

  ExternalProject_Add(python-source
    URL "https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz"
    URL_MD5 "045fb3440219a1f6923fefdabde63342"
    DOWNLOAD_DIR ${CMAKE_BINARY_DIR}
    SOURCE_DIR ${python_SOURCE_DIR}
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    )

And rebuild.

I am testing it too.

phcerdan

phcerdan

2018-09-18 20:09

developer   ~0016029

I tested it, and hitting this bug: https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/issues/224

I am going to disable nis using this branch: https://github.com/phcerdan/python-cmake-buildsystem/commit/a0ba1dc557d870e625e4a03373f3fb2a9f42d9fb

My work in progress to update python is in this branch: https://github.com/phcerdan/Slicer/tree/update_python

torquil

torquil

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/libthread_db.so.1".
[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.
(gdb)

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