Community
Participate
Working Groups
We are getting compilation error during native build cc -O -Wall -fPIC -DSWT_VERSION=4942r17 -DLINUX -DGTK -I/opt/tools/java/oracle/jdk-8/latest/include -I/opt/tools/java/oracle/jdk-8/latest/include/linux -DJNI64 -Werror `pkg-config --cflags gtk+-3.0 gtk+-unix-print-3.0` -c os_custom.c os_custom.c: In function 'Java_org_eclipse_swt_internal_gtk_GTK__1gtk_1im_1context_1filter_1keypress': os_custom.c:164:9: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas] #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" ^ os_custom.c:165:2: error: passing argument 2 of 'gtk_im_context_filter_keypress' from incompatible pointer type [-Werror] rc = (jboolean)gtk_im_context_filter_keypress((GtkIMContext *)arg0, (GdkEvent *)arg1); ^ In file included from /usr/include/gtk-3.0/gtk/gtkentry.h:38:0, from /usr/include/gtk-3.0/gtk/gtktreeview.h:29, from /usr/include/gtk-3.0/gtk/gtkcombobox.h:27, from /usr/include/gtk-3.0/gtk/gtkappchooserbutton.h:29, from /usr/include/gtk-3.0/gtk/gtk.h:42, from os.h:30, from os_structs.h:19, from os_custom.c:17: /usr/include/gtk-3.0/gtk/gtkimcontext.h:108:10: note: expected 'struct GdkEventKey *' but argument is of type 'union GdkEvent *' gboolean gtk_im_context_filter_keypress (GtkIMContext *context, ^ cc1: all warnings being treated as errors make: *** [os_custom.o] Error 1 [0;31m*** GTK3 Build failed, aborting further actions..[0m https://ci.eclipse.org/releng/job/gtk_linux_x86_64_pipeline_chromium/187/console This was introduced by https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=a743711b6bfaf322eebcfd54f7cfa79598b2b141
Sravan, I propose moving the rhel 7 build machines to rhel 8 that would bump gcc from 4.8 to 8.3 while gtk3 stays at gtk 3.22 level. RHEL 7 is in maitenance phase 2 so we should start phasing it out as not much (if anything) that's important for us will change on it. Having to align to gcc 4.8 features nowadays becomes too hard requirement to fullfill and consider on changes.
According to what I see in documentation the build machine must be super ancient. '#pragma GCC diagnostic ignored' is since gcc 4.2.0 [1] released in 2007 [3] '#pragma GCC diagnostic pop' is since gcc 4.6.0 [2] released in 2011 [3] According to the error, features from 2007 are still not supported on build machine! Indeed it's a pain to support that. For comparison, GTK 3.22 is from 2016. [1] https://gcc.gnu.org/onlinedocs/gcc-4.2.0/gcc/Diagnostic-Pragmas.html [2] https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html [3] https://gcc.gnu.org/releases.html
The problem was solved with a revert [1], I have now submitted an improved fix in Bug 570533 [1] https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/175194
(In reply to Alexander Kurtakov from comment #1) > Sravan, I propose moving the rhel 7 build machines to rhel 8 that would bump > gcc from 4.8 to 8.3 while gtk3 stays at gtk 3.22 level. RHEL 7 is in > maitenance phase 2 so we should start phasing it out as not much (if > anything) that's important for us will change on it. > Having to align to gcc 4.8 features nowadays becomes too hard requirement to > fullfill and consider on changes. I am fine with that. Right now we are blocked with bug 570675. We cannot build new docker image for build because of that.
(In reply to Alexandr Miloslavskiy from comment #2) > According to what I see in documentation the build machine must be super > ancient. > '#pragma GCC diagnostic ignored' is since gcc 4.2.0 [1] released in 2007 [3] > '#pragma GCC diagnostic pop' is since gcc 4.6.0 [2] released in 2011 [3] > > According to the error, features from 2007 are still not supported on build > machine! Indeed it's a pain to support that. For comparison, GTK 3.22 is > from 2016. > > [1] https://gcc.gnu.org/onlinedocs/gcc-4.2.0/gcc/Diagnostic-Pragmas.html > [2] https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html > [3] https://gcc.gnu.org/releases.html But we are using gcc-4.8.5-44.el7.x86_64 See: https://ci.eclipse.org/releng/view/Docker%20Build/job/Build-Docker-images/lastSuccessfulBuild/artifact/eclipse.platform.releng.aggregator/cje-production/dockerfiles/swt_build.log/*view*/
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.releng.aggregator/+/175401
It is possible that the version we have support for pragmas ignored in general but not for all warning types and specifically the one I tried to use. Either way I don't plan spending more time investigating what's wrong with gcc 4.8 - it's dead version for me and Alexandr started working on better approach already. This doesn't remove the need to update our infrastructure though.
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.releng.aggregator/+/175401 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=3a43e2e2697995f8cd614c5a990481178f4235d1