Build error linux

(Greg Sharp) #1

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
(ibr_ex@yahoo.com) #2

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

(Andras Lasso) #3

Does your Qt have WebEngine component enabled?

(Greg Sharp) #4

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

(Andras Lasso) #5

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).

(Jean Christophe Fillion Robin) #6

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:

./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
(Greg Sharp) #7

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.

(Jean Christophe Fillion Robin) #8

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