Article 5CSBN xscreensaver-5.45 on Slackware 14.2

xscreensaver-5.45 on Slackware 14.2

by
drumz
from LinuxQuestions.org on (#5CSBN)
Historically xscreensaver has been kept up to date in Slakcware-stable, but it's been frozen at 5.43 (while -current has moved on to 5.45). I decided to take the -current SlackBuild and try building on Slackware-14.2.

No luck (NUMJOBS set to 1 to make errors easier to read):

Code:gcc -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes -Wno-overlength-strings -Wdeclaration-after-statement -std=c89 -U__STRICT_ANSI__ -c -I. -I. -I./../utils -I.. -pthread -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/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/libxml2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DHAVE_CONFIG_H -O2 -fPIC -DHACK_CONFIGURATION_PATH='"/usr/share/xscreensaver/config"' -DDEFAULT_PATH_PREFIX='"/usr/libexec/xscreensaver"' -DDEFAULT_ICONDIR='"/usr/share/xscreensaver/ui"' -DLOCALEDIR=\"/usr/share/locale\" -I./../utils/images ./demo-Gtk.c
In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:32:0,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/glib-2.0/gobject/gbinding.h:28,
from /usr/include/glib-2.0/glib-object.h:23,
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/gtk/gtk.h:32,
from ./demo-Gtk.c:94:
/usr/include/glib-2.0/glib/gthread.h:318:8: error: unknown type name 'inline'
static inline GMutexLocker *
^
/usr/include/glib-2.0/glib/gthread.h:318:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
static inline GMutexLocker *
^
/usr/include/glib-2.0/glib/gthread.h:333:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
static inline void
^
In file included from /usr/include/glib-2.0/glib/glist.h:32:0,
from /usr/include/glib-2.0/glib/ghash.h:33,
from /usr/include/glib-2.0/glib.h:50,
from /usr/include/glib-2.0/gobject/gbinding.h:28,
from /usr/include/glib-2.0/glib-object.h:23,
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/gtk/gtk.h:32,
from ./demo-Gtk.c:94:
/usr/include/glib-2.0/glib/gmem.h:185:8: error: unknown type name 'inline'
static inline gpointer
^
/usr/include/glib-2.0/glib/gmem.h:186:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'g_steal_pointer'
g_steal_pointer (gpointer pp)
^that's weird... GCC complaining about a system include file.

After some searching I found this:
https://github.com/GNOME/glib/commit...6a16f10cad04c2
https://bugzilla.gnome.org/show_bug.cgi?id=757374

This was key:
Quote:
One thing that is not yet totally supported is the unadorned use of the
word "inline". Depending on the flags (-std=c89, for example), even GCC
will complain about this
. Detect missing C99 support and define
"inline" to "__inline" in that case. Some research shows "__inline"
appears to be the most widely-supported keyword here, but we may need to
tweak this if we get some reports of breakage.
Adding "-std=gnu89" to SLKCFLAGS allows xscreensaver to compile successfully (note that in the failing build log we had "-std=c89").

Code:# diff -Nau xscreensaver.SlackBuild.orig xscreensaver.SlackBuild
--- xscreensaver.SlackBuild.orig 2020-12-16 02:14:12.931865216 +0000
+++ xscreensaver.SlackBuild 2021-01-13 15:19:31.736089790 +0000
@@ -59,6 +59,7 @@
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
+SLKCFLAGS="$SLKCFLAGS -std=gnu89"

TMP=${TMP:-/tmp}
PKG=$TMP/package-xscreensaverSo why is this just now popping up? Maybe the reason is that xscreensaver 5.45 switched from Glade to GtkBuilder (according to Changelog), causing it to hit different code paths.latest?d=yIl2AUoC8zA latest?i=HyMikuJvcnM:mKm9HpzIXZo:F7zBnMy latest?i=HyMikuJvcnM:mKm9HpzIXZo:V_sGLiP latest?d=qj6IDK7rITs latest?i=HyMikuJvcnM:mKm9HpzIXZo:gIN9vFwHyMikuJvcnM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments