Build undefined reference to `minor

When I build the latest Slicer source from Github
I got these errors:
[ 43%] Linking C shared library …/…/…/lib/python2.7/lib-dynload/
[ 44%] Built target extension_hashlib
[ 44%] Linking C shared library …/…/…/lib/python2.7/lib-dynload/
[ 45%] Built target extension_ssl
[ 45%] Built target extension_zlib
[ 91%] Built target libpython-shared
[ 97%] Built target pgen
[ 97%] Linking C executable …/…/bin/python
Creating ‘bin/./Modules/Setup.local’
/usr/bin/ld: …/…/lib/ undefined reference to minor' /usr/bin/ld: ../../lib/ undefined reference tomajor’
/usr/bin/ld: …/…/lib/ undefined reference to `makedev’
collect2: error: ld returned 1 exit status
make[5]: *** [CMakeBuild/python/CMakeFiles/python.dir/build.make:92: bin/python] Error 1
make[4]: *** [CMakeFiles/Makefile2:4311: CMakeBuild/python/CMakeFiles/python.dir/all] Error 2
make[3]: *** [Makefile:141: all] Error 2
make[2]: *** [CMakeFiles/python.dir/build.make:119: python-prefix/src/python-stamp/python-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1431: CMakeFiles/python.dir/all] Error 2
make: *** [Makefile:95: all] Error 2


Thanks for reporting the problem.

Two approaches to move forward:

(1) build specifying options -DPYTHON_VERSION:STRING=2.7.15 and -DBUILD_LIBPYTHON_SHARED:BOOL=1 and report issue in the associated tracker.

(2) Waiting this is addressed, you could also try building the branch python3-support ? See

Since we will very soon switch to Python3 (most likely today), testing this would also be helpful.