[ 0%] Building CXX object ofstd/libsrc/CMakeFiles/ofstd.dir/ofchrenc.cc.o
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:539:28: error: no class named 'Implementation' in 'OFCharacterEncoding'
class OFCharacterEncoding::Implementation {};
~~~~~~~~~~~~~~~~~~~~~^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:577:31: error: out-of-line definition of 'getLocaleEncoding' does not match any declaration in 'OFCharacterEncoding'
OFString OFCharacterEncoding::getLocaleEncoding()
^~~~~~~~~~~~~~~~~
/opt/local/include/dcmtk/ofstd/ofchrenc.h:97:21: note: member declaration does not match because it is const qualified
const OFString &getLocaleEncoding() const;
^ ~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:587:29: error: out-of-line definition of 'supportsConversionFlags' does not match any declaration in 'OFCharacterEncoding'
OFBool OFCharacterEncoding::supportsConversionFlags(const unsigned flags)
^~~~~~~~~~~~~~~~~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:598:5: error: member initializer 'TheImplementation' does not name a non-static data member or base class
: TheImplementation()
^~~~~~~~~~~~~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:605:27: error: no member named 'TheImplementation' in 'OFCharacterEncoding'
: TheImplementation(rhs.TheImplementation)
~~~ ^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:619:5: error: use of undeclared identifier 'TheImplementation'
TheImplementation = rhs.TheImplementation;
^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:619:29: error: no member named 'TheImplementation' in 'OFCharacterEncoding'
TheImplementation = rhs.TheImplementation;
~~~ ^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:624:22: error: out-of-line definition of 'operator bool' does not match any declaration in 'OFCharacterEncoding'
OFCharacterEncoding::operator OFBool() const
^~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:626:34: error: use of undeclared identifier 'TheImplementation'
return OFstatic_cast(OFBool, TheImplementation);
^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:630:29: error: out-of-line definition of 'operator!' does not match any declaration in 'OFCharacterEncoding'
OFBool OFCharacterEncoding::operator!() const
^~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:632:13: error: use of undeclared identifier 'TheImplementation'
return !TheImplementation;
^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:636:29: error: out-of-line definition of 'operator==' does not match any declaration in 'OFCharacterEncoding'
OFBool OFCharacterEncoding::operator==(const OFCharacterEncoding& rhs) const
^~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:638:37: error: no member named 'TheImplementation' in 'OFCharacterEncoding'
return TheImplementation == rhs.TheImplementation;
~~~ ^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:638:12: error: use of undeclared identifier 'TheImplementation'
return TheImplementation == rhs.TheImplementation;
^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:641:29: error: out-of-line definition of 'operator!=' does not match any declaration in 'OFCharacterEncoding'
OFBool OFCharacterEncoding::operator!=(const OFCharacterEncoding& rhs) const
^~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:643:37: error: no member named 'TheImplementation' in 'OFCharacterEncoding'
return TheImplementation != rhs.TheImplementation;
~~~ ^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:643:12: error: use of undeclared identifier 'TheImplementation'
return TheImplementation != rhs.TheImplementation;
^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:655:31: error: out-of-line definition of 'getConversionFlags' does not match any declaration in 'OFCharacterEncoding'
unsigned OFCharacterEncoding::getConversionFlags() const
^~~~~~~~~~~~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:665:34: error: out-of-line definition of 'setConversionFlags' does not match any declaration in 'OFCharacterEncoding'
OFCondition OFCharacterEncoding::setConversionFlags(const unsigned flags)
^~~~~~~~~~~~~~~~~~
19 errors generated.
make[2]: *** [ofstd/libsrc/CMakeFiles/ofstd.dir/ofchrenc.cc.o] Error 1
make[1]: *** [ofstd/libsrc/CMakeFiles/ofstd.dir/all] Error 2
make: *** [all] Error 2
When I try all the above it always stop at the DCMTK package with the following errors. Is there something I am missing?
[ 0%] Building CXX object ofstd/libsrc/CMakeFiles/ofstd.dir/ofchrenc.cc.o
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:539:28: error: no class named 'Implementation' in 'OFCharacterEncoding'
class OFCharacterEncoding::Implementation {};
~~~~~~~~~~~~~~~~~~~~~^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:577:31: error: out-of-line definition of 'getLocaleEncoding' does not match any declaration in 'OFCharacterEncoding'
OFString OFCharacterEncoding::getLocaleEncoding()
^~~~~~~~~~~~~~~~~
/opt/local/include/dcmtk/ofstd/ofchrenc.h:97:21: note: member declaration does not match because it is const qualified
const OFString &getLocaleEncoding() const;
^ ~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:587:29: error: out-of-line definition of 'supportsConversionFlags' does not match any declaration in 'OFCharacterEncoding'
OFBool OFCharacterEncoding::supportsConversionFlags(const unsigned flags)
^~~~~~~~~~~~~~~~~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:598:5: error: member initializer 'TheImplementation' does not name a non-static data member or base class
: TheImplementation()
^~~~~~~~~~~~~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:605:27: error: no member named 'TheImplementation' in 'OFCharacterEncoding'
: TheImplementation(rhs.TheImplementation)
~~~ ^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:619:5: error: use of undeclared identifier 'TheImplementation'
TheImplementation = rhs.TheImplementation;
^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:619:29: error: no member named 'TheImplementation' in 'OFCharacterEncoding'
TheImplementation = rhs.TheImplementation;
~~~ ^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:624:22: error: out-of-line definition of 'operator bool' does not match any declaration in 'OFCharacterEncoding'
OFCharacterEncoding::operator OFBool() const
^~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:626:34: error: use of undeclared identifier 'TheImplementation'
return OFstatic_cast(OFBool, TheImplementation);
^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:630:29: error: out-of-line definition of 'operator!' does not match any declaration in 'OFCharacterEncoding'
OFBool OFCharacterEncoding::operator!() const
^~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:632:13: error: use of undeclared identifier 'TheImplementation'
return !TheImplementation;
^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:636:29: error: out-of-line definition of 'operator==' does not match any declaration in 'OFCharacterEncoding'
OFBool OFCharacterEncoding::operator==(const OFCharacterEncoding& rhs) const
^~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:638:37: error: no member named 'TheImplementation' in 'OFCharacterEncoding'
return TheImplementation == rhs.TheImplementation;
~~~ ^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:638:12: error: use of undeclared identifier 'TheImplementation'
return TheImplementation == rhs.TheImplementation;
^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:641:29: error: out-of-line definition of 'operator!=' does not match any declaration in 'OFCharacterEncoding'
OFBool OFCharacterEncoding::operator!=(const OFCharacterEncoding& rhs) const
^~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:643:37: error: no member named 'TheImplementation' in 'OFCharacterEncoding'
return TheImplementation != rhs.TheImplementation;
~~~ ^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:643:12: error: use of undeclared identifier 'TheImplementation'
return TheImplementation != rhs.TheImplementation;
^
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:655:31: error: out-of-line definition of 'getConversionFlags' does not match any declaration in 'OFCharacterEncoding'
unsigned OFCharacterEncoding::getConversionFlags() const
^~~~~~~~~~~~~~~~~~
/Users/alex/GIT/build/slicer/DCMTK/ofstd/libsrc/ofchrenc.cc:665:34: error: out-of-line definition of 'setConversionFlags' does not match any declaration in 'OFCharacterEncoding'
OFCondition OFCharacterEncoding::setConversionFlags(const unsigned flags)
^~~~~~~~~~~~~~~~~~
19 errors generated.
make[2]: *** [ofstd/libsrc/CMakeFiles/ofstd.dir/ofchrenc.cc.o] Error 1
make[1]: *** [ofstd/libsrc/CMakeFiles/ofstd.dir/all] Error 2
make: *** [all] Error 2
It makes more sense to have this as its own topic. I think the solution to this problem is going to be very different than the solution to mine was, though I can’t immediately see what it is.
One thing that did end up helping in my case was to avoid using Xcode. I changed my CMake configuration to generate unix makefiles, and I started the superbuild with ‘make’ from the terminal.
Ok after some very deep digging I found the problem was the use of native icu library within the ofstd piece within DCMTK. Simply putting DCMTK_WITH_ICU to OFF and DCMTK_ENABLE_CHARSET_CONVERSION to inside DCMTK-build folder ccmake configuration, allows the compiling of DCMTK package. Now another error arises, I will keep searching for a solution
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:159:5: error: 'auto' not allowed in function return type
auto isnan(Args&&... args) -> decltype(std::isnan(std::forward<Args>(args)...)) {
^~~~
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:159:31: error: expected ';' at end of declaration
auto isnan(Args&&... args) -> decltype(std::isnan(std::forward<Args>(args)...)) {
^
;
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:159:32: error: cannot use arrow operator on a type
auto isnan(Args&&... args) -> decltype(std::isnan(std::forward<Args>(args)...)) {
^
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:163:5: error: 'auto' not allowed in function return type
auto isinf(Args&&... args) -> decltype(std::isinf(std::forward<Args>(args)...)) {
^~~~
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:163:31: error: expected ';' at end of declaration
auto isinf(Args&&... args) -> decltype(std::isinf(std::forward<Args>(args)...)) {
^
;
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:163:32: error: cannot use arrow operator on a type
auto isinf(Args&&... args) -> decltype(std::isinf(std::forward<Args>(args)...)) {
^
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:167:5: error: 'auto' not allowed in function return type
auto isfinite(Args&&... args) -> decltype(std::isfinite(std::forward<Args>(args)...)) {
^~~~
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:167:34: error: expected ';' at end of declaration
auto isfinite(Args&&... args) -> decltype(std::isfinite(std::forward<Args>(args)...)) {
^
;
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:167:35: error: cannot use arrow operator on a type
auto isfinite(Args&&... args) -> decltype(std::isfinite(std::forward<Args>(args)...)) {
^
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:171:5: error: 'auto' not allowed in function return type
auto isnormal(Args&&... args) -> decltype(std::isnormal(std::forward<Args>(args)...)) {
^~~~
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:171:34: error: expected ';' at end of declaration
auto isnormal(Args&&... args) -> decltype(std::isnormal(std::forward<Args>(args)...)) {
^
;
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:171:35: error: cannot use arrow operator on a type
auto isnormal(Args&&... args) -> decltype(std::isnormal(std::forward<Args>(args)...)) {
^
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:175:5: error: 'auto' not allowed in function return type
auto max(Args&&... args) -> decltype(std::max(std::forward<Args>(args)...)) {
^~~~
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:175:29: error: expected ';' at end of declaration
auto max(Args&&... args) -> decltype(std::max(std::forward<Args>(args)...)) {
^
;
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:175:30: error: cannot use arrow operator on a type
auto max(Args&&... args) -> decltype(std::max(std::forward<Args>(args)...)) {
^
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:179:5: error: 'auto' not allowed in function return type
auto min(Args&&... args) -> decltype(std::min(std::forward<Args>(args)...)) {
^~~~
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:179:29: error: expected ';' at end of declaration
auto min(Args&&... args) -> decltype(std::min(std::forward<Args>(args)...)) {
^
;
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:179:30: error: cannot use arrow operator on a type
auto min(Args&&... args) -> decltype(std::min(std::forward<Args>(args)...)) {
^
/Users/alex/GIT/build/slicer/ITKv4/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_math.h:184:5: error: 'auto' not allowed in function return type
auto cuberoot(Args&&... args) -> decltype(std::cbrt(std::forward<Args>(args)...)) {
^~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
I was able to build DCMTK in the current Slicer master (this hash) on Mac without problems, and without changing any of the default configuration setting.
macOS: 10.13.5
Xcode: 9.4.1
clang: Apple LLVM version 9.1.0 (clang-902.0.39.2)
cmake: 3.11.4
Ok, above error is caused by the Slicer_BUILD_ITKPython option set to ON. After this the support for I18n should be disabled if you don’t have English system (the vtkMRML piece will complain about non existing file
make[5]: *** No rule to make target `/Users/alex/GIT/slicer/Libs/MRML/Widgets/Resources/Translations/qMRMLWidgets_fr.ts', needed by `Libs/MRML/Widgets/qMRMLWidgets_fr.qm'. Stop.
) This must be fixed since it allows python use of ITK in plugins.
When you set Both options to OFF slicer starts compiling up to the MRLM package which complains about vtkMultiVolume.h was not built. Still digging
Perhaps you have a reason to access 2, but I wanted to make sure you are aware of 1.
Here’s the explanation of @thewtex about the differences between these two wrappings (from his response on LinkedIn to my question about the blog post announcing ITK python):
The relative pros are,
For itk:
Covers the entire toolkit, including processing with PointSet’s, Mesh’s, SpecializedCoordinatesImage, etc.
Retains the pipeline so very large images can be analyzed through streamed processing
The wrapping and packaging for externally developed modules is straightforward and can be built on free GitHub CI services (documentation for this is in progress)
For SimpleITK:
It does not have the pipeline but has a procedural interface, which is more intuitive out of the gate for folks coming from the Matlab world
Thank to both of you. I have handled all the build errors except the vtkMultiVolume one. I still don’t know which option to set in VTK to enable the build of it. copying from GitHub doesn’t work since it now complains about
In file included from /Users/alex/GIT/slicer/Modules/Loadable/VolumeRendering/MRMLDM/vtkMRMLVolumeRenderingDisplayableManager.cxx:52:
/Users/alex/GIT/build/slicer/VTKv9-build/Rendering/Volume/vtkMultiVolume.h:82:51: error: only virtual member functions can be marked 'override'
void SetProperty(vtkVolumeProperty* property) override;
I think this might be the feature that is still being developed, and maybe some issues have not yet been identified. @cpinter should be able to comment on this one most authoritatively.
Ok just to start to, the default PythonQT configuration uses python2.7 (impossible to change right now) while VTK9 highly encourages python3 flavor, just a glitch.
I can’t see the vtkMultiVolume.h file in the default VTK clone from Slicer, it is in GitHub otherwise. maybe the problem is only to update VTK.
I see my problem, I left the VTK_MAJOR_VERSION in 7 which does not contain the vtkMultiVolume.h thing, changed to 9 and voilà. I think version 9 shall be the default to prevent this issue, since the MRML module explicitly depends on it.
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKMagnifyView.cpp:87:63: error: unknown type name 'QVTKWidget'; did you mean 'QWidget'?
case 0: _t->enteredObservedWidget((*reinterpret_cast< QVTKWidget*(*)>(_a[1]))); break;
^~~~~~~~~~
QWidget
/Users/alex/Qt/5.11.1/clang_64/lib/QtWidgets.framework/Headers/qwidget.h:128:24: note: 'QWidget' declared here
class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKMagnifyView.cpp:87:43: error: cannot initialize a parameter of type 'QVTKOpenGLWidget *' with an lvalue of type 'QWidget *'
case 0: _t->enteredObservedWidget((*reinterpret_cast< QVTKWidget*(*)>(_a[1]))); break;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/alex/GIT/build/slicer/CTK/Libs/Visualization/VTK/Widgets/ctkVTKMagnifyView.h:137:49: note: passing argument to parameter 'widget' here
void enteredObservedWidget(QVTKOpenGLWidget * widget);
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKMagnifyView.cpp:88:60: error: unknown type name 'QVTKWidget'; did you mean 'QWidget'?
case 1: _t->leftObservedWidget((*reinterpret_cast< QVTKWidget*(*)>(_a[1]))); break;
^~~~~~~~~~
QWidget
/Users/alex/Qt/5.11.1/clang_64/lib/QtWidgets.framework/Headers/qwidget.h:128:24: note: 'QWidget' declared here
class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKMagnifyView.cpp:88:40: error: cannot initialize a parameter of type 'QVTKOpenGLWidget *' with an lvalue of type 'QWidget *'
case 1: _t->leftObservedWidget((*reinterpret_cast< QVTKWidget*(*)>(_a[1]))); break;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/alex/GIT/build/slicer/CTK/Libs/Visualization/VTK/Widgets/ctkVTKMagnifyView.h:138:46: note: passing argument to parameter 'widget' here
void leftObservedWidget(QVTKOpenGLWidget * widget);
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKMagnifyView.cpp:94:52: error: unknown type name 'QVTKWidget'; did you mean 'QWidget'?
using _t = void (ctkVTKMagnifyView::*)(QVTKWidget * );
^~~~~~~~~~
QWidget
/Users/alex/Qt/5.11.1/clang_64/lib/QtWidgets.framework/Headers/qwidget.h:128:24: note: 'QWidget' declared here
class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKMagnifyView.cpp:95:51: error: static_cast from 'void (ctkVTKMagnifyView::*)(QVTKOpenGLWidget *)' to '_t'
(aka 'void (ctkVTKMagnifyView::*)(QWidget *)') is not allowed
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&ctkVTKMagnifyView::enteredObservedWidget)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKMagnifyView.cpp:101:52: error: unknown type name 'QVTKWidget'; did you mean 'QWidget'?
using _t = void (ctkVTKMagnifyView::*)(QVTKWidget * );
^~~~~~~~~~
QWidget
/Users/alex/Qt/5.11.1/clang_64/lib/QtWidgets.framework/Headers/qwidget.h:128:24: note: 'QWidget' declared here
class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKMagnifyView.cpp:102:51: error: static_cast from 'void (ctkVTKMagnifyView::*)(QVTKOpenGLWidget *)' to '_t'
(aka 'void (ctkVTKMagnifyView::*)(QWidget *)') is not allowed
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&ctkVTKMagnifyView::leftObservedWidget)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKMagnifyView.cpp:188:47: error: unknown type name 'QVTKWidget'
void ctkVTKMagnifyView::enteredObservedWidget(QVTKWidget * _t1)
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKMagnifyView.cpp:195:44: error: unknown type name 'QVTKWidget'
void ctkVTKMagnifyView::leftObservedWidget(QVTKWidget * _t1)
^
10 errors generated.
make[5]: *** [Libs/Visualization/VTK/Widgets/CMakeFiles/CTKVisualizationVTKWidgets.dir/moc_ctkVTKMagnifyView.cpp.o] Error 1
make[5]: *** Waiting for unfinished jobs....
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKAbstractView.cpp:187:20: error: use of undeclared identifier 'QVTKWidget'; did you mean 'VTKWidget'?
case 16: { QVTKWidget* _r = _t->VTKWidget();
^~~~~~~~~~
VTKWidget
/Users/alex/GIT/build/slicer/CTK/Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.h:153:34: note: 'VTKWidget' declared here
Q_INVOKABLE QVTKOpenGLWidget * VTKWidget() const;
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKAbstractView.cpp:187:20: error: call to non-static member function without an object argument
case 16: { QVTKWidget* _r = _t->VTKWidget();
^~~~~~~~~~
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKAbstractView.cpp:187:32: error: use of undeclared identifier '_r'
case 16: { QVTKWidget* _r = _t->VTKWidget();
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKAbstractView.cpp:188:43: error: unknown type name 'QVTKWidget'; did you mean 'QWidget'?
if (_a[0]) *reinterpret_cast< QVTKWidget**>(_a[0]) = std::move(_r); } break;
^~~~~~~~~~
QWidget
/Users/alex/Qt/5.11.1/clang_64/lib/QtWidgets.framework/Headers/qwidget.h:128:24: note: 'QWidget' declared here
class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKAbstractView.cpp:188:76: error: use of undeclared identifier '_r'
if (_a[0]) *reinterpret_cast< QVTKWidget**>(_a[0]) = std::move(_r); } break;
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKChartView.cpp:198:8: error: use of undeclared identifier 'QVTKWidget'; did you mean 'QWidget'?
{ &QVTKWidget::staticMetaObject, qt_meta_stringdata_ctkVTKChartView.data,
^~~~~~~~~~
QWidget
/Users/alex/Qt/5.11.1/clang_64/lib/QtWidgets.framework/Headers/qwidget.h:128:24: note: 'QWidget' declared here
class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKChartView.cpp:213:12: error: use of undeclared identifier 'QVTKWidget'; did you mean 'QWidget'?
return QVTKWidget::qt_metacast(_clname);
^~~~~~~~~~
QWidget
/Users/alex/Qt/5.11.1/clang_64/lib/QtWidgets.framework/Headers/qwidget.h:128:24: note: 'QWidget' declared here
class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
^
/Users/alex/GIT/build/slicer/CTK-build/CTK-build/Libs/Visualization/VTK/Widgets/moc_ctkVTKChartView.cpp:218:11: error: use of undeclared identifier 'QVTKWidget'; did you mean 'QWidget'?
_id = QVTKWidget::qt_metacall(_c, _id, _a);
^~~~~~~~~~
QWidget
/Users/alex/Qt/5.11.1/clang_64/lib/QtWidgets.framework/Headers/qwidget.h:128:24: note: 'QWidget' declared here
class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
^
5 errors generated.
make[5]: *** [Libs/Visualization/VTK/Widgets/CMakeFiles/CTKVisualizationVTKWidgets.dir/moc_ctkVTKAbstractView.cpp.o] Error 1
3 errors generated.
make[5]: *** [Libs/Visualization/VTK/Widgets/CMakeFiles/CTKVisualizationVTKWidgets.dir/moc_ctkVTKChartView.cpp.o] Error 1
make[4]: *** [Libs/Visualization/VTK/Widgets/CMakeFiles/CTKVisualizationVTKWidgets.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [CTK-prefix/src/CTK-stamp/CTK-build] Error 2
make[1]: *** [CMakeFiles/CTK.dir/all] Error 2
make: *** [all] Error 2
hm I erased the whole CTK folder and relaunched the build and apparently the PythonQT library was not built in my previous try when I changed VTK versions so CTK is building now.
Apparently everything is fine now, except for the high annoyance that some parts are made with python 2.7 (like PythonQT) and others are made on python3 (like VTK).
The error comes from including a VTK header, in which a virtual function is overridden without specifying the virtual keyword in the subclass. This being an error seems to be excessive, and also seems to be compiler specific. In any case, this is a bug in VTK core.
Yes, on Mac technically you can do that (or fix the RPATH manually). It’s not a supported configuration so YMMV – don’t complain if the nightly build ABI changes and it stops working