Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 885441 - x11-misc/xscreensaver-6.05-r1[-gdk-pixbuf,-jpeg] fails to build: econf dies on exit code 1
Summary: x11-misc/xscreensaver-6.05-r1[-gdk-pixbuf,-jpeg] fails to build: econf dies o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Pascal Jäger
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-12-11 11:03 UTC by Petr Pisar
Modified: 2022-12-16 20:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisar 2022-12-11 11:03:29 UTC
x11-misc/xscreensaver-6.05-r1 fails to build:

# emerge -v1a x11-misc/xscreensaver

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] x11-misc/xscreensaver-6.05-r1::gentoo [6.01-r4::gentoo] USE="locking pam -X -elogind -fonts -gdk-pixbuf -gdm -gles% -glx% -gtk -jpeg -new-login -offensive -perl -png (-selinux) -suid -systemd -xinerama (-opengl%) (-xft%*)" 0 KiB
[...]
config.status: executing po/stamp-it commands

    #################################################################

    Warning: The GTK libraries do not seem to be available; the
             `xscreensaver-settings' program requires them.

    Warning: The GDK-Pixbuf library is not being used.

             Some of the demos will not use images as much as they could.
             You should consider installing GDK-Pixbuf and re-running
             configure.

    Warning: The JPEG library is not being used.

             This means that it won't be possible for the image-manipulating
             display modes to load files from disk; and it also means that
             the `webcollage' program will be much slower.

    Warning: The PNG library is not being used.
             Many things aren't going to work right.

       Note: The systemd library is not being used.

             This means that xscreensaver-systemd won't be built.
             Without that, xscreensaver will not be able to auto-lock
             before the system is suspended (e.g., closing laptop lid)
             and might activate while video playback is in progress.

    #################################################################

    XScreenSaver will be installed in these directories:

             User programs: /usr/bin/
             Screen savers: /usr/lib64/misc/xscreensaver/
             Configuration: /usr/share/xscreensaver/config/
             Extra Fonts:   /usr/share/fonts/xscreensaver/
             App Defaults:  /usr/share/X11/app-defaults/


!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/x11-misc/xscreensaver-6.05-r1/work/xscreensaver-6.05/config.log


The reason is that "./configure --without-pixbuf --with-jpeg=no" script exits with 1 because the script sets CONF_STATUS=1 if "$have_jpeg" = no and "$have_gdk_pixbuf" = no. I added a debugging into configure like this:

if test "$have_jpeg" = no ; then
  if test "$with_jpeg_req" = yes ; then
    warnL 'Use of libjpeg was requested, but it was not found.'
    CONF_STATUS=1
  elif test "$with_jpeg_req" = no ; then
    warnL 'The JPEG library is not being used.'
  else
    warnL 'The JPEG library was not found.'
  fi

  if test "$jpeg_halfassed" = yes ; then halfassery ; fi
echo "HIT CONF_STATUS=$CONF_STATUS"
  if test "$have_gdk_pixbuf" = no ; then
    echo ''
    warn2 "This means that it won't be possible for the image-manipulating"
    warn2 "display modes to load files from disk; and it also means that"
    warn2 "the \`webcollage' program will be much slower."
    CONF_STATUS=1
echo "HIT CONF_STATUS=$CONF_STATUS"
  else
    warn2 "This means the \`webcollage' program will be much slower."
  fi
fi


And the output confirms it:

# ac_cv_have_proc_interrupts=yes; ./configure '--enable-locking' '--without-elogind' '--without-pixbuf' '--without-gles' '--without-glx' '--without-gtk' '--without-login-manager' '--with-pam' '--without-setuid-hacks' '--without-systemd' '--without-xinerama-ext' '--with-jpeg=no' '--with-png=no' '--with-xft=yes' '--with-app-defaults=/usr/share/X11/app-defaults' '--with-configdir=/usr/share/xscreensaver/config' '--with-dpms-ext' '--with-hackdir=/usr/lib64/misc/xscreensaver' '--with-proc-interrupts' '--with-randr-ext' '--with-text-file=/etc/gentoo-release' '--with-xdbe-ext' '--with-xf86gamma-ext' '--with-xf86vmode-ext' '--with-xinput-ext' '--with-xkb-ext' '--with-xshm-ext' '--without-gle' '--without-kerberos' '--without-motif' '--with-proc-oom' '--x-includes=/usr/include' '--x-libraries=/usr/lib64'
[...]
    Warning: The JPEG library is not being used.
