LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-13-2021, 09:39 AM   #1
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 904

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
xscreensaver-5.45 on Slackware 14.2


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-xscreensaver
So 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.
 
Old 01-13-2021, 03:07 PM   #2
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 904

Original Poster
Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
That was quick!

Quote:
Wed Jan 13 19:51:45 UTC 2021
patches/packages/xscreensaver-5.45-x86_64-1_slack14.2.txz: Upgraded.
Here's an upgrade to the latest xscreensaver.
Thanks to drumz for the compile fix.
+--------------------------+
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] xscreensaver 5.12 slackware 13.37 anti_user Slackware 3 03-16-2011 12:24 PM
Why does xscreensaver use 100% CPU in Slackware, others too? linus72 Linux - General 1 12-18-2010 03:36 PM
Xscreensaver & session-lock confusion, using XDM, KDE & Slackware. GrapefruiTgirl Linux - Desktop 1 05-15-2007 11:22 AM
Xscreensaver not using .xscreensaver psychobyte Fedora 4 04-07-2006 10:02 AM
xscreensaver installed, but no xscreensaver-demo command? dalesan Linux - Software 7 09-01-2004 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration