CelestiaProject / Celestia

Real-time 3D visualization of space.

Home Page:https://celestiaproject.space

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recent GTK changes cause build error

mattiaverga opened this issue · comments

I tried to build a recent commit (35878a3) from the master branch in Fedora, but I got the following error:

[ 86%] Building CXX object src/celestia/gtk/CMakeFiles/celestia-gtk.dir/dialog-solar.cpp.o
cd /builddir/build/BUILD/Celestia-35878a35f1982b381683cc46e26c4c61011b9d94/redhat-linux-build/src/celestia/gtk && /usr/bin/g++ -DCAIRO -DCELX -DCONFIG_DATA_DIR=\"/usr/share/celestia\" -DEIGEN_NO_DEBUG -DENABLE_NLS -DFMT_SHARED -DGIT_COMMIT=\"35878a3\" -DGTKGLEXT -DHIP_DATA_DIR=\"/usr/share/celestia\" -DLOCALEDIR=\"/usr/share/locale\" -DNO_DEBUG -DUSE_FFMPEG -DUSE_LIBAVIF -DUSE_MINIAUDIO -DVERSION=\"1.7.0\" -D_USE_MATH_DEFINES -I/builddir/build/BUILD/Celestia-35878a35f1982b381683cc46e26c4c61011b9d94/redhat-linux-build/src/celestia/gtk -I/builddir/build/BUILD/Celestia-35878a35f1982b381683cc46e26c4c61011b9d94/src/celestia/gtk -I/builddir/build/BUILD/Celestia-35878a35f1982b381683cc46e26c4c61011b9d94/src -I/builddir/build/BUILD/Celestia-35878a35f1982b381683cc46e26c4c61011b9d94/redhat-linux-build -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/webp -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/sysprof-6 -I/usr/include/gtkglext-1.0 -I/usr/lib64/gtkglext-1.0/include -I/builddir/build/BUILD/Celestia-35878a35f1982b381683cc46e26c4c61011b9d94/thirdparty/miniaudio -isystem /usr/include/freetype2 -isystem /usr/include/ffmpeg -isystem /usr/include/eigen3 -isystem /usr/include/luajit-2.1 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DNDEBUG -std=gnu++17 -fPIE -fvisibility=hidden -fno-exceptions -Wno-deprecated-declarations -MD -MT src/celestia/gtk/CMakeFiles/celestia-gtk.dir/dialog-solar.cpp.o -MF CMakeFiles/celestia-gtk.dir/dialog-solar.cpp.o.d -o CMakeFiles/celestia-gtk.dir/dialog-solar.cpp.o -c /builddir/build/BUILD/Celestia-35878a35f1982b381683cc46e26c4c61011b9d94/src/celestia/gtk/dialog-solar.cpp
/builddir/build/BUILD/Celestia-35878a35f1982b381683cc46e26c4c61011b9d94/src/celestia/gtk/dialog-options.cpp: In function `void celestia::gtk::dialogViewOptions(AppData*)`:
/builddir/build/BUILD/Celestia-35878a35f1982b381683cc46e26c4c61011b9d94/src/celestia/gtk/dialog-options.cpp:217:44: error: cannot convert `GtkObject*` {aka `_GtkObject*`} to `GtkAdjustment*` {aka `_GtkAdjustment*`} in initialization
  217 |     GtkAdjustment *adj = gtk_adjustment_new(static_cast<gfloat>(logDistanceLimit * DistanceSliderRange),
      |                          ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                            |
      |                                            GtkObject* {aka _GtkObject*}
  218 |                                             0.0, DistanceSliderRange, 1.0, 2.0, 0.0);
      |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [src/celestia/gtk/CMakeFiles/celestia-gtk.dir/build.make:135: src/celestia/gtk/CMakeFiles/celestia-gtk.dir/dialog-options.cpp.o] Error 1

I think that's related to #2106
The full log is here.
That's with gtk2 2.24.33

Ideally we should drop this front-end. Will try and get round to finishing off adding Dear Imgui to the SDL front-end, which hopefully covers the OpenGL debugging tools use case.

What is the "preferred" gtk frontend, gtk2 or gtk3?
I recently tried a local rebuild with gtk3, but I've found it's totally unusable, at least under plasma-wayland. Nothing is rendered in the celestia window. Also tried forcing it running under X11 compatibility layer (with WAYLAND_DISPLAY= celestia-gtk), but got only small improvements (stars are rendered, but not planets).

I've not tried running under Gnome, but I think I can't switch Fedora RPMs to use GTK3 until it will work under KDE also.

mmm.... I've built 35878a3 with #2149 applied and I get this:
celestia

(which, BTW, is the same result as celestia built with gtk3 running under plasma-wayland in X11 compatibility layer)

The GTK frontend should be considered dead. We don't have active developers for it. The only reason we keep it around is because @375gnu uses OpenGL debugging tools that don't work with any of the frontends other than GTK2 (and probably also SDL, but that one's too basic to do much with at the moment).

it was never tested with wayland. gtk2 build by default use GLX, which is X11 only. gtk3 and optionally gtk2 use EGL, but it was tested with real X11 only.

@mattiaverga could you share /tmp/clestia-shaders.log with broken planets?