# Build error linux related to introduction of Slicer\_BUILD\_WEBENGINE\_SUPPORT option

**URL:** <https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738>\
**Category:** Development\
**Created:** [May 9, 2019, 4:46pm UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738 "2019-05-09T16:46:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcsharp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gcsharp/32/863_2.png) [@gcsharp](https://discourse.slicer.org/u/gcsharp)\
**Post date:** [May 9, 2019, 4:46pm UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738/1 "2019-05-09T16:46:12Z")

</div>

Build failure in clean build directory.

```
CMakeFiles/qMRMLWidgets.dir/qMRMLLayoutManager.cxx.o: In function `qMRMLLayoutChartViewFactory::qMRMLLayoutChartViewFactory(QObject*)':
qMRMLLayoutManager.cxx:(.text+0x7b0): undefined reference to `vtable for qMRMLLayoutChartViewFactory'
CMakeFiles/qMRMLWidgets.dir/qMRMLLayoutManager.cxx.o: In function `qMRMLLayoutManager::setMRMLColorLogic(vtkMRMLColorLogic*)':
qMRMLLayoutManager.cxx:(.text+0x4c74): undefined reference to `qMRMLLayoutChartViewFactory::staticMetaObject'
CMakeFiles/qMRMLWidgets.dir/qMRMLLayoutManager.cxx.o: In function `qMRMLLayoutManager::mrmlColorLogic() const':
qMRMLLayoutManager.cxx:(.text+0x4d3f): undefined reference to `qMRMLLayoutChartViewFactory::staticMetaObject'
collect2: error: ld returned 1 exit status
Libs/MRML/Widgets/CMakeFiles/qMRMLWidgets.dir/build.make:3695: recipe for target 'bin/libqMRMLWidgets.so' failed

```

Looking at qMRMLWidgetsConfigure.h, I get:

```
#define MRML_WIDGETS_HAVE_QT5
#define MRML_WIDGETS_HAVE_WEBGINE_SUPPORT
```

---

<div class="post-metadata">

**Author:** ![brhoom](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/brhoom/32/1228_2.png) [@brhoom](https://discourse.slicer.org/u/brhoom)\
**Post date:** [May 9, 2019, 5:45pm UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738/2 "2019-05-09T17:45:21Z")

</div>

Please provide more information. What Linux are you using and which version? which Slicer version are you building? Did you install all required dependencies?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 9, 2019, 6:04pm UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738/3 "2019-05-09T18:04:49Z")

</div>

Does your Qt have WebEngine component enabled?

---

<div class="post-metadata">

**Author:** ![gcsharp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gcsharp/32/863_2.png) [@gcsharp](https://discourse.slicer.org/u/gcsharp)\
**Post date:** [May 9, 2019, 7:17pm UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738/4 "2019-05-09T19:17:56Z")

</div>

@lassoan Yes. The following are installed: qtwebengin5-dev, libqt5webengine-data, libqt5webengine5, libqt5webenginewidgets5, libqt5webenginecore5.  
@brhoom This is debian stable, and HEAD.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 9, 2019, 7:21pm UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738/5 "2019-05-09T19:21:54Z")

</div>

Is this the latest master version? There were a few days recently when there were build similar errors but @jcfr fixed those. You can also try disabling `Slicer_BUILD_WEBENGINE_SUPPORT` to skip all webengine related components (extension manager and the legacy chart view will not be available, but everything else should work; and the Slicer package will be 100-150MB smaller).

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [May 9, 2019, 7:45pm UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738/6 "2019-05-09T19:45:27Z")

</div>

If you are toggled `Slicer_BUILD_WEBENGINE_SUPPORT` ON and OFF in an existing build tree, you may have to delete the following files from the inner build tree, reconfigure and build the inner project:

```auto
./Libs/MRML/Widgets/moc_qMRMLLayoutManager.cpp_parameters
./Libs/MRML/Widgets/moc_qMRMLLayoutManager_p.cpp
./Libs/MRML/Widgets/moc_qMRMLLayoutManager.cpp
./Libs/MRML/Widgets/moc_qMRMLLayoutManager_p.cpp_parameters

```

---

<div class="post-metadata">

**Author:** ![gcsharp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gcsharp/32/863_2.png) [@gcsharp](https://discourse.slicer.org/u/gcsharp)\
**Post date:** [May 9, 2019, 8:16pm UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738/7 "2019-05-09T20:16:49Z")

</div>

Yes, I am at HEAD of master branch. Disabling `Slicer_BUILD_WEBENGINE_SUPPORT` allows the build to complete, thank you.

I looked through the source a bit, but did not find any obvious difference between, say, qMRMLLayoutChartViewFactory and qMRMLLayoutThreeDViewFactory. But it seems only the former is giving undefined symbols.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [May 9, 2019, 8:27pm UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738/8 "2019-05-09T20:27:49Z")

</div>

This should help address the issue. See [https://github.com/Slicer/Slicer/pull/1137](https://github.com/Slicer/Slicer/pull/1137)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [May 23, 2019, 2:17am UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738/9 "2019-05-23T02:17:59Z")

</div>

To follow up, fixes have been integrated in [r28262](http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=28262) and [r28263](http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=28263)

---

<div class="post-metadata">

**Author:** ![gcsharp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gcsharp/32/863_2.png) [@gcsharp](https://discourse.slicer.org/u/gcsharp)\
**Post date:** [May 28, 2019, 5:25pm UTC](https://discourse.slicer.org/t/build-error-linux-related-to-introduction-of-slicer-build-webengine-support-option/6738/10 "2019-05-28T17:25:10Z")

</div>

Fix confirmed. Thanks Jc!