HIT CONF_STATUS=0

             This means that it won't be possible for the image-manipulating
             display modes to load files from disk; and it also means that
             the `webcollage' program will be much slower.
HIT CONF_STATUS=1

This is a regression against 6.01-r4 which builds fine with the same USE flags.
Comment 1 Sebastian Pipping gentoo-dev 2022-12-14 20:57:42 UTC
Good report, I can reproduce the issue locally.

The fixes is adding "|| ( jpeg gdk-pixbuf )" to REQUIRED_USE, in my eyes.


PS: To re-summarize the cause, configure.ac has this (unconditional) code:

>> if test "$have_jpeg" = no ; then
>>   [..]
>>   if test "$have_gdk_pixbuf" = no ; then
>>     [..]
>>     CONF_STATUS=1
>>   else
>>     [..]
>>   fi
>> fi
Comment 2 Pascal Jäger 2022-12-15 08:18:46 UTC
(In reply to Sebastian Pipping from comment #1)
> The fixes is adding "|| ( jpeg gdk-pixbuf )" to REQUIRED_USE, in my eyes.

Not really, the problem here is that upstream thinks it's ok to exit configure with a non zero exit code even though it is only throwing a warning. But portage thinks (rightfully so) that anything other than 0 means something went fatally wrong in configure and it should not continue.
Comment 3 Sebastian Pipping gentoo-dev 2022-12-15 14:40:54 UTC
(In reply to Pascal Jäger from comment #2)
> (In reply to Sebastian Pipping from comment #1)
> > The fixes is adding "|| ( jpeg gdk-pixbuf )" to REQUIRED_USE, in my eyes.
> 
> Not really, the problem here is that upstream thinks it's ok to exit
> configure with a non zero exit code even though it is only throwing a
> warning. But portage thinks (rightfully so) that anything other than 0 means
> something went fatally wrong in configure and it should not continue.

The situation is not black and white.  Patching CONF_STATUS=1 away means we are further deviating from upstream, adding one more patch to an already hard-to-main ebuild making maintence even harder (e.g. when the next release causes conflicts on this patch) and all that cost just to support case USE="-jpeg -gdk-pixbuf" which I don't consider popular or even relevant because of the -jpeg part.  If upstream considers this case a problem, I would vote for sticking with upstream, adding "|| ( jpeg gdk-pixbuf )" to REQUIRED_USE, and no other addition of complexity.  Seems a lot more healthy to me.
Comment 4 Pascal Jäger 2022-12-16 10:25:48 UTC
Yes it's true that with all those patches we go deeper and deeper into more complexity. It is already hard to figure out all the dependencies of use flags on each other.
I fact I would love to throw all of that away and just package what upstream provides. (+ the usual gentoo patches, like sandboxing and possibility to choose C-compiler). But that means getting rid of installing without gtk and opengl options as well. 

Shall we go this way: 
- put || ( jpeg gdk-pixbuf ) into the 6.05-r2 and accept that this as a regression from before
- when we have the next version bump from upstream I will rework all the patches and drop all the options that aren't supported by upstream. That would make maintaining that ebuild way easier.
Comment 5 Sebastian Pipping gentoo-dev 2022-12-16 20:18:21 UTC
(In reply to Pascal Jäger from comment #4)
> Shall we go this way: 
> - put || ( jpeg gdk-pixbuf ) into the 6.05-r2 and accept that this as a
> regression from before
> - when we have the next version bump from upstream I will rework all the
> patches and drop all the options that aren't supported by upstream. That
> would make maintaining that ebuild way easier.

Deal :)  Thanks for being open to that!
Comment 6 Larry the Git Cow gentoo-dev 2022-12-16 20:19:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4662bc9b410044c7f4a2118efb479b1523d591f

commit f4662bc9b410044c7f4a2118efb479b1523d591f
Author:     Pascal Jäger <pascal.jaeger@leimstift.de>
AuthorDate: 2022-12-15 11:25:01 +0000
Commit:     Sebastian Pipping <sping@gentoo.org>
CommitDate: 2022-12-16 20:18:44 +0000

    x11-misc/xscreensaver: revbump, fix bugs
    
    Closes: https://bugs.gentoo.org/885441
    Closes: https://bugs.gentoo.org/885479
    Closes: https://bugs.gentoo.org/885989
    Closes: https://github.com/gentoo/gentoo/pull/28671
    
    Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>

 ...xscreensaver-6.05-r2-configure-exit-codes.patch |  43 ++++
 x11-misc/xscreensaver/xscreensaver-6.05-r2.ebuild  | 248 +++++++++++++++++++++
 2 files changed, 291 insertions(+)