# Compile errors Pop!\_OS/Ubuntu with Qt 5.10

**URL:** <https://discourse.slicer.org/t/compile-errors-pop-os-ubuntu-with-qt-5-10/2576>\
**Category:** Development\
**Created:** [April 13, 2018, 2:52am UTC](https://discourse.slicer.org/t/compile-errors-pop-os-ubuntu-with-qt-5-10/2576 "2018-04-13T02:52:43Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![tavaughan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tavaughan/32/1475_2.png) [@tavaughan](https://discourse.slicer.org/u/tavaughan)\
**Post date:** [April 19, 2018, 5:56am UTC](https://discourse.slicer.org/t/compile-errors-pop-os-ubuntu-with-qt-5-10/2576/21 "2018-04-19T05:56:06Z")

</div>

I now have Slicer building and running without fiddling with LD\_LIBRARY\_PATH. I think the issue was with the Build-qt.sh script.

Steps:

1. Install Qt dependencies (for QtWebEngine-specific dependencies I referred to this page [QtWebEngine/How to Try - Qt Wiki](https://wiki.qt.io/QtWebEngine/How_to_Try) )
2. Download the Qt-build script as per [GitHub - jcfr/qt-easy-build at 5.10.0](https://github.com/jcfr/qt-easy-build/tree/5.10.0#readme)
3. Open the script in a text editor. Scroll to the configure step near the end of the file (line 365 at time of writing). Change the -no-rpath option to -rpath. I changed:

> ./configure $qt\_install\_dir\_options   
> [stuff]  
> -no-rpath \

to:

> ./configure $qt\_install\_dir\_options   
> [stuff]  
> -rpath \

_Note: I suspect simply removing the -rpath line would have the same result as removing it completely. I am not 100% sure of this though._

1. Run the Qt-build script. It takes a while so I just left it overnight.
2. Download and install Slicer dependencies as indicated on build instructions page: [Documentation/Nightly/Developers/Build Instructions - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#Ubuntu)
3. Download Slicer source files.
4. Create a script that has contents like the following:

> cd S4D  
> cmake   
> -DQT\_QMAKE\_EXECUTABLE:FILEPATH=/media/vaughan/workspace/lnx/devel/Support/qt-everywhere-build-5.10.0/bin/qmake   
> -DQt5\_DIR=/media/vaughan/workspace/lnx/devel/Support/qt-everywhere-build-5.10.0/lib/cmake/Qt5   
> -DCMAKE\_BUILD\_TYPE:STRING=Debug   
> -DCMAKE\_PREFIX\_PATH:PATH=/media/vaughan/workspace/lnx/devel/Support/qt-everywhere-build-5.10.0/bin/   
> -DSlicer\_USE\_PYTHONQT\_WITH\_TCL:BOOL=OFF   
> -DSlicer\_USE\_SimpleITK:BOOL=OFF   
> -DSlicer\_USE\_QtTesting:BOOL=OFF   
> -DSlicer\_VTK\_VERSION\_MAJOR:STRING=9   
> -DSlicer\_VTK\_RENDERING\_BACKEND:STRING=OpenGL2   
> -DSlicer\_BUILD\_DataStore:BOOL=OFF   
> …/S4  
> make -j7

Make sure to set your Qt directories to wherever you built it.

1. Run script. Like Qt, this will take a while.

With any luck, Slicer should build correctly. After doing these steps I do not need to run any export LD\_LIBRARY\_PATH commands.

I created an issue on GitHub for discussion: [Ld trying to use system install of Qt5 · Issue #42 · jcfr/qt-easy-build · GitHub](https://github.com/jcfr/qt-easy-build/issues/42)

---

_[View the full topic](https://discourse.slicer.org/t/compile-errors-pop-os-ubuntu-with-qt-5-10/2576)._
