gspd fails to install when the X use flag is disabled. This is on a system with gcc6.4. The install works when X is enabled again. However, since the X use flag for pulls in a lot of (26+) packages that are not needed e.g. on embedded systems, it should be possible to disable those with -X. This bug was also reported as bug 631672 and then marked as resolved as a duplicate of bug 589888. However, the fix mentioned in bug 589888 does not seem to apply. # emerge -v gpsd * IMPORTANT: 1 news items need reading for repository 'gentoo'. * Use eselect news read to view new items. These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ~] sci-geosciences/gpsd-3.17:0/23::gentoo USE="bluetooth cxx dbus ncurses python shm sockets udev usb -X* -debug -ipv6 -latency_timing -ntp -qt4 -static {-test}" GPSD_PROTOCOLS="aivdm ashtech earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 navcom ntrip oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tnt tripmate tsip ublox -fury -geostar -nmea0183 -nmea2000 -passthrough" PYTHON_TARGETS="python2_7" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB [...snip...] running install_egg_info Writing /var/tmp/portage/sci-geosciences/gpsd-3.17/image/_python2.7/usr/lib64/python2.7/site-packages/gps-3.17-py2.7.egg-info * python2_7: running distutils-r1_run_phase distutils-r1_python_install_all rm: cannot remove '/var/tmp/portage/sci-geosciences/gpsd-3.17/image/usr/bin/xgps*': No such file or directory * ERROR: sci-geosciences/gpsd-3.17::gentoo failed (install phase): * (no error message) * * Call stack: * ebuild.sh, line 124: Called src_install * environment, line 4215: Called die * The specific snippet of code: * rm "${ED%/}"/usr/bin/xgps* || die; * [...snip...] >>> Failed to emerge sci-geosciences/gpsd-3.17, Log file: >>> '/var/tmp/portage/sci-geosciences/gpsd-3.17/temp/build.log' * Messages for package sci-geosciences/gpsd-3.17: * Package: sci-geosciences/gpsd-3.17 * Repository: gentoo * Maintainer: sci-geosciences@gentoo.org * USE: abi_x86_64 amd64 bluetooth cxx dbus elibc_glibc gpsd_protocols_aivdm gpsd_protocols_ashtech gpsd_protocols_earthmate gpsd_protocols_evermore gpsd_protocols_fv18 gpsd_protocols_garmin gpsd_protocols_garmintxt gpsd_protocols_gpsclock gpsd_protocols_isync gpsd_protocols_itrax gpsd_protocols_mtk3301 gpsd_protocols_navcom gpsd_protocols_ntrip gpsd_protocols_oceanserver gpsd_protocols_oncore gpsd_protocols_rtcm104v2 gpsd_protocols_rtcm104v3 gpsd_protocols_sirf gpsd_protocols_skytraq gpsd_protocols_superstar2 gpsd_protocols_tnt gpsd_protocols_tripmate gpsd_protocols_tsip gpsd_protocols_ublox kernel_linux ncurses python python_targets_python2_7 shm sockets udev usb userland_GNU * FEATURES: preserve-libs sandbox userpriv usersandbox * Applying gpsd-3.17-do_not_rm_library.patch ... * python_export_best() is deprecated. Please use python_setup instead, * combined with python_export if necessary. * python2_7: running distutils-r1_run_phase distutils-r1_python_compile * python2_7: running distutils-r1_run_phase distutils-r1_python_install * python2_7: running distutils-r1_run_phase distutils-r1_python_install_all * ERROR: sci-geosciences/gpsd-3.17::gentoo failed (install phase): * (no error message) * * Call stack: * ebuild.sh, line 124: Called src_install * environment, line 4215: Called die * The specific snippet of code: * rm "${ED%/}"/usr/bin/xgps* || die; * Reproducible: Always Steps to Reproduce: 1. Disable X use flag for gpsd 2. emerge -Dv gspd Actual Results: Failed to emerge sci-geosciences/gpsd-3.17 Expected Results: Successful install # emerge --info Portage 2.3.13 (python 3.5.4-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-6.4.0, glibc-2.25-r9, 4.1.43-gentoo-r1-vs x86_64) ================================================================= System uname: Linux-4.1.43-gentoo-r1-vs-x86_64-Intel-R-_Core-TM-_i5-4670_CPU_@_3.40GHz-with-gentoo-2.4.1 KiB Mem: 16134328 total, 686780 free KiB Swap: 33554428 total, 33459336 free Timestamp of repository gentoo: Thu, 14 Dec 2017 08:30:01 +0000 Head commit of repository gentoo: d32c75f5941615ae6cda7c3efae7f556d618d398 sh bash 4.3_p48-r1 ld GNU ld (Gentoo 2.29.1 p3) 2.29.1 app-shells/bash: 4.3_p48-r1::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.3::gentoo dev-lang/python: 2.7.14-r1::gentoo, 3.4.5-r1::gentoo, 3.5.4-r1::gentoo, 3.6.3-r1::gentoo dev-util/cmake: 3.8.2::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.34.11::gentoo sys-apps/sandbox: 2.10-r4::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15.1-r1::gentoo sys-devel/binutils: 2.29.1-r1::gentoo sys-devel/gcc: 6.4.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.25-r9::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: posativ location: /var/lib/layman/posativ masters: gentoo priority: 50 stuff location: /var/lib/layman/stuff sync-uri: https://github.com/istitov/stuff.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch 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" LANG="nb_NO.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" PKGDIR="/usr/portage/packages" 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="X a52 aac aacs acl acpi activities alsa amd64 amr apache2 apng avx berkdb bluetooth bluez bluray branding bzip2 cairo caps cdda cddb cdio cdr cli consolekit cracklib crypt cups curl cxx dbus declarative dri dts dv dvd dvdr elf emboss encode exif faac fam ffmpeg firefox flac fortran gcj gd gdbm geolocation gif gimp glamor google googledrive gps gsm gtk gudev hdri http hwdb iconv icu idn imlib intl jpeg kde keymap kipi kwallet lame lcms libass libcaca libnotify libvisual lm_sensors lzma lzo mad melt minizip mng modules mp3 mp4 mpeg multilib musepack mysqli mysqlnd natspec ncurses nls nptl ogg opengl openmp opus pam pango pci pcntl pcre pcsc-lite pdf pic pkcs11 plasma png policykit postscript ppds pulseaudio python qml qt3support qt5 qthelp rar raw rdesktop readline rtmp samba schroedinger sdl seccomp semantic-desktop session smart smartcard snmp speex sqlite ssh ssl startup-notification sudo svg taglib tcpd theora threads thumbnail tidy tiff truetype udev udisks unicode upower usb v4l vaapi vorbis wavpack webkit widgets wmf wxwidgets x264 xattr xcb xcomposite xml xmlreader xmlwriter xmp xpm xv xvid xvmc zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="nb nb_NO" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="nb nb_NO" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel i965 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Please *attach* the logfiles next time https://wiki.gentoo.org/wiki/Bugzilla/Bug_report_guide#Report_a_build-time_bug_.28emerge_failed.29
I can confirm the problem with USE='-X' Surrounding it with a file check fixes the problem. I don't know why we would check if the configure honours the disable X. This is valid for >=3.17 including 3.17-r1. I didn't test -9999 if ! use X ; then if [ -f "${ED%/}"/usr/bin/xgps ] ; then rm "${ED%/}"/usr/bin/xgps* || die fi fi Anyway, this got me going...
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d276308209fe1c81e3a3d4fbc05787d02dd2b7d4 commit d276308209fe1c81e3a3d4fbc05787d02dd2b7d4 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2017-12-28 21:17:22 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2017-12-28 21:20:06 +0000 sci-geosciences/gpsd: Fix install with USE=-X,python Thanks-to: Philippe Trottier <tchiwam@gmail.com> Bug: https://bugs.gentoo.org/640998 Package-Manager: Portage-2.3.19, Repoman-2.3.6 sci-geosciences/gpsd/gpsd-3.17-r1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)}