# Build fails on Linux in python-ensurepip

**URL:** <https://discourse.slicer.org/t/build-fails-on-linux-in-python-ensurepip/17736>\
**Category:** Support\
**Created:** [May 22, 2021, 4:13pm UTC](https://discourse.slicer.org/t/build-fails-on-linux-in-python-ensurepip/17736 "2021-05-22T16:13:20Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [May 22, 2021, 4:13pm UTC](https://discourse.slicer.org/t/build-fails-on-linux-in-python-ensurepip/17736/1 "2021-05-22T16:13:20Z")

</div>

Build fails on Linux in python-ensurepip

I having this error since 9be0308d2 while building in Arch Linux :

> CMake Error at /home/arc/src/Slicer-SuperBuild/python-ensurepip-prefix/src/python-ensurepip-stamp/python-ensurepip-install-Release.cmake:49 (message):  
> Command failed: 1
> 
> ‘/home/arc/src/Slicer-SuperBuild/python-install/bin/PythonSlicer’ ‘-m’ ‘ensurepip’ ‘–default-pip’

python-ensurepip-stamp/python-ensurepip-install-\*.log do not provide any clue.

SLicer is configured as such :

> export CFLAGS=“-I/usr/include/tirpc”; export CXXFLAGS=“-I/usr/include/tirpc”; cmake -DSlicer\_VTK\_VERSION\_MAJOR:INT=8 -DQt5\_DIR:PATH=/usr/lib/cmake/Qt5 -DBUILD\_TESTING:BOOL=OFF -DCMAKE\_BUILD\_TYPE:STRING=Release -DADDITIONAL\_CXX\_FLAGS:STRING=-I/usr/include/tirpc …/Slicer

Removing lsb\_release as in [here](https://discourse.slicer.org/t/build-fails-in-python-ensurepip-on-linux/12023) doesn’t resolve the issue.

It has been building for years. What could be the problem ? How to research it further ? What could be a fix ?

Thanks and 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:** [May 23, 2021, 4:39pm UTC](https://discourse.slicer.org/t/build-fails-on-linux-in-python-ensurepip/17736/2 "2021-05-23T16:39:28Z")

</div>

Could finally build and run Slicer on Arch (with VTK8).

I had to :  
downgrade GCC from 11.0 to previous 10.2, else Python 3.6.7 fails at runtime with assigned tasks (ensurepip, setuptools),  
revert qt5-base to the previous one not built by GCC 11.0, else CTKAppLauncher would not link to QtCore.

```
 [96%] Linking CXX executable bin/CTKAppLauncher
/usr/bin/ld: /usr/lib/libQt5Core.so.5.15.2: undefined reference to `std::__exception_ptr::exception_ptr::_M_release()@CXXABI_1.3.13'
/usr/bin/ld: /usr/lib/libQt5Widgets.so.5.15.2: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
/usr/bin/ld: /usr/lib/libQt5Core.so.5.15.2: undefined reference to `std::__exception_ptr::exception_ptr::_M_addref()@CXXABI_1.3.13'

```

I tend to forget that Arch moves on very fast, and hope that built SlicerPython, of whatever version, becomes functional again with latest compilers.

Regards.

---

<div class="post-metadata">

**Author:** ![ButuiHu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/butuihu/32/2386_2.png) [@ButuiHu](https://discourse.slicer.org/u/ButuiHu)\
**Post date:** [June 21, 2021, 11:59am UTC](https://discourse.slicer.org/t/build-fails-on-linux-in-python-ensurepip/17736/3 "2021-06-21T11:59:29Z")

</div>

It’s a temporary solution. ArchLinux would keep updating to the latest gcc. Other distribution will also update gcc soon or later.  
I also encounter compiling error trigger by gdcm, which is needed in ITK subproject.  
see also [Porting to GCC 11 - GNU Project - Free Software Foundation (FSF)](https://gcc.gnu.org/gcc-11/porting_to.html#header-dep-changes) for gcc 10 → gcc 11 upgrade porting changes.
