Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703676 - sys-apps/portage: app-text/libspectre rebuilt before app-text/ghostscript-gpl DEPEND with USE="cups gtk zeroconf"
Summary: sys-apps/portage: app-text/libspectre rebuilt before app-text/ghostscript-gpl...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 690436
Blocks: build-order 701268
  Show dependency tree
 
Reported: 2019-12-24 21:08 UTC by Pacho Ramos
Modified: 2019-12-26 23:05 UTC (History)
1 user (show)

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


Attachments
emerge output (emerge.out,18.43 KB, text/plain)
2019-12-24 21:08 UTC, Pacho Ramos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2019-12-24 21:08:14 UTC
Created attachment 600578 [details]
emerge output

In some machines that I am updating I am getting a build failure in libspectre due to it trying to be rebuilt before ghostscript is updated too, even if libspectre lists ghostscript as DEPEND and RDEPEND.

The failure is libspectre is about not finding libgs, but that is a problem caused by ghostscript needing to get rebuilt after other package got updated. To fix it I simply need to rebuild ghostscript or, in this context, simply update it before libspectre gets rebuilt.

The same build failure happens for gimp, that is also rebuilt before ghostscript is updated.

Portage 2.3.82 (python 2.7.17-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-8.3.0, glibc-2.29-r7, 5.2.8-gentoo x86_64)
=================================================================
System uname: Linux-5.2.8-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E7500_@_2.93GHz-with-gentoo-2.6
KiB Mem:     3970376 total,   1626756 free
KiB Swap:    6286332 total,   5668576 free
Timestamp of repository gentoo: Mon, 23 Dec 2019 09:45:01 +0000
Head commit of repository gentoo: 1db96ee5fe4f3fb42624d18f8664b84fe0ecdeb2
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
ccache version 3.7.4 [enabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.9::gentoo
dev-util/ccache:          3.7.4::gentoo
dev-util/cmake:           3.14.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo, 9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

fisi35
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write --keep-going --autounmask-keep-masks --backtrack=200 --autounmask"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/usr/share/locale -/usr/share/locale/es -/usr/share/locale/es_ES -/usr/share/locale/en -/usr/share/locale/en_US -/usr/share/locale/en@boldquot -/usr/share/locale/en@quot -/usr/share/locale/en@shaw"
LANG="es_ES.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="es es_ES en_US en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="7z 7zip X \ a52 aac acl acpi alsa amd64 archive berkdb bluetooth bluray branding bzip2 cairo ccache cdda cddb cdr chrome chromecast chromium cli colord crypt cups cxx dbus dell djvu dot dri dts dvd dvdr eds emboss encode equalizer ethernet evince evo excel exif fam ffmpeg firefox flac flash foomaticdb fortran games gdbm gdk-pixbuf gdm gedit gif gimp git gnome gnome-keyring gnome-online-accounts gnome-shell gnumeric google googledrive gphoto2 gpm grammar gstreamer gtk gui heif hfs html hwaccel ico icons iconv icu inkscape inotify introspection ios ipod iso java jpeg jpeg2k kate kpathsea latex lcms libass libdrm libnotify librtmp libsecret libtirpc libv4l lm_sensors luatex lyx lz4 lzma lzo mad math matroska media mediaplayer mms mmx mmxext mng mp3 mp4 mpeg mtp multilib music musicbrainz nautilus ncurses network networkmanager nls nptl offensive ogg opengl openmp opus pam pango pch pcre pdf pdfimport pipelight png policykit postscript ppapi ppds pptx projectm proprietary-codecs pstricks publishers pulseaudio qt5 rar raw rdp readline reiserfs rtf scanner sdl seccomp smp spell split-usr squashfs sse sse2 sse3 sse4_1 ssl ssse3 startup-notification subtitles subversion svg systemd t1lib tcpd theora thesaurus tiff totem tracker truetype udev udisks unicode update_drivedb upnp upnp-av upower usb user-session v4l vaapi vcd vdpau vimeo visio vnc vorbis vpx webp wifi wma wmf wpg wxwidgets x264 x265 xattr xcb xml xmp xpm xps xv xvid xz youtube zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="es es-ES en-US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="nouveau vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Zac Medico gentoo-dev 2019-12-24 22:03:23 UTC
It's probably triggered by this dependency cycle:

> $ emerge -pv libspectre
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies  ... done!
> 
> 
> [nomerge       ] app-text/libspectre-0.2.8::gentoo  USE="-debug -doc -static-libs" 
> [nomerge       ]  app-text/ghostscript-gpl-9.50::gentoo  USE="cups gtk unicode -X -dbus -static-libs -tiff" L10N="-de (-ja) -ko -zh-CN -zh-TW" 
> [ebuild  N     ]   x11-libs/gtk+-3.24.11:3::gentoo  USE="X cups introspection (-aqua) -broadway -cloudprint -colord -examples -gtk-doc -test -vim-syntax -wayland -xinerama" ABI_X86="(64) -32 (-x32)" 20483 KiB
> [ebuild  N     ]    x11-themes/adwaita-icon-theme-3.32.0::gentoo  USE="-branding" 18106 KiB
> [nomerge       ] net-print/cups-filters-1.25.11::gentoo  USE="foomatic postscript zeroconf -dbus -ipp_autosetup -jpeg -ldap -pclm -pdf -perl -png -static-libs -test -tiff" 
> [nomerge       ]  app-text/ghostscript-gpl-9.50::gentoo  USE="cups gtk unicode -X -dbus -static-libs -tiff" L10N="-de (-ja) -ko -zh-CN -zh-TW" 
> [nomerge       ]   net-print/cups-2.2.13::gentoo  USE="acl pam ssl threads zeroconf -X -dbus -debug -java -kerberos -lprng-compat -python (-selinux) -static-libs -systemd -usb -xinetd" ABI_X86="(64) -32 (-x32)" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" 
> [nomerge       ]    net-dns/avahi-0.7-r2::gentoo  USE="dbus gdbm gtk introspection ipv6 nls -autoipd -bookmarks -doc -gtk3 -howl-compat -mdnsresponder-compat -mono -python -qt5 (-selinux) -test" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python2_7" 
> [nomerge       ]     x11-libs/gtk+-2.24.32-r1:2::gentoo  USE="cups introspection (-aqua) -examples -test -vim-syntax -xinerama" ABI_X86="(64) -32 (-x32)" 
> [ebuild  N     ]      x11-themes/gtk-engines-adwaita-3.28::gentoo  ABI_X86="(64) -32 (-x32)" 2885 KiB
> [ebuild  N     ]       x11-libs/gtk+-2.24.32-r1:2::gentoo  USE="cups introspection (-aqua) -examples -test -vim-syntax -xinerama" ABI_X86="(64) -32 (-x32)" 12339 KiB
> [ebuild  N     ]    net-print/cups-filters-1.25.11::gentoo  USE="foomatic postscript zeroconf -dbus -ipp_autosetup -jpeg -ldap -pclm -pdf -perl -png -static-libs -test -tiff" 1449 KiB
> [ebuild  N     ]     net-dns/avahi-0.7-r2::gentoo  USE="dbus gdbm gtk introspection ipv6 nls -autoipd -bookmarks -doc -gtk3 -howl-compat -mdnsresponder-compat -mono -python -qt5 (-selinux) -test" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python2_7" 919 KiB
> [ebuild  N     ] app-text/libspectre-0.2.8::gentoo  USE="-debug -doc -static-libs" 412 KiB
> [ebuild  N     ]  app-text/ghostscript-gpl-9.50::gentoo  USE="cups gtk unicode -X -dbus -static-libs -tiff" L10N="-de (-ja) -ko -zh-CN -zh-TW" 33806 KiB
> [ebuild  N     ]   net-print/cups-2.2.13::gentoo  USE="acl pam ssl threads zeroconf -X -dbus -debug -java -kerberos -lprng-compat -python (-selinux) -static-libs -systemd -usb -xinetd" ABI_X86="(64) -32 (-x32)" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" 10167 KiB
> 
> Total: 9 packages (9 new), Size of downloads: 100561 KiB
> 
>  * Error: circular dependencies:
> 
> (net-dns/avahi-0.7-r2:0/0::gentoo, ebuild scheduled for merge) depends on
>  (x11-libs/gtk+-2.24.32-r1:2/2::gentoo, ebuild scheduled for merge) (buildtime)
>   (net-print/cups-2.2.13:0/0::gentoo, ebuild scheduled for merge) (buildtime_slot_op)
>    (net-dns/avahi-0.7-r2:0/0::gentoo, ebuild scheduled for merge) (buildtime)
> 
> It might be possible to break this cycle
> by applying any of the following changes:
> - net-print/cups-2.2.13 (Change USE: -zeroconf)
> - net-dns/avahi-0.7-r2 (Change USE: -gtk)
> - x11-libs/gtk+-2.24.32-r1 (Change USE: -cups)
Comment 2 Zac Medico gentoo-dev 2019-12-24 22:30:32 UTC
I see that libspectre links against libgs.so, but it doesn't use a slot operator dependency for app-text/ghostscript-gpl. Especially in the presence of dependency cycles, it's better to use a slot operator dependency like app-text/ghostscript-gpl:= so that the dependency will be assigned a higher priority.
Comment 3 Pacho Ramos gentoo-dev 2019-12-25 00:25:42 UTC
(In reply to Zac Medico from comment #1)
> It's probably triggered by this dependency cycle:
> 
> > $ emerge -pv libspectre

I am not sure... I remember that cycle the first time I needed to install the systems, but now, I don't hit the cycle as they are already installed 

(In reply to Zac Medico from comment #2)
> I see that libspectre links against libgs.so, but it doesn't use a slot
> operator dependency for app-text/ghostscript-gpl. Especially in the presence
> of dependency cycles, it's better to use a slot operator dependency like
> app-text/ghostscript-gpl:= so that the dependency will be assigned a higher
> priority.

OK... but that looks more like a workaround, or should we add a RDEPEND like that? I wonder because ghostscript-gpl doesn't even set a subslot, then, I am not sure if all will agree on using := for the reverse deps.

Do you think you will need more information? For now I stopped the update of one of the affected systems to try to reproduce the issue... but if all the needed information is already there... I can manually update ghostscript and continue with the queue ;)

Thanks!
Comment 4 Zac Medico gentoo-dev 2019-12-25 03:55:54 UTC
(In reply to Pacho Ramos from comment #3)
> (In reply to Zac Medico from comment #2)
> > I see that libspectre links against libgs.so, but it doesn't use a slot
> > operator dependency for app-text/ghostscript-gpl. Especially in the presence
> > of dependency cycles, it's better to use a slot operator dependency like
> > app-text/ghostscript-gpl:= so that the dependency will be assigned a higher
> > priority.
> 
> OK... but that looks more like a workaround, or should we add a RDEPEND like
> that? I wonder because ghostscript-gpl doesn't even set a subslot, then, I
> am not sure if all will agree on using := for the reverse deps.

In theory, ghostscript-gpl could bump its subslot at some point in the future, and then it would be advantageous to have the := for the reverse deps. When that happens, if you don't have := for reverse deps then you'll have to rely on @preserved-rebuild to trigger rebuilds.

> Do you think you will need more information? For now I stopped the update of
> one of the affected systems to try to reproduce the issue... but if all the
> needed information is already there... I can manually update ghostscript and
> continue with the queue ;)

The issue is well understood, so please go ahead and finish your updates. I think the patch for bug 690436 will help with this case, since libspectre is not directly involved in the dependency cycle.
Comment 5 Pacho Ramos gentoo-dev 2019-12-25 11:27:35 UTC
OK, thanks a lot :)
Comment 6 Larry the Git Cow gentoo-dev 2019-12-26 23:00:20 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=680276cc4d4faa653203366cbe3c896ac3883cf2

commit 680276cc4d4faa653203366cbe3c896ac3883cf2
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-12-25 08:37:18 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-12-26 22:56:39 +0000

    _serialize_tasks: limit scope of dropped circular dependencies
    
    Ensure that all members of a buildtime dependency cycle are merged
    as a group, such that packages which depend on one or more members
    of the group will only be merged *after* the entire group has been
    merged.
    
    This extends runtime cycle handling to also handle buildtime cycles
    in cases where the buildtime dependencies happen to be satisfied by
    installed packages. In situations when this is necessary, it is
    desirable to rely on the old installed instances of these packages
    as little as possible, since they might have been broken by the
    upgrade of a package that is a member of the dependency cycle.
    Upgrading members of the cycle as a group effectively minimizes
    reliance on the old installed package instances, avoiding some cases
    of bug 199856. For example, it should avoid bug 703676, where
    libspectre reportedly failed to build against an old installed
    instance of ghostscript-gpl.
    
    Bug: https://bugs.gentoo.org/199856
    Bug: https://bugs.gentoo.org/689644
    Bug: https://bugs.gentoo.org/690436
    Bug: https://bugs.gentoo.org/703676
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/depgraph.py                        | 94 +++++++++++++++-----------
 lib/portage/tests/resolver/test_merge_order.py | 25 ++++++-
 2 files changed, 78 insertions(+), 41 deletions(-)
Comment 7 Larry the Git Cow gentoo-dev 2019-12-26 23:01:50 UTC
The bug has been referenced in the following commit(s):

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

commit 1793a98a4543c8ea3b166af4383744ab060f37d5
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-12-26 22:46:29 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-12-26 22:49:36 +0000

    sys-apps/portage: Bump to version 2.3.84
    
     #690436 limit scope of dropped circular dependencies, which should
             solve some cases of bug 199856 such as bug 703676 (also see
             tracker bug 689644)
    
    Bug: https://bugs.gentoo.org/701268
    Bug: https://bugs.gentoo.org/199856
    Bug: https://bugs.gentoo.org/689644
    Bug: https://bugs.gentoo.org/690436
    Bug: https://bugs.gentoo.org/703676
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.84.ebuild | 276 +++++++++++++++++++++++++++++++++
 2 files changed, 277 insertions(+)