# \[Paraview-SuperBuild\] Ubuntu 18.04 failed when using Qt5 as backend

**URL:** https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359
**Category:** ParaView Support
**Created:** [July 25, 2018, 7:40pm UTC](https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359 "2018-07-25T19:40:14Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![quang-ha](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/q/e47c2d/32.png) [@quang-ha](https://discourse.paraview.org/u/quang-ha)
#### Post date: [July 25, 2018, 7:40pm UTC](https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359/1 "2018-07-25T19:40:14Z")

</div>

System: `Ubuntu 18.04, gcc 7.3.0.`

Command: `cmake -DCMAKE_INSTALL_PREFIX=/home/qth20/.local/paraview -DENABLE_paraview=True -DENABLE_qt5=True -DENABLE_ffmpeg=True -DENABLE_tbb=True -DENABLE_ospray=True ../paraview-superbuild`

Error:

```auto
[64%] Performing build step for 'qt5'
/usr/bin/x86_64-linux-gnu-ld.gold: error: .obj/qmutex_linux.o: multiple definition of 'QBasicMutex::lockInternal()'
/usr/bin/x86_64-linux-gnu-ld.gold: .obj/qmutex.o: previous definition here
/usr/bin/x86_64-linux-gnu-ld.gold: error: .obj/qmutex_linux.o: multiple definition of 'QBasicMutex::lockInternal(int)'
/usr/bin/x86_64-linux-gnu-ld.gold: .obj/qmutex.o: previous definition here
/usr/bin/x86_64-linux-gnu-ld.gold: error: .obj/qmutex_linux.o: multiple definition of 'QBasicMutex::unlockInternal()'
/usr/bin/x86_64-linux-gnu-ld.gold: .obj/qmutex.o: previous definition here
collect2: error: ld returned 1 exit status
Makefile:1215: recipe for target '../../lib/libQt5Core.so.5.8.0' failed
make[6]: *** [../../lib/libQt5Core.so.5.8.0] Error 1
Makefile:163: recipe for target 'sub-corelib-make_first' failed
make[5]: *** [sub-corelib-make_first] Error 2
Makefile:46: recipe for target 'sub-src-make_first' failed
make[4]: *** [sub-src-make_first] Error 2
Makefile:66: recipe for target 'module-qtbase-make_first' failed
make[3]: *** [module-qtbase-make_first] Error 2
CMake Error at /home/qth20/Downloads/build-paraview/superbuild/sb-qt5-build.cmake:47 (message):
  Failed with exit code 2

superbuild/CMakeFiles/qt5.dir/build.make:123: recipe for target 'superbuild/qt5/stamp/qt5-build' failed
make[2]: *** [superbuild/qt5/stamp/qt5-build] Error 1
CMakeFiles/Makefile2:1266: recipe for target 'superbuild/CMakeFiles/qt5.dir/all' failed
make[1]: *** [superbuild/CMakeFiles/qt5.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

```

Does it mean I should build Qt5 separately instead?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 26, 2018, 7:19am UTC](https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359/2 "2018-07-26T07:19:38Z")

</div>

You could, but on linux it is supported and works perfectly in our buildbot.  
Are you using master are the source of a specific release ?

---

<div class="post-metadata">

### Author: ![quang-ha](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/q/e47c2d/32.png) [@quang-ha](https://discourse.paraview.org/u/quang-ha)
#### Post date: [July 26, 2018, 11:31am UTC](https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359/3 "2018-07-26T11:31:02Z")

</div>

This is built using paraview as source, yes.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 26, 2018, 11:47am UTC](https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359/4 "2018-07-26T11:47:05Z")

</div>

Ok, , so you build the tip of the master branch ?

---

<div class="post-metadata">

### Author: ![quang-ha](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/q/e47c2d/32.png) [@quang-ha](https://discourse.paraview.org/u/quang-ha)
#### Post date: [July 26, 2018, 11:58am UTC](https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359/5 "2018-07-26T11:58:17Z")

</div>

Yes, changing it to 5.5.2 won’t solve it, though.

---

<div class="post-metadata">

### Author: ![shawn.waldon](https://discourse.paraview.org/user_avatar/discourse.paraview.org/shawn.waldon/32/12_2.png) [@shawn.waldon](https://discourse.paraview.org/u/shawn.waldon)
#### Post date: [July 26, 2018, 1:55pm UTC](https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359/6 "2018-07-26T13:55:36Z")

</div>

To be accurate, we run the standalone-qt project which uses the same superbuild code to build and install qt5 on the machine and then we build against that version of Qt to save time. (Not rebuilding Qt cuts build time roughly in half). Also our buildbot is CentOS 6 with newer compilers, so it may be an Ubuntu problem.

Have you tried changing the `qt5_SOURCE_SELECTION` cmake variable? Unless you need Qt 5.8 for some reason, you could try building with 5.9 or 5.10. Ubuntu 18.04 is very new and you may have better luck with a newer Qt version.

---

<div class="post-metadata">

### Author: ![quang-ha](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/q/e47c2d/32.png) [@quang-ha](https://discourse.paraview.org/u/quang-ha)
#### Post date: [July 26, 2018, 2:58pm UTC](https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359/7 "2018-07-26T14:58:03Z")

</div>

Switching to 5.10 doesn’t help either…

```auto

[90%] Performing build step for 'qt5'
make[3]: warning: -jN forced in submake: disabling jobserver mode.
Info: creating cache file /home/qth20/Downloads/build-paraview/superbuild/qt5/build/qtbase/.qmake.cache
In file included from /home/qth20/Downloads/build-paraview/superbuild/qt5/src/qtbase/include/QtCore/qstring.h:1:0,
                 from /home/qth20/Downloads/build-paraview/superbuild/qt5/src/qtbase/include/QtCore/../../src/corelib/kernel/qcoreapplication.h:44,
                 from /home/qth20/Downloads/build-paraview/superbuild/qt5/src/qtbase/include/QtCore/qcoreapplication.h:1,
                 from /home/qth20/Downloads/build-paraview/superbuild/qt5/src/qtbase/src/corelib/global/qt_pch.h:62:
/home/qth20/Downloads/build-paraview/superbuild/qt5/src/qtbase/include/QtCore/../../src/corelib/tools/qstring.h: In member function ‘bool QUrlPrivate::setHost(const QString&, int, int, QUrl::ParsingMode)’:
/home/qth20/Downloads/build-paraview/superbuild/qt5/src/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:1037:7: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
     { if (i >= s.d->size) s.resize(i + 1, QLatin1Char(' ')); else s.detach();
       ^~
/usr/bin/x86_64-linux-gnu-ld.gold: error: .obj/qmutex_linux.o: multiple definition of 'QBasicMutex::lockInternal()'
/usr/bin/x86_64-linux-gnu-ld.gold: .obj/qmutex.o: previous definition here
/usr/bin/x86_64-linux-gnu-ld.gold: error: .obj/qmutex_linux.o: multiple definition of 'QBasicMutex::lockInternal(int)'
/usr/bin/x86_64-linux-gnu-ld.gold: .obj/qmutex.o: previous definition here
/usr/bin/x86_64-linux-gnu-ld.gold: error: .obj/qmutex_linux.o: multiple definition of 'QBasicMutex::unlockInternal()'
/usr/bin/x86_64-linux-gnu-ld.gold: .obj/qmutex.o: previous definition here
collect2: error: ld returned 1 exit status
Makefile:1158: recipe for target '../../lib/libQt5Core.so.5.10.1' failed
make[6]: *** [../../lib/libQt5Core.so.5.10.1] Error 1

```

I have deliberately tried to just use `paraview`, without anything extra (no guide, no tutorial, no ffmpeg, nothing. Just qt5 and paraview) and it is still giving up…

I am getting close to `sudo apt install paraview`… :’(

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 26, 2018, 3:15pm UTC](https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359/8 "2018-07-26T15:15:31Z")

</div>

In that case you could download the Qt binaries and use that with the superbuild.

---

<div class="post-metadata">

### Author: ![shawn.waldon](https://discourse.paraview.org/user_avatar/discourse.paraview.org/shawn.waldon/32/12_2.png) [@shawn.waldon](https://discourse.paraview.org/u/shawn.waldon)
#### Post date: [July 26, 2018, 3:54pm UTC](https://discourse.paraview.org/t/paraview-superbuild-ubuntu-18-04-failed-when-using-qt5-as-backend/359/9 "2018-07-26T15:54:20Z")

</div>

I’d recommend just using the Qt from the package manager unless you want a different version for some reason. I think Ubuntu’s Qt is fairly recent.
