GTK3 warnings when building from source

Hi to the Devs,

I’ve moved to Manjaro from Ubuntu and have been seeing the following when building RT from source:

[ 98%] Building CXX object rtgui/CMakeFiles/rth.dir/fattaltonemap.cc.o
In file included from /usr/include/gtk-3.0/gtk/gtk.h:100,
                 from /usr/include/gtkmm-3.0/gtkmm/enums.h:28,
                 from /usr/include/gtkmm-3.0/gtkmm/widget.h:47,
                 from /usr/include/gtkmm-3.0/gtkmm/action.h:31,
                 from /usr/include/gtkmm-3.0/gtkmm/toggleaction.h:29,
                 from /usr/include/gtkmm-3.0/gtkmm.h:95,
                 from /home/pete/repo-rt/rtgui/xtransprocess.h:22,
                 from /home/pete/repo-rt/rtgui/xtransprocess.cc:20:
/usr/include/gtk-3.0/gtk/gtkfilechooserbutton.h:66:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses]
   void (*__gtk_reserved1);
        ^
/usr/include/gtk-3.0/gtk/gtkfilechooserbutton.h:67:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved2’ [-Wparentheses]
   void (*__gtk_reserved2);
        ^
/usr/include/gtk-3.0/gtk/gtkfilechooserbutton.h:68:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved3’ [-Wparentheses]
   void (*__gtk_reserved3);
        ^
/usr/include/gtk-3.0/gtk/gtkfilechooserbutton.h:69:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved4’ [-Wparentheses]
   void (*__gtk_reserved4);
        ^
In file included from /usr/include/gtk-3.0/gtk/gtk.h:271,
                 from /usr/include/gtkmm-3.0/gtkmm/enums.h:28,
                 from /usr/include/gtkmm-3.0/gtkmm/widget.h:47,
                 from /usr/include/gtkmm-3.0/gtkmm/action.h:31,
                 from /usr/include/gtkmm-3.0/gtkmm/toggleaction.h:29,
                 from /usr/include/gtkmm-3.0/gtkmm.h:95,
                 from /home/pete/repo-rt/rtgui/xtransprocess.h:22,
                 from /home/pete/repo-rt/rtgui/xtransprocess.cc:20:
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:74:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses]
   void (*__gtk_reserved1);
        ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:75:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved2’ [-Wparentheses]
   void (*__gtk_reserved2);
        ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:76:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved3’ [-Wparentheses]
   void (*__gtk_reserved3);
        ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:77:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved4’ [-Wparentheses]
   void (*__gtk_reserved4);
        ^
In file included from /usr/include/gtk-3.0/gtk/gtk.h:100,
                 from /usr/include/gtkmm-3.0/gtkmm/enums.h:28,
                 from /usr/include/gtkmm-3.0/gtkmm/widget.h:47,
                 from /usr/include/gtkmm-3.0/gtkmm/action.h:31,
                 from /usr/include/gtkmm-3.0/gtkmm/toggleaction.h:29,
                 from /usr/include/gtkmm-3.0/gtkmm.h:95,
                 from /home/pete/repo-rt/rtgui/xtransrawexposure.h:22,
                 from /home/pete/repo-rt/rtgui/xtransrawexposure.cc:19:
/usr/include/gtk-3.0/gtk/gtkfilechooserbutton.h:66:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses]
   void (*__gtk_reserved1);
        ^
/usr/include/gtk-3.0/gtk/gtkfilechooserbutton.h:67:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved2’ [-Wparentheses]
   void (*__gtk_reserved2);
        ^
/usr/include/gtk-3.0/gtk/gtkfilechooserbutton.h:68:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved3’ [-Wparentheses]
   void (*__gtk_reserved3);
        ^
/usr/include/gtk-3.0/gtk/gtkfilechooserbutton.h:69:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved4’ [-Wparentheses]
   void (*__gtk_reserved4);
        ^
In file included from /usr/include/gtk-3.0/gtk/gtk.h:271,
                 from /usr/include/gtkmm-3.0/gtkmm/enums.h:28,
                 from /usr/include/gtkmm-3.0/gtkmm/widget.h:47,
                 from /usr/include/gtkmm-3.0/gtkmm/action.h:31,
                 from /usr/include/gtkmm-3.0/gtkmm/toggleaction.h:29,
                 from /usr/include/gtkmm-3.0/gtkmm.h:95,
                 from /home/pete/repo-rt/rtgui/xtransrawexposure.h:22,
                 from /home/pete/repo-rt/rtgui/xtransrawexposure.cc:19:
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:74:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses]
   void (*__gtk_reserved1);
        ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:75:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved2’ [-Wparentheses]
   void (*__gtk_reserved2);
        ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:76:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved3’ [-Wparentheses]
   void (*__gtk_reserved3);
        ^
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:77:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved4’ [-Wparentheses]
   void (*__gtk_reserved4);


The build script I use:

pete@kanga~ $ cat bin/build-rawtherapee.sh 
#!/bin/sh

cd /home/pete/repo-rt
rm -rf build
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE="release" \
      -DPROC_TARGET_NUMBER="2" \
      -DBUILD_BUNDLE="ON" \
      -DCACHE_NAME_SUFFIX="5-dev" \
      -DWITH_LTO="OFF" \
      ..

# make doesn't work from the build dir
make -j8 install
rm -rf /home/pete/rt
mv release /home/pete/rt

Thought it worth mentioning.

Peter.

Post removed since I completely misunderstood the question :-(((.
Sorry about that!

Claes in Lund, Sweden

@Claes

He is on Manjaro

1 Like

Sch**sse!!!
Thank you.
I read his opening sentence backwards :-(((

MfG
Claes in Lund, Schweden

@plaven

  1. Format your post for readability: http://commonmark.org/help/
  2. The warnings are from GTK+ not from RT.
  3. Always provide relevant version numbers when reporting issues. What version of GTK+ are you using?
  4. “make doesn’t work” is not actionable information.
  5. Use the official build script: Linux - RawPedia

I downloaded the last Manjaro, installed it, updated it, followed the simple instructions in RawPedia, and RawTherapee compiled and ran successfully.

1 Like

Hi Peter,

FWIW, I got the same warnings under Debian Testing. Just edit /usr/include/gtk-3.0/gtk/gtkfilechooserbutton.h and wait for a fix from your distribution.

HTH,
Flössie

Hi Morgan,

Point taken on the formatting. I was rushed, and just quickly put it up to raise the question. I’ll take my time next time.

RT is running fine. The warnings are showing up when compiling.

I’ve downloaded the script from the site as per the page, and while it’s a very thorough script to completely automate the whole pipeline, I much prefer, and in many ways enjoy, opening the terminal, changing to the repo directory and doing a git pull and looking at the updates. I also read through the git log to what’s changed, and every now and then do git log -p to see where the code has changed.

I’ve updated my cmake options to align with the cmake options in your script.

I still see the warnings for now, but as mentioned this is a GTK issue not RT. I can, of course now, see that better.

Thanks for your time.

Peter.

Thanks Flossie, I’ll leave it for now. There’s another warning for a deprecated header file as well.

I’ll google around and see if I can’t find the right place to raise it further.

Morning,

A swift thought: you did install the dependencies (as per http://rawpedia.rawtherapee.com/Linux#Arch.2FManjaro)?

sudo pacman -S --needed cmake exiv2 expat fftw glib2 glibmm gtk3 gtkmm3 lcms2 lensfun libcanberra libiptcdata libjpeg-turbo libpng libsigc++ libtiff zlib

Have fun!
Claes in Lund, Sweden

Hi Claes,

Sure did!

First thing I did when I changed distros is go to that page to find all the dependencies :slight_smile:

Peter

I also see these warnings on my laptop, running Manjaro, but I didn’t mention it here as I saw it is GTK-related, and these are just warnings, not errors. I think it comes form a recent GTK update in Manjaro.

Hi Sebastien,

I should have really taken a closer look at the warnings.

I’ve raised an issue on the Gnome issue tracker:

Peter.

2 Likes

I’d rather think it comes from a GCC update…

Best,
Flössie

@plaven could you include this in your GTK+ bug report?
The simplest way to reproduce the problem, taken from here:

echo '#include <gtk/gtk.h>' | gcc -Wall $(pkg-config --cflags gtk+-3.0) -c -x c++ -

I guess you’re right, GCC has been updated recently too.

1 Like

It would appear the condition was added to the long-standing -Wparentheses switch around gcc 8.0. This was added to the documentation around that time:

“For C++ this also warns for some cases of unnecessary parentheses in declarations, which can indicate an attempt at a function call instead of a declaration”

You may not see this switch in the compile commands; it is one of the gaggle enabled by -Wall

1 Like

Hi Morgan,

Done as suggested.

Peter.

Turns out it’s already reported and fixed for 3.22.