Open timhutton opened 1 year ago
gcc version 11.2.0 (Gentoo 11.2.0 p1) VTK version is 9.0.3
Thanks heaps for making an issue for this Tim!
I found this: https://gitlab.kitware.com/vtk/vtk/-/issues/18048
Where someone gets around it by renaming AllValues to vtkAllValues.. but Ready doesn't (as far as I can tell) even have anything called 'AllValues' in it.. and the traceback indicates the problem is at this line in wxVTKWindowInteractor: #include <wx/glcanvas.h>
. Maybe if the include were moved after the VTK include.. that didn't seem to help when I tried it.. I guess there might be other vtk imports above.
I'll paste the full log in the next message.
Edit: typo.
Here's the whole end of the build log from just before the error:
Consolidate compiler generated dependencies of target ready
[ 92%] Building CXX object CMakeFiles/ready.dir/src/gui/frame.cpp.o
In file included from /usr/include/GL/glx.h:31,
from /usr/include/wx-3.0-gtk3/wx/unix/glx11.h:13,
from /usr/include/wx-3.0-gtk3/wx/gtk/glcanvas.h:14,
from /usr/include/wx-3.0-gtk3/wx/glcanvas.h:195,
from /home/dan/dev/ready/readyGit/17thSept2022/ready/src/gui/wxVTKRenderWindowInteractor.h:72,
from /home/dan/dev/ready/readyGit/17thSept2022/ready/src/gui/frame.cpp:61:
/usr/include/vtk-9.0/vtkDataArray.h:602:8: error: expected identifier before numeric constant
602 | struct AllValues
| ^~~~~~~~~
/usr/include/vtk-9.0/vtkDataArray.h:602:8: error: expected unqualified-id before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:417:37: error: expected identifier before numeric constant
417 | bool DoComputeVectorRange(A*, R[2], AllValues);
| ^~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:417:37: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:519:37: error: expected identifier before numeric constant
519 | bool DoComputeVectorRange(A*, R[2], AllValues);
| ^~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:519:37: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:551:1: error: expected identifier before numeric constant
551 | VTK_DECLARE_VALUERANGE_VALUETYPE(long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:551:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:551:1: error: expected identifier before numeric constant
551 | VTK_DECLARE_VALUERANGE_VALUETYPE(long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:551:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:551:1: error: expected identifier before numeric constant
551 | VTK_DECLARE_VALUERANGE_VALUETYPE(long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:551:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:551:1: error: expected identifier before numeric constant
551 | VTK_DECLARE_VALUERANGE_VALUETYPE(long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:551:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:552:1: error: expected identifier before numeric constant
552 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:552:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:552:1: error: expected identifier before numeric constant
552 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:552:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:552:1: error: expected identifier before numeric constant
552 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:552:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:552:1: error: expected identifier before numeric constant
552 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:552:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:553:1: error: expected identifier before numeric constant
553 | VTK_DECLARE_VALUERANGE_VALUETYPE(long long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:553:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:553:1: error: expected identifier before numeric constant
553 | VTK_DECLARE_VALUERANGE_VALUETYPE(long long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:553:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:553:1: error: expected identifier before numeric constant
553 | VTK_DECLARE_VALUERANGE_VALUETYPE(long long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:553:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:553:1: error: expected identifier before numeric constant
553 | VTK_DECLARE_VALUERANGE_VALUETYPE(long long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:553:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:554:1: error: expected identifier before numeric constant
554 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:554:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:554:1: error: expected identifier before numeric constant
554 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:554:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:554:1: error: expected identifier before numeric constant
554 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:554:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:554:1: error: expected identifier before numeric constant
554 | VTK_DECLARE_VALUERANGE_VALUETYPE(unsigned long long)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:554:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:555:1: error: expected identifier before numeric constant
555 | VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkDataArray, double)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:555:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.h:555:1: error: expected identifier before numeric constant
555 | VTK_DECLARE_VALUERANGE_ARRAYTYPE(vtkDataArray, double)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.h:555:1: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/vtk-9.0/vtkGenericDataArray.txx: In member function ‘bool vtkGenericDataArray<DerivedT, ValueTypeT>::ComputeScalarValueRange(vtkGenericDataArray<DerivedT, ValueTypeT>::ValueType*)’:
/usr/include/vtk-9.0/vtkGenericDataArray.txx:1195:64: error: expected unqualified-id before numeric constant
1195 | static_cast<DerivedT*>(this), ranges, vtkDataArrayPrivate::AllValues{}, Supported{});
| ^~~~~~~~~
/usr/include/vtk-9.0/vtkGenericDataArray.txx: In member function ‘bool vtkGenericDataArray<DerivedT, ValueTypeT>::ComputeVectorValueRange(vtkGenericDataArray<DerivedT, ValueTypeT>::ValueType*)’:
/usr/include/vtk-9.0/vtkGenericDataArray.txx:1205:63: error: expected unqualified-id before numeric constant
1205 | static_cast<DerivedT*>(this), range, vtkDataArrayPrivate::AllValues{}, Supported{});
| ^~~~~~~~~
make[2]: *** [CMakeFiles/ready.dir/build.make:168: CMakeFiles/ready.dir/src/gui/frame.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:168: CMakeFiles/ready.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
I wish I could more easily patch my system VTK, I think I probably could since it's gentoo, but maybe I'll build a bleeding-edge VTK and see if it's fixed there, and/or apply a rename to that AllValues thing and see if that gets me a build. I'm rather missing being able to open my VTIs for sure! :D
I built vtk 9.2.2 and still had the "AllValues" trouble when building ready.. so I applied the idea (mentioned in link above) to rename 'AllValues' to 'vtkAllValues' and rebuilt VTK.. aand that takes a fair old while on my rig, so will update once I know if that sorted it.. but I'm wondering should this be suggested as a patch/pullRequest to VTK? I think there's already some awareness about this over there... see how it goes I guess?
Cool that got me past the previous problem (vtk-9.2.2 patch file coming soon!) but I'm now stuck on this:
[ 95%] Building CXX object CMakeFiles/ready.dir/src/gui/vtk_pipeline.cpp.o
In file included from /home/dan/dev/ready/readyGit/17thSept2022/ready/src/gui/vtk_pipeline.cpp:20:
/home/dan/dev/ready/readyGit/17thSept2022/ready/src/gui/wxVTKRenderWindowInteractor.h:46:4: error: #error "problem of wxGLCanvas, you need to build wxWidgets with opengl"
46 | #error "problem of wxGLCanvas, you need to build wxWidgets with opengl"
| ^~~~~
In file included from /home/dan/dev/ready/readyGit/17thSept2022/ready/src/gui/vtk_pipeline.cpp:20:
/home/dan/dev/ready/readyGit/17thSept2022/ready/src/gui/wxVTKRenderWindowInteractor.h:86:54: error: expected class-name before ‘,’ token
86 | class wxVTKRenderWindowInteractor : public wxGLCanvas, public vtkRenderWindowInteractor
| ^
/home/dan/dev/ready/readyGit/17thSept2022/ready/src/gui/wxVTKRenderWindowInteractor.h:178:5: error: ‘wxGLContext’ does not name a type
178 | wxGLContext* GLContext;
| ^~~~~~~~~~~
/home/dan/dev/ready/readyGit/17thSept2022/ready/src/gui/wxVTKRenderWindowInteractor.h:113:10: error: ‘bool wxVTKRenderWindowInteractor::Enable(bool)’ marked ‘override’, but does not override
113 | bool Enable(bool enable) override;
| ^~~~~~
make[2]: *** [CMakeFiles/ready.dir/build.make:238: CMakeFiles/ready.dir/src/gui/vtk_pipeline.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:168: CMakeFiles/ready.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
I checked my Gentoo's wxGTK install (it's called x11-libs/wxGTK) and it claims to have been built with opengl USE flags, I'm reinstalling it again now just in case there's some lib that wasn't up to date or something! Will report back once I have a result.
Arghh now it won't even ccmake-configure, saying stuff we probably shouldn't care about, and I will work out tomorrow if I get time! sounds like gentoo-gtk-level kinda?)\
Found OpenMP_CXX: -fopenmp
CMake Error at CMakeLists.txt:455 (message):
Didn't find -lwx_gtk2u_core-3.0 or -lwx_gtk3u_core-3.0 in
wxWidgets_LIBRARIES - unable to detect GTK version to use:
-L/usr/lib64;-pthread;;;-lwx_gtk3u_html-3.0-gtk3;-lwx_gtk3u_aui-3.0-gtk3;-lwx_gtk3u_gl-3.0-gtk3;-lwx_gtk3u_core-3.0-gtk3;-lwx_gtk3u_adv-3.0-gtk3;-lwx_baseu-3.0-gtk3
Configuring incomplete, errors occurred!
Thanks for investigating. Looks like a bug in wxVTKRenderWindowInteractor. A more updated repo is here: https://github.com/vadz/wxVTK
Historically wxVTK has always been problematic because it uses accesses non-public parts of the VTK API and thus gets broken when they change internal things.
Edit: Deleting this as I say it in the next message first paragraph! whoops, double post.
Thanks for the guidance @timhutton :) I did grab that wxVTK but for a long time it wouldn't configure as there were some things that it needed that I didn't have enabled in my VTK build so I've enabled them and am rebuilding.. VTK takes yonks! Hopefully I can build the wxVTK once that's all done.
I got VTK built, and rebuilt a fair few times until I did get past configure for that wxVTK (but I cheated since I turned some checks off) and ultimately ran into all sorts of other issues.
It seems to me now that my vague plan to try a very-new VTK (9.2.2) is potentially just a very bad idea because of the wxVTK dependency.. it sounds like things were working better at vtk8.2.0 (at least that version is mentioned in our BUILD.txt) so maybe I'll try that next!
Aww I got all through configure and the VTK-8.2.0 build died here:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/vtkexodusII.dir/src/ex_open_par.c.o:/home/dan/dev/vtk/8.2.0/VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c:477: multiple definition of `exodus_unused_symbol_dummy_1'; CMakeFiles/vtkexodusII.dir/src/ex_create_par.c.o:/home/dan/dev/vtk/8.2.0/VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c:617: first defined here collect2: error: ld returned 1 exit status make[2]: [ThirdParty/exodusII/vtkexodusII/CMakeFiles/vtkexodusII.dir/build.make:4436: lib/libvtkexodusII-8.2.so.1] Error 1 make[1]: [CMakeFiles/Makefile2:5607: ThirdParty/exodusII/vtkexodusII/CMakeFiles/vtkexodusII.dir/all] Error 2 make: *** [Makefile:136: all] Error 2
looking into it...
I think it might be a gcc-version thing, annoyingly: https://gitlab.kitware.com/vtk/vtk/-/issues/17774
It sounds like this was fixed in VTK around these merges: https://gitlab.kitware.com/vtk/vtk/-/issues/17774 I just need to work out what 8.2.X they landed in, then find or clone the source for that version, and hopefully that will work!
In the end I manually applied the patch file (from https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6420) to fix vtkExodusII in the vtk 8.2.0 source (there were only 2 lines with very clear changes), and that got me going on gcc11!
I found I had to add this to the CmakeLists.txt for VTK:
set(VTK_USE_HYBRID ON CACHE BOOL "doc" FORCE)
Otherwise wxVTK was unhappy.. and in fact I didn't even get through the VTK build.. new error is:
/home/dan/dev/vtk/8.2.0/VTK-8.2.0/Rendering/Qt/vtkQtLabelRenderStrategy.cxx:229:18: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
I can only assume this is a gcc-version thing too.. no idea yet though.. looking into it
In the end after I pasted this in a few places (in ".h" files in VTK):
#include <QPainterPath>
I got a VTK build completed but I still couldn't make wxVTK happy now it says this:
[ 8%] Building CXX object CMakeFiles/wxImagePlaneWidget.dir/Sample/wxImagePlaneWidget.cxx.o
/home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:41:10: fatal error: vtkTesting.h: No such file or directory
41 | #include "vtkTesting.h"
| ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/wxImagePlaneWidget.dir/build.make:76: CMakeFiles/wxImagePlaneWidget.dir/Sample/wxImagePlaneWidget.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:89: CMakeFiles/wxImagePlaneWidget.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
It seems to need in-place build, which several parts of VTK reject at present,, I'm trying turning those off and doing an in-place build anyway!
Got an in-place build done but still got the missing vtkTesting.h I found this: https://vtk.org/pipermail/vtk-developers/2012-June/027225.html So now I'm trying building VTK with testing, which seems like it might be a while, fingers crossed it helps though!
That did seem to get past that issue but now there's a bunch of other things:
Consolidate compiler generated dependencies of target wxImagePlaneWidget
[ 8%] Building CXX object CMakeFiles/wxImagePlaneWidget.dir/Sample/wxImagePlaneWidget.cxx.o
In file included from /home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:14:
/home/dan/dev/wxVTK/wxVTK/src/wxVTKRenderWindowInteractor.h:98:5: error: ISO C++ forbids declaration of ‘vtkTypeRevisionMacro’ with no type [-fpermissive]
98 | vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
| ^~~~~~~~~~~~~~~~~~~~
/home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx: In member function ‘void MyFrame::ConfigureVTK()’:
/home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:208:14: error: ‘class vtkOutlineFilter’ has no member named ‘SetInput’; did you mean ‘GetInput’?
208 | outline->SetInput(v16->GetOutput());
| ^~~~~~~~
| GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:211:20: error: ‘class vtkPolyDataMapper’ has no member named ‘SetInput’; did you mean ‘GetInput’?
211 | outlineMapper->SetInput(outline->GetOutput());
| ^~~~~~~~
| GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:237:19: error: ‘class vtkImagePlaneWidget’ has no member named ‘SetInput’; did you mean ‘GetInput’?
237 | planeWidgetX->SetInput(v16->GetOutput());
| ^~~~~~~~
| GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:253:19: error: ‘class vtkImagePlaneWidget’ has no member named ‘SetInput’; did you mean ‘GetInput’?
253 | planeWidgetY->SetInput(v16->GetOutput());
| ^~~~~~~~
| GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:269:19: error: ‘class vtkImagePlaneWidget’ has no member named ‘SetInput’; did you mean ‘GetInput’?
269 | planeWidgetZ->SetInput(v16->GetOutput());
| ^~~~~~~~
| GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:277:32: error: cannot convert ‘float [2]’ to ‘double*’
277 | planeWidgetZ->GetWindowLevel(wl);
| ^~
| |
| float [2]
In file included from /home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:29:
/home/dan/dev/vtk/8.2.0/VTK-8.2.0/Interaction/Widgets/vtkImagePlaneWidget.h:445:30: note: initializing argument 1 of ‘void vtkImagePlaneWidget::GetWindowLevel(double*)’
445 | void GetWindowLevel(double wl[2]);
| ~~~~~~~^~~~~
/home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:285:15: error: ‘class vtkImageMapToColors’ has no member named ‘SetInput’; did you mean ‘GetInput’?
285 | colorMap->SetInput(planeWidgetZ->GetResliceOutput());
| ^~~~~~~~
| GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxImagePlaneWidget.cxx:290:17: error: ‘class vtkImageActor’ has no member named ‘SetInput’; did you mean ‘GetInput’?
290 | imageActor->SetInput(colorMap->GetOutput());
| ^~~~~~~~
| GetInput
make[2]: *** [CMakeFiles/wxImagePlaneWidget.dir/build.make:76: CMakeFiles/wxImagePlaneWidget.dir/Sample/wxImagePlaneWidget.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:89: CMakeFiles/wxImagePlaneWidget.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I tried using the VTK 8.2.0 I have built, and my system wxVTK that I think might be provided by the 'wxGtk' package in my case (which is gentoo with x11-libs/wxGTK-3.0.5.1)..
This (the ready build this time) also unfortunately still dies, saying:
[ 97%] Building CXX object CMakeFiles/ready.dir/src/gui/wxVTKRenderWindowInteractor.cxx.o
In file included from /usr/include/gtk-2.0/gdk/gdkscreen.h:32,
from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
from /usr/include/gtk-2.0/gdk/gdk.h:32,
from /usr/include/gtk-2.0/gdk/gdkprivate.h:30,
from /usr/include/gtk-2.0/gdk/gdkx.h:30,
from /home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.cxx:61:
/usr/include/gtk-2.0/gdk/gdktypes.h:114:39: error: conflicting declaration ‘typedef struct _GdkDrawable GdkWindow’
114 | typedef struct _GdkDrawable GdkWindow;
| ^~~~~~~~~
In file included from /usr/include/wx-3.0-gtk3/wx/wxprec.h:12,
from /home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.h:41,
from /home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.cxx:21:
/usr/include/wx-3.0-gtk3/wx/defs.h:3475:31: note: previous declaration as ‘typedef struct _GdkWindow GdkWindow’
3475 | typedef struct _GdkWindow GdkWindow;
| ^~~~~~~~~
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:33,
from /home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.cxx:62:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:64: warning: ‘GTypeDebugFlags’ is deprecated [-Wdeprecated-declarations]
236 | void gtk_type_init (GTypeDebugFlags debug_flags);
| ^
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:22,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from /usr/include/gtk-2.0/gdk/gdk.h:32,
from /usr/include/gtk-2.0/gdk/gdkprivate.h:30,
from /usr/include/gtk-2.0/gdk/gdkx.h:30,
from /home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.cxx:61:
/usr/include/glib-2.0/gobject/gtype.h:704:3: note: declared here
704 | } GTypeDebugFlags GLIB_DEPRECATED_TYPE_IN_2_36;
| ^~~~~~~~~~~~~~~
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:126,
from /home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.cxx:62:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:12: warning: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
73 | GTimeVal last_popdown;
| ^~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from /usr/include/glib-2.0/gobject/gbinding.h:28,
from /usr/include/glib-2.0/glib-object.h:22,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from /usr/include/gtk-2.0/gdk/gdk.h:32,
from /usr/include/gtk-2.0/gdk/gdkprivate.h:30,
from /usr/include/gtk-2.0/gdk/gdkx.h:30,
from /home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.cxx:61:
/usr/include/glib-2.0/glib/gtypes.h:545:26: note: declared here
545 | typedef struct _GTimeVal GTimeVal GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime);
| ^~~~~~~~
/home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.cxx: In member function ‘long int wxVTKRenderWindowInteractor::GetHandleHack()’:
/home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.cxx:391:43: error: cannot convert ‘GdkWindow*’ to ‘GdkDrawable*’ {aka ‘_GdkDrawable*’}
391 | Window win = gdk_x11_drawable_get_xid(gdk_window);
| ^~~~~~~~~~
| |
| GdkWindow*
In file included from /home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.cxx:61:
/usr/include/gtk-2.0/gdk/gdkx.h:42:57: note: initializing argument 1 of ‘XID gdk_x11_drawable_get_xid(GdkDrawable*)’
42 | XID gdk_x11_drawable_get_xid (GdkDrawable *drawable);
| ~~~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/wx-3.0-gtk3/wx/wxprec.h:12,
from /home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.h:41,
from /home/dan/dev/ready/readyGit/29thOct2022/ready/src/gui/wxVTKRenderWindowInteractor.cxx:21:
/usr/include/wx-3.0-gtk3/wx/defs.h:3475:20: note: class type ‘GdkWindow’ is incomplete
3475 | typedef struct _GdkWindow GdkWindow;
| ^~~~~~~~~~
make[2]: *** [CMakeFiles/ready.dir/build.make:234: CMakeFiles/ready.dir/src/gui/wxVTKRenderWindowInteractor.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:168: CMakeFiles/ready.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
Since I'm on Gentoo, I could install an older gcc in a "slot", and then select and rebuild using the older version.
What would be a good gcc version to try? Ready's README doesn't suggest a version.. I found an article where someone was using gcc-7ish to build VTK-8.2.0, but maybe it should work in later than that too?.. what gcc version are you using @timhutton ? Maybe I'll just match it, and give that a try.
Heheh woah! It actually looks like the oldest gcc I can easily install on my system without adding some overlay or something is gcc-8.5.0, and even that has some serious masking I'll have to undo in order to allow it! Still, sounds like potentially a way forward so I'll give it a crack!
Unfortunately, even with gcc 8.2.0, I still get these problems to do with a method called SetInput in a bunch of the vtk classes. This is what make says:
Consolidate compiler generated dependencies of target wxMedical3
[ 6%] Building CXX object CMakeFiles/wxMedical3.dir/Sample/wxMedical3.cxx.o
In file included from /home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:14:
/home/dan/dev/wxVTK/wxVTK/src/wxVTKRenderWindowInteractor.h:98:79: warning: ISO C++ forbids declaration of ‘vtkTypeRevisionMacro’ with no type [-fpermissive]
vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
^
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx: In member function ‘void MyFrame::ConfigureVTK()’:
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:219:20: error: ‘class vtkContourFilter’ has no member named ‘SetInput’; did you mean ‘GetInput’?
skinExtractor->SetInput( v16->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:222:18: error: ‘class vtkPolyDataNormals’ has no member named ‘SetInput’; did you mean ‘GetInput’?
skinNormals->SetInput(skinExtractor->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:225:19: error: ‘class vtkStripper’ has no member named ‘SetInput’; did you mean ‘GetInput’?
skinStripper->SetInput(skinNormals->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:227:17: error: ‘class vtkPolyDataMapper’ has no member named ‘SetInput’; did you mean ‘GetInput’?
skinMapper->SetInput(skinStripper->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:242:20: error: ‘class vtkContourFilter’ has no member named ‘SetInput’; did you mean ‘GetInput’?
boneExtractor->SetInput((vtkDataSet *) v16->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:245:18: error: ‘class vtkPolyDataNormals’ has no member named ‘SetInput’; did you mean ‘GetInput’?
boneNormals->SetInput(boneExtractor->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:248:19: error: ‘class vtkStripper’ has no member named ‘SetInput’; did you mean ‘GetInput’?
boneStripper->SetInput(boneNormals->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:250:17: error: ‘class vtkPolyDataMapper’ has no member named ‘SetInput’; did you mean ‘GetInput’?
boneMapper->SetInput(boneStripper->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:259:18: error: ‘class vtkOutlineFilter’ has no member named ‘SetInput’; did you mean ‘GetInput’?
outlineData->SetInput((vtkDataSet *) v16->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:261:17: error: ‘class vtkPolyDataMapper’ has no member named ‘SetInput’; did you mean ‘GetInput’?
mapOutline->SetInput(outlineData->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:302:21: error: ‘class vtkImageMapToColors’ has no member named ‘SetInput’; did you mean ‘GetInput’?
saggitalColors->SetInput(v16->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:305:15: error: ‘class vtkImageActor’ has no member named ‘SetInput’; did you mean ‘GetInput’?
saggital->SetInput(saggitalColors->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:311:18: error: ‘class vtkImageMapToColors’ has no member named ‘SetInput’; did you mean ‘GetInput’?
axialColors->SetInput(v16->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:314:12: error: ‘class vtkImageActor’ has no member named ‘SetInput’; did you mean ‘GetInput’?
axial->SetInput(axialColors->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:320:20: error: ‘class vtkImageMapToColors’ has no member named ‘SetInput’; did you mean ‘GetInput’?
coronalColors->SetInput(v16->GetOutput());
^~~~~~~~
GetInput
/home/dan/dev/wxVTK/wxVTK/Sample/wxMedical3.cxx:323:14: error: ‘class vtkImageActor’ has no member named ‘SetInput’; did you mean ‘GetInput’?
coronal->SetInput(coronalColors->GetOutput());
^~~~~~~~
GetInput
make[2]: *** [CMakeFiles/wxMedical3.dir/build.make:76: CMakeFiles/wxMedical3.dir/Sample/wxMedical3.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: CMakeFiles/wxMedical3.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I found this:
https://vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput
Maybe I can do the migration of wxVTK based on that? I will give it a crack!
Migrating this setInput thing did seem to work (Though I can't flaming find any changes now), but then I got stuck (mainly for lack of time to concentrate on this) on another compile problem, that turned out to be because I had butchered the cmake's GTK section and forced it to select gtk2. Once I made it select gtk3 instead, it built successfully!! HOOOOO-flamin'-RAYY!!!! I can finally load VTIs again! And the UI seems to be a bit updated too, solid!
I'm hoping that being able to use the ready GUI again will help me to debug a bug in the Houdini plugin. I have done a bunch of work that I want to commit where I have ported it to python3 and houdini19, and it is almost completely working but something is going wrong when there are more than 2 reagents, so those simulations don't continue as-is but fizz out instead.. and it's been quite tricky to check specifically what is breaking without having the ability to tweak things in the Ready GUI (and/or ample time available for more strenuous comparisons!).
There's not much to put into any pull request for Ready for by the looks.. mainly just disabling various cmake checks (on other packages, apart from this gtk2/3 thing).. I should try to build again from scratch and record the changes I actually need to make to get it to work.. it's been a bit of a try-anything-till-it-works adventure up till now.
Reported by @danwills:
The build of the 'ready' GUI binary unfortunately died! saying this kinda thing: