Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Compilation error during emerge
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Trovalds
n00b
n00b


Joined: 16 Jun 2011
Posts: 7
Location: Cuiaba/MT - Brazil

PostPosted: Wed Jan 08, 2014 5:57 am    Post subject: Compilation error during emerge Reply with quote

I don't know if here is the correct place, anyways...

After a fresh install, normally I do an emerge -DuN world. But I'm getting this error during upgrade of openssh:

Code:
 * Package:    net-misc/openssh-6.4_p1-r1
 * Repository: gentoo
 * Maintainer: robbat2@gentoo.org base-system@gentoo.org
 * USE:        abi_x86_32 bindist elibc_glibc hpn kernel_linux pam tcpd userland_GNU x86
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking openssh-6.4p1.tar.gz to /var/tmp/portage/net-misc/openssh-6.4_p1-r1/work
>>> Unpacking openssh-6.3p1-hpnssh14v2.diff.gz to /var/tmp/portage/net-misc/openssh-6.4_p1-r1/work
>>> Source unpacked in /var/tmp/portage/net-misc/openssh-6.4_p1-r1/work
>>> Preparing source in /var/tmp/portage/net-misc/openssh-6.4_p1-r1/work/openssh-6.4p1 ...
 * Applying openssh-5.9_p1-sshd-gssapi-multihomed.patch ...
 [ ok ]
 * Applying openssh-4.7_p1-GSSAPI-dns.patch ...
 [ ok ]
 * Applying openssh-6.3p1-hpnssh14v2.diff ...
 [ ok ]
 * You're missing a /dev/fd symlink to /proc/self/fd.
 * Please fix the symlink and check your boot scripts (udev/etc...).
 * ERROR: net-misc/openssh-6.4_p1-r1::gentoo failed (prepare phase):
 *   /dev/fd is broken
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called src_prepare
 *   environment, line 3768:  Called eautoreconf
 *   environment, line 1018:  Called multijob_init
 *   environment, line 3063:  Called redirect_alloc_fd 'mj_write_fd' '/var/tmp/portage/net-misc/openssh-6.4_p1-r1/temp/multijob.pipe'
 *   environment, line 3540:  Called die
 * The specific snippet of code:
 *           die "/dev/fd is broken";
 *
 * If you need support, post the output of `emerge --info '=net-misc/openssh-6.4_p1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/openssh-6.4_p1-r1::gentoo'`.
/usr/lib/portage/bin/isolated-functions.sh: line 188: wait: `/dev/fd is broken': not a pid or valid job spec
 * The complete build log is located at '/var/tmp/portage/net-misc/openssh-6.4_p1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/openssh-6.4_p1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/openssh-6.4_p1-r1/work/openssh-6.4p1'
 * S: '/var/tmp/portage/net-misc/openssh-6.4_p1-r1/work/openssh-6.4p1'


My emerge --info

Code:
Portage 2.2.7 (hardened/linux/x86, gcc-4.7.3, glibc-2.17, 3.11.7-hardened-r1 i686)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.11.7-hardened-r1-i686-Unknown_CPU_Type-with-gentoo-2.2
KiB Mem:     1032100 total,    888512 free
KiB Swap:     499708 total,    499708 free
Timestamp of tree: Tue, 07 Jan 2014 20:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.3.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-march=i686 -O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=i686 -O2 -pipe"
GENTOO_MIRRORS="http://www.las.ic.unicamp.br/pub/gentoo/"
LANG="pt_BR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.br.gentoo.org/gentoo-portage"
USE="acl berkdb bindist bzip2 cli cracklib crypt cxx dri gdbm hardened iconv ipv6 modules mudflap ncurses nls nptl openmp pam pax_kernel pcre pic readline session ssl tcpd unicode urandom x86 zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel mach64 mga nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware nouveau" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


Any ideas?

Ty for any help.
Back to top
View user's profile Send private message
augury
l33t
l33t


Joined: 22 May 2004
Posts: 718
Location: philadelphia

PostPosted: Wed Jan 08, 2014 8:09 am    Post subject: Reply with quote

I don't know what /dev/fd is right off hand.
Code:
102:54:31 roo /RamTemp #  l /dev/fd
469 lrwxrwxrwx 1 root 13 Jan  3 17:43 /dev/fd -> /proc/self/fd/

Code:
103:05:02 roo /RamTemp # l /proc/self/fd/
28262 lrwx------ 1 root 64 Jan  8 03:06 0 -> /dev/pts/2
28263 lrwx------ 1 root 64 Jan  8 03:06 1 -> /dev/pts/2
28264 lrwx------ 1 root 64 Jan  8 03:06 2 -> /dev/pts/2
28265 lr-x------ 1 root 64 Jan  8 03:06 3 -> /proc/25376/fd/


Being a pointer to a pts -- thats like a kernel config *thing*. (help me out ppl)

Check for /dev/pts/

Code:
ls /dev/pts


You probably have one or your chrooted in the wrong place -- if it is what I think it is. Maybe emerge sysvinit.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9347

PostPosted: Thu Jan 09, 2014 2:43 am    Post subject: Reply with quote

augury wrote:
I don't know what /dev/fd is right off hand.
Code:
102:54:31 roo /RamTemp #  l /dev/fd
469 lrwxrwxrwx 1 root 13 Jan  3 17:43 /dev/fd -> /proc/self/fd/

Code:
103:05:02 roo /RamTemp # l /proc/self/fd/
28262 lrwx------ 1 root 64 Jan  8 03:06 0 -> /dev/pts/2
28263 lrwx------ 1 root 64 Jan  8 03:06 1 -> /dev/pts/2
28264 lrwx------ 1 root 64 Jan  8 03:06 2 -> /dev/pts/2
28265 lr-x------ 1 root 64 Jan  8 03:06 3 -> /proc/25376/fd/


Being a pointer to a pts -- thats like a kernel config *thing*. (help me out ppl)
I do not understand what you are trying to say here, but I think you are probably wrong. Nothing shown here indicates that a kernel configuration problem is the likely explanation.

OP: please post the output of ls -ld /dev /dev/pts /dev/fd /proc /proc/self ; cat -n /proc/mounts ; zgrep -e DEVTMPFS /proc/config.gz. Also, please indicate how your system is supposed to manage /dev. For most people, the answer is udev, but you might have done something special. If I had to guess, I would say that your /dev is either static or that the intended device manager for it is not functioning properly. In either case, /dev/fd is supposed to be a symbolic link to /proc/self/fd, so that the path /dev/fd/N can be given to instruct the receiving process to open fd N instead of opening a regular file.
Back to top
View user's profile Send private message
Tsubashi
n00b
n00b


Joined: 16 Jan 2014
Posts: 2

PostPosted: Thu Jan 16, 2014 6:53 pm    Post subject: Reply with quote

Not sure about the OP, but I have the same issue.

Quote:
please post the output of ls -ld /dev /dev/pts /dev/fd /proc /proc/self ; cat -n /proc/mounts ; zgrep -e DEVTMPFS /proc/config.gz

Code:

ls: cannot access /dev/fd: No such file or directory
drwxr-xr-x   9 root root 3960 Jan 16 11:52 /dev
drwxr-xr-x   2 root root    0 Jan 16 11:33 /dev/pts
dr-xr-xr-x 131 root root    0 Jan 16 11:33 /proc
lrwxrwxrwx   1 root root    0 Jan 16 11:33 /proc/self -> 24910
     1  rootfs / rootfs rw 0 0
     2  proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
     3  udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=2044562,mode=755 0 0
     4  devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
     5  sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
     6  /dev/sde4 / ext4 rw,noatime,data=ordered 0 0
     7  tmpfs /run tmpfs rw,nosuid,nodev,relatime,size=1636124k,mode=755 0 0
     8  mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
     9  shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
    10  configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
    11  cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0
    12  fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
    13  openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc 0 0
    14  cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
    15  cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
CONFIG_DEVTMPFS=y
# CONFIG_DEVTMPFS_MOUNT is not set



Quote:
Also, please indicate how your system is supposed to manage /dev


udev.

I can get portage to run without issues by manually creating the symlink (/dev/fd -> /proc/self/fd), but that does not persist between reboots.
_________________
--
- TsuTsu
Back to top
View user's profile Send private message
paradigm-X
Apprentice
Apprentice


Joined: 19 Sep 2013
Posts: 168

PostPosted: Sun Jan 19, 2014 4:47 am    Post subject: Reply with quote

> "I can get portage to run without issues by manually creating the symlink (/dev/fd -> /proc/self/fd), but that does not persist between reboots."

Unfortunately, I too now have this problem on a newly-built KVM/Qemu guest running the same kernel as yours, namely, Linux-3.11.7-hardened-r1, except that I have it on a 64-bit processor, not i686 as yours is. I am wondering whether there could be a little issue with that stage3 file? I followed the handbook, I believe, precisely, and I used the "install-amd64-minimal-20131226.iso", as usual.

There seems to be something wrong with getting the symlink built as it should be. In my case, even after I created the /dev/fd folder, since it did not exist already, and I then created the symlink, I still could not use emerge. Before it was telling me that the symlink was missing, but afterwards, once I created the symlink, it simply said "/dev/fd is broken". :( Did you also have to create the '/dev/fd' folder before creating the symlink? I just did this procedure:

mkdir /dev/fd
ln -s /proc/self/fd /dev/fd

I really do not understand much of the following discussion, which appears to be among developers, but it does seem to be especially relevant to this issue:

https://bugs.alpinelinux.org/issues/1465

I am pretty much out of clues how to fix it, and for me it seems like the only thing left to do is to redo the entire build from scratch, not knowing where along the way it went bad. I hope that it gets fixed at that point. I can reuse the /usr/src/linux/.config, and that should save quite a bit of time. Maybe a different but close kernel would help if need be?
Back to top
View user's profile Send private message
paradigm-X
Apprentice
Apprentice


Joined: 19 Sep 2013
Posts: 168

PostPosted: Mon Jan 20, 2014 6:39 pm    Post subject: Reply with quote

> "I am pretty much out of clues how to fix it, and for me it seems like the only thing left to do is to redo the entire build from scratch, not knowing where along the way it went bad."

This problem has occured now twice in a row: firstly while using kernel-genkernel-x86_64-3.11.7-hardened-r1, and secondly while using kernel-genkernel-x86_64-3.12.6-hardened-r4. I did not use the same '.config' file for both installations. After installation, everything appears normal, with good network connectivity, etc., except that I cannot use emerge.

I have exactly the same problem even after completely redoing the installation with a different kernel. I even used the latest, greatest 'systemrescuecd' instead of the default install-amd64-minimal-20131226.iso as I used last time. This time I changed the kernel to what was right then the latest available one for "hardened-sources". I followed the exact same installation routine, i.e., with the Gentoo Handbook procedure, as I always have done successfully prior to the last two instances with this new problem.

After following the installation procedure, I cannot emerge now, and I get an error saying that the symlink from /dev/fd to /proc/self/fd is missing and /dev/fd is broken. Because my routine for installation has not changed, I believe that this problem is occuring because something in these Gentoo installation files has a bug. If it is not this, then, it seems to me, it must be the case that my procedure followed for installation in the past, which always worked without failure, must have been flawed in some subtle way without it showing up or having any effect until now as something in the Gentoo files must have changed now to make it significant.

If someone has suggestions as to what could be wrong and how to fix it, I would appreciate hearing them. Here are the troubleshooting files recommended to post :

"build.log"

* Package: net-analyzer/iftop-1.0_pre2
* Repository: gentoo
* Maintainer: netmon@gentoo.org
* USE: amd64 elibc_glibc kernel_linux userland_GNU
* FEATURES: preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking iftop-1.0pre2.tar.gz to /var/tmp/portage/net-analyzer/iftop-1.0_pre2/work
>>> Source unpacked in /var/tmp/portage/net-analyzer/iftop-1.0_pre2/work
>>> Preparing source in /var/tmp/portage/net-analyzer/iftop-1.0_pre2/work/iftop-1.0pre2 ...
* Applying iftop-1.0_pre2-tinfo.patch ... [ ok ]
* Applying iftop-1.0_pre2-pthread.patch ... [ ok ]
* You're missing a /dev/fd symlink to /proc/self/fd.
* Please fix the symlink and check your boot scripts (udev/etc...).
* ERROR: net-analyzer/iftop-1.0_pre2::gentoo failed (prepare phase):
* /dev/fd is broken
*
* Call stack:
* ebuild.sh, line 93: Called src_prepare
* environment, line 2637: Called eautoreconf
* environment, line 764: Called multijob_init
* environment, line 2265: Called redirect_alloc_fd 'mj_write_fd' '/var/tmp/portage/net-analyzer/iftop-1.0_pre2/temp/multijob.pipe'
* environment, line 2601: Called die
* The specific snippet of code:
* die "/dev/fd is broken";
*
* If you need support, post the output of `emerge --info '=net-analyzer/iftop-1.0_pre2::gentoo'`,
* the complete build log and the output of `emerge -pqv '=net-analyzer/iftop-1.0_pre2::gentoo'`.
/usr/lib64/portage/bin/isolated-functions.sh: line 188: wait: `/dev/fd is broken': not a pid or valid job spec
* The complete build log is located at '/var/tmp/portage/net-analyzer/iftop-1.0_pre2/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/net-analyzer/iftop-1.0_pre2/temp/environment'.
* Working directory: '/var/tmp/portage/net-analyzer/iftop-1.0_pre2/work/iftop-1.0pre2'
* S: '/var/tmp/portage/net-analyzer/iftop-1.0_pre2/work/iftop-1.0pre2'
---------------------------------
"info.txt"

Portage 2.2.7 (hardened/linux/amd64, gcc-4.7.3, glibc-2.16.0, 3.12.6-hardened-r4 x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-3.12.6-hardened-r4-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7700_@_2.40GHz-with-gentoo-2.2
KiB Mem: 3080556 total, 2765116 free
KiB Swap: 4194300 total, 4194300 free
Timestamp of tree: Sun, 19 Jan 2014 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash: 4.2_p45
dev-lang/python: 2.7.5-r3, 3.3.2-r2
dev-util/pkgconfig: 0.28
sys-apps/baselayout: 2.2
sys-apps/openrc: 0.12.4
sys-apps/sandbox: 2.6-r1
sys-devel/autoconf: 2.69
sys-devel/automake: 1.13.4
sys-devel/binutils: 2.23.2
sys-devel/gcc: 4.7.3-r1
sys-devel/gcc-config: 1.7.3
sys-devel/libtool: 2.4.2
sys-devel/make: 3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc: 2.16.0
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync 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://gentoo.cs.uni.edu/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync6.us.gentoo.org/gentoo-portage"
USE="X aac aalib acl acpi alsa amd64 apm audiofile bash-completion berkdb bindist bzip2 caps cdda cdr cli cracklib crypt css curl curlwrappers cxx dbus dri dts dv dvd dvdr encode exif fam fbcon ffmpeg filecaps flac fontconfig ftp gdbm git gnutls gphoto2 gtk gzip hardened hddtemp hscolour iconv icu ieee1394 imagemagick inotify introspection ipod ipv6 jabber java javascript jpeg justify lame libnotify libsamplerate libwww lm_sensors mad matroska mime mmx modules mp3 mp4 mpeg mudflap multilib ncurses netboot nls nptl opengl openmp pam pax_kernel pcmcia pcre pda perl png portaudio postscript ppds pulseaudio python raw rdesktop readline samba sasl scanner sdl session sharedmem smp sockets socks5 sound sqlite3 sse sse2 ssl startup-notification svg syslog tcpd threads truetype udev unicode upnp urandom usb v4l vcd vdpau vnc wifi wmf x264 xattr xcomposite xface xinerama xscreensaver xv xvid zeroconf 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
Package Settings
=================================================================

net-analyzer/iftop-1.0_pre2 was built with the following:
USE=""
----------------------------
"pqv.txt"

[ebuild R ] net-analyzer/iftop-1.0_pre2

* IMPORTANT: 8 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.

---------------------------
"environment"

declare -x ABI="amd64"
declare -x ABI_X86="64"
declare -a ALL_AUTOTOOLS_MACROS='([0]="AC_PROG_LIBTOOL" [1]="AM_PROG_LIBTOOL" [2]="LT_INIT" [3]="AC_CONFIG_HEADERS" [4]="AC_CONFIG_HEADER" [5]="AM_CONFIG_HEADERS" [6]="AM_CONFIG_HEADER" [7]="AC_CONFIG_SUBDIRS" [8]="AC_CONFIG_AUX_DIR" [9]="AC_CONFIG_MACRO_DIR" [10]="AM_INIT_AUTOMAKE" [11]="AM_GLIB_GNU_GETTEXT" [12]="AM_GNU_GETTEXT_VERSION" [13]="AC_PROG_INTLTOOL" [14]="IT_PROG_INTLTOOL" [15]="GTK_DOC_CHECK" [16]="GNOME_DOC_INIT")'
declare -x 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"
declare -x 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"
declare -x ARCH="amd64"
declare -- AT_M4DIR=""
declare -- AT_SYS_M4DIR=""
declare -- AUTOTOOLS_AUTO_DEPEND="yes"
declare -- AUTOTOOLS_DEPEND="!<sys-devel/gettext-0.18.1.1-r3
|| ( >=sys-devel/automake-1.13:1.13 >=sys-devel/automake-1.14:1.14 )
>=sys-devel/autoconf-2.68
sys-devel/libtool"
declare -x BOOTSTRAP_USE="cxx unicode python_targets_python3_3 python_targets_python2_7 multilib hardened pax_kernel pic -jit -orc"
declare -x CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author"
declare -x CAMERAS="ptp2"
declare -x CBUILD="x86_64-pc-linux-gnu"
declare -x CFLAGS="-march=core2 -O2 -pipe"
declare -x CFLAGS_amd64="-m64"
declare -x CFLAGS_default
declare -x CFLAGS_x32="-mx32"
declare -x CFLAGS_x86="-m32"
declare -x CHOST="x86_64-pc-linux-gnu"
declare -x CHOST_amd64="x86_64-pc-linux-gnu"
declare -x CHOST_default="x86_64-pc-linux-gnu"
declare -x CHOST_x32="x86_64-pc-linux-gnux32"
declare -x CHOST_x86="i686-pc-linux-gnu"
declare -x COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
declare -x CTARGET_default="x86_64-pc-linux-gnu"
declare -x CXXFLAGS="-march=core2 -O2 -pipe"
declare -x DEFAULT_ABI="amd64"
declare -x DEFINED_PHASES=" install prepare"
declare DEPEND="
net-libs/libpcap
sys-libs/ncurses !<sys-devel/gettext-0.18.1.1-r3
|| ( >=sys-devel/automake-1.13:1.13 >=sys-devel/automake-1.14:1.14 )
>=sys-devel/autoconf-2.68
sys-devel/libtool"
declare DESCRIPTION="display bandwidth usage on an interface"
declare -x DESTTREE="/usr"
declare -x DIROPTIONS="-m0755"
declare -x EAPI="5"
declare -x ELIBC="glibc"
declare -- EPATCH_COMMON_OPTS="-g0 -E --no-backup-if-mismatch"
declare -- EPATCH_EXCLUDE=""
declare -- EPATCH_FORCE="no"
declare -- EPATCH_MULTI_MSG="Applying various patches (bugfixes/updates) ..."
declare -- EPATCH_OPTS=""
declare -- EPATCH_SINGLE_MSG=""
declare -- EPATCH_SOURCE="/var/tmp/portage/net-analyzer/iftop-1.0_pre2/work/patch"
declare -- EPATCH_SUFFIX="patch.bz2"
declare -x EXEOPTIONS="-m0755"
declare -x FCFLAGS="-O2 -pipe"
declare -x FETCHCOMMAND_SSH="bash -c \"x=\\\${2#ssh://} ; host=\\\${x%%/*} ; port=\\\${host##*:} ; host=\\\${host%:*} ; [[ \\\${host} = \\\${port} ]] && port=22 ; exec rsync --rsh=\\\"ssh -p\\\${port} \\\${3}\\\" -avP \\\"\\\${host}:/\\\${x#*/}\\\" \\\"\\\$1\\\"\" rsync \"\${DISTDIR}/\${FILE}\" \"\${URI}\" \"\${PORTAGE_SSH_OPTS}\""
declare -x FFLAGS="-O2 -pipe"
declare -x GCC_SPECS=""
declare -x GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx"
declare -x GRUB_PLATFORMS=""
declare HDEPEND=""
declare HOMEPAGE="http://www.ex-parrot.com/~pdw/iftop/"
declare -x HUSHLOGIN="FALSE"
declare -x INHERITED=" multilib toolchain-funcs libtool multiprocessing autotools eutils"
declare -x INPUT_DEVICES="keyboard mouse evdev"
declare -x INSDESTTREE=""
declare -x INSOPTIONS="-m0644"
declare IUSE=""
declare -x IUSE_EFFECTIVE="alpha amd64 amd64-fbsd amd64-linux arm arm-linux arm64 elibc_AIX elibc_Cygwin elibc_Darwin elibc_FreeBSD elibc_HPUX elibc_Interix elibc_NetBSD elibc_OpenBSD elibc_SunOS elibc_Winnt elibc_glibc elibc_mintlib elibc_musl elibc_uclibc hppa hppa-hpux ia64 ia64-hpux ia64-linux kernel_AIX kernel_Cygwin kernel_Darwin kernel_FreeBSD kernel_HPUX kernel_Interix kernel_NetBSD kernel_OpenBSD kernel_SunOS kernel_Winnt kernel_freemint kernel_linux m68k m68k-mint mips ppc ppc-aix ppc-macos ppc-openbsd ppc64 ppc64-linux prefix s390 sh sparc sparc-fbsd sparc-solaris sparc64-freebsd sparc64-solaris userland_BSD userland_GNU x64-freebsd x64-macos x64-openbsd x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-openbsd x86-solaris x86-winnt"
declare -x IUSE_IMPLICIT="prefix"
declare -x KERNEL="linux"
declare -x KERNEL_ABI="amd64"
declare -x KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
declare -x LANG="en_US.utf8"
declare -x LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
declare -x LC_MESSAGES="C"
declare -x LDFLAGS="-Wl,-O1 -Wl,--as-needed"
declare -x LDFLAGS_amd64="-m elf_x86_64"
declare -x LDFLAGS_default
declare -x LDFLAGS_x32="-m elf32_x86_64"
declare -x LDFLAGS_x86="-m elf_i386"
declare -x LIBDIR_amd64="lib64"
declare -x LIBDIR_amd64_fbsd="lib64"
declare -x LIBDIR_arm="lib"
declare -x LIBDIR_arm64="lib64"
declare -x LIBDIR_default="lib"
declare -x LIBDIR_n32="lib32"
declare -x LIBDIR_n64="lib64"
declare -x LIBDIR_o32="lib"
declare -x LIBDIR_ppc="lib32"
declare -x LIBDIR_ppc64="lib64"
declare -x LIBDIR_s390="lib32"
declare -x LIBDIR_s390x="lib64"
declare -x LIBDIR_sparc32="lib32"
declare -x LIBDIR_sparc64="lib64"
declare -x LIBDIR_x32="libx32"
declare -x LIBDIR_x86="lib32"
declare -x LIBDIR_x86_fbsd="lib32"
declare -x LIBOPTIONS="-m0644"
declare -x LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
declare -x LICENSE="GPL-2"
declare -x MAIL="/var/mail/root"
declare -x MAKEOPTS="-j2"
declare -x MULTILIB_ABIS="amd64 x86"
declare -x MULTILIB_STRICT_DENY="64-bit.*shared object"
declare -x MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
declare -x MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|udev|systemd|clang|python-exec)"
declare -x MULTIOSDIRS="../lib64:../lib32"
declare -x NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
declare -x OFFICE_IMPLEMENTATION="libreoffice"
declare -x PATH="/usr/lib64/portage/bin/ebuild-helpers/xattr:/usr/lib64/portage/bin/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3"
declare PDEPEND=""
declare -x PHP_TARGETS="php5-5"
declare -a PORTAGE_DOCOMPRESS='([0]="/usr/share/doc" [1]="/usr/share/info" [2]="/usr/share/man")'
declare -a PORTAGE_DOCOMPRESS_SKIP='([0]="/usr/share/doc/iftop-1.0_pre2/html")'
declare -x PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
declare -x PROPERTIES=""
declare -x PROVIDE=""
declare -x PYTHONDONTWRITEBYTECODE="1"
declare -x PYTHON_SINGLE_TARGET="python2_7"
declare -x PYTHON_TARGETS="python2_7 python3_3"
declare RDEPEND=""
declare REPOSITORY
declare REQUIRED_USE=""
declare -x RESTRICT=""
declare -x RESUMECOMMAND_SSH="bash -c \"x=\\\${2#ssh://} ; host=\\\${x%%/*} ; port=\\\${host##*:} ; host=\\\${host%:*} ; [[ \\\${host} = \\\${port} ]] && port=22 ; exec rsync --rsh=\\\"ssh -p\\\${port} \\\${3}\\\" -avP \\\"\\\${host}:/\\\${x#*/}\\\" \\\"\\\$1\\\"\" rsync \"\${DISTDIR}/\${FILE}\" \"\${URI}\" \"\${PORTAGE_SSH_OPTS}\""
declare -x RUBY_TARGETS="ruby19 ruby18"
declare -x S="/var/tmp/portage/net-analyzer/iftop-1.0_pre2/work/iftop-1.0pre2"
declare -x SANDBOX_DEBUG="0"
declare -x SANDBOX_DENY=""
declare -x SANDBOX_PID="3936"
declare -x SANDBOX_PREDICT="/var/tmp/portage/net-analyzer/iftop-1.0_pre2/homedir:/dev/crypto"
declare -x SANDBOX_READ="/:/var/tmp"
declare -x SANDBOX_VERBOSE="1"
declare -x SANDBOX_WRITE=":/dev/console:/dev/fd:/dev/full:/dev/null:/dev/pts/:/dev/pty:/dev/shm:/dev/tts:/dev/tty:/dev/vc/:/dev/zero:/proc/self/fd:/tmp/:/usr/lib32/cf:/usr/lib32/conftest:/usr/lib64/cf:/usr/lib64/conftest:/usr/lib/cf:/usr/lib/conftest:/usr/tmp/cf:/usr/tmp/conftest:/var/tmp:/var/tmp/:/var/tmp/portage/net-analyzer/iftop-1.0_pre2/homedir/.bash_history"
declare -x SHELL="/bin/bash"
declare -x SLOT="0"
declare SRC_URI="http://www.ex-parrot.com/~pdw/iftop/download/iftop-1.0pre2.tar.gz"
declare -x SYMLINK_LIB="yes"
declare -x USE="amd64 elibc_glibc kernel_linux userland_GNU"
declare -x USERLAND="GNU"
declare -x USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
declare -x USE_EXPAND_UNPREFIXED="ARCH"
declare -x USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm-linux arm64 hppa hppa-hpux ia64 ia64-hpux ia64-linux m68k m68k-mint mips ppc ppc64 ppc64-linux ppc-aix ppc-macos ppc-openbsd s390 sh sparc sparc64-freebsd sparc64-solaris sparc-fbsd sparc-solaris x64-freebsd x64-macos x64-openbsd x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-openbsd x86-solaris x86-winnt"
declare -x USE_EXPAND_VALUES_ELIBC="AIX Cygwin Darwin FreeBSD glibc HPUX Interix mintlib musl NetBSD OpenBSD SunOS uclibc Winnt"
declare -x USE_EXPAND_VALUES_KERNEL="AIX Cygwin Darwin FreeBSD freemint HPUX Interix linux NetBSD OpenBSD SunOS Winnt"
declare -x USE_EXPAND_VALUES_USERLAND="BSD GNU"
declare -x VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware voodoo"
declare -x WANT_AUTOCONF="latest"
declare -x WANT_AUTOMAKE="latest"
declare -x WANT_LIBTOOL="latest"
declare -x 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"
declare -x _E_DOCDESTTREE_=""
declare -x _E_EXEDESTTREE_=""
declare -a _LATEST_AUTOMAKE='([0]="1.13:1.13" [1]="1.14:1.14")'
declare -- _LIBTOOL_ECLASSDIR_LOCAL="/usr/portage/eclass"
declare -- ___ECLASS_ONCE_AUTOTOOLS="recur -_+^+_- spank"
declare -- ___ECLASS_ONCE_EUTILS="recur -_+^+_- spank"
declare -- ___ECLASS_ONCE_LIBTOOL="recur -_+^+_- spank"
declare -- ___ECLASS_ONCE_MULTILIB="recur -_+^+_- spank"
declare -- ___ECLASS_ONCE_MULTIPROCESSING="recur -_+^+_- spank"
declare -- ___ECLASS_ONCE_TOOLCHAIN_FUNCS="recur -_+^+_- spank"
declare -- _libtool_atom="sys-devel/libtool"
declare -- phase_func
ELT_libtool_version ()
{
( unset VERSION;
eval $(grep -e '^[[:space:]]*VERSION=' "$1");
echo "${VERSION:-0}" )
}
ELT_try_and_apply_patch ()
{
local ret=0;
local file=$1;
local patch=$2;
local src=$3;
local disp="${src} patch";
local log="${T}/elibtool.log";
if [[ -z ${__ELT_NOTED_TMP} ]]; then
__ELT_NOTED_TMP=true;
printf 'temp patch: %s\n' "${patch}" > "${log}";
fi;
printf '\nTrying %s\n' "${disp}" >> "${log}";
if [[ ! -e ${file} ]]; then
echo "File not found: ${file}" >> "${log}";
return 1;
fi;
local perms="$(find ${file} -maxdepth 0 -printf '%m')";
if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1; then
einfo " Applying ${disp} ...";
patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> "${log}" 2>&1;
ret=$?;
export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${src}";
else
ret=1;
fi;
chmod "${perms}" "${file}";
return "${ret}"
}
ELT_walk_patches ()
{
local patch tmp;
local ret=1;
local file=$1;
local patch_set=$2;
local patch_dir="$(elt_patch_dir)/${patch_set}";
local rem_int_dep=$3;
[[ -z ${patch_set} ]] && return 1;
[[ ! -d ${patch_dir} ]] && return 1;
local sed_args=(-e "s:@GENTOO_LIBDIR@:$(get_libdir):g");
if [[ -n ${rem_int_dep} ]]; then
sed_args+=(-e "s|@REM_INT_DEP@|${rem_int_dep}|g");
fi;
pushd "$(elt_patch_dir)" > /dev/null || die;
for patch in $(find "${patch_set}" -maxdepth 1 -type f | LC_ALL=C sort -r);
do
tmp="${T}/libtool-elt.patch";
sed "${sed_args[@]}" "${patch}" > "${tmp}" || die;
if ELT_try_and_apply_patch "${file}" "${tmp}" "${patch}"; then
ret=0;
break;
fi;
done;
popd > /dev/null;
return ${ret}
}
VER_major ()
{
[[ -z $1 ]] && return 1;
local VER=$@;
echo "${VER%%[^[:digit:]]*}"
}
VER_micro ()
{
[[ -z $1 ]] && return 1;
local VER=$@;
VER=${VER#*.*.};
echo "${VER%%[^[:digit:]]*}"
}
VER_minor ()
{
[[ -z $1 ]] && return 1;
local VER=$@;
VER=${VER#*.};
echo "${VER%%[^[:digit:]]*}"
}
VER_to_int ()
{
[[ -z $1 ]] && return 1;
local VER_MAJOR=$(VER_major "$1");
local VER_MINOR=$(VER_minor "$1");
local VER_MICRO=$(VER_micro "$1");
local VER_int=$(( VER_MAJOR * 65536 + VER_MINOR * 256 + VER_MICRO ));
if [[ ${VER_int} -ge 65536 ]]; then
echo "${VER_int}";
return 0;
fi;
echo 1;
return 1
}
_at_uses_autoheader ()
{
_at_uses_pkg A{C,M}_CONFIG_HEADER{S,}
}
_at_uses_automake ()
{
_at_uses_pkg AM_INIT_AUTOMAKE
}
_at_uses_gettext ()
{
_at_uses_pkg AM_GNU_GETTEXT_VERSION
}
_at_uses_glibgettext ()
{
_at_uses_pkg AM_GLIB_GNU_GETTEXT
}
_at_uses_gnomedoc ()
{
_at_uses_pkg GNOME_DOC_INIT
}
_at_uses_gtkdoc ()
{
_at_uses_pkg GTK_DOC_CHECK
}
_at_uses_intltool ()
{
_at_uses_pkg {AC,IT}_PROG_INTLTOOL
}
_at_uses_libtool ()
{
_at_uses_pkg A{C,M}_PROG_LIBTOOL LT_INIT
}
_at_uses_pkg ()
{
if [[ -n $(autotools_check_macro "$@") ]]; then
return 0;
else
local macro args=();
for macro in "$@";
do
args+=(-e "^[[:space:]]*${macro}\>");
done;
egrep -q "${args[@]}" configure.??;
fi
}
_autotools_m4dir_include ()
{
local x include_opts flag;
[[ ${WANT_AUTOCONF} == "2.1" ]] && flag="l" || flag="I";
for x in "$@";
do
case ${x} in
-${flag})

;;
*)
[[ ! -d ${x} ]] && ewarn "autotools.eclass: '${x}' does not exist";
include_opts+=" -${flag} ${x}"
;;
esac;
done;
echo ${include_opts}
}
_elibtoolize ()
{
local LIBTOOLIZE=${LIBTOOLIZE:-$(type -P glibtoolize > /dev/null && echo glibtoolize || echo libtoolize)};
[[ -f GNUmakefile.am || -f Makefile.am ]] && set -- "$@" --automake;
if [[ $1 == "--install" ]]; then
${LIBTOOLIZE} -n --install &>/dev/null || shift;
fi;
autotools_run_tool ${LIBTOOLIZE} "$@" ${opts}
}
_eutils_eprefix_init ()
{
has "${EAPI:-0}" 0 1 2 && : ${ED:=${D}} ${EPREFIX:=} ${EROOT:=${ROOT}}
}
_gcc-install-dir ()
{
echo "$(LC_ALL=C $(tc-getCC) -print-search-dirs 2> /dev/null | awk '$1=="install:" {print $2}')"
}
_gcc-specs-directive_raw ()
{
local cc=$(tc-getCC);
local specfiles=$(LC_ALL=C ${cc} -v 2>&1 | awk '$1=="Reading" {print $NF}');
${cc} -dumpspecs 2> /dev/null | cat - ${specfiles} | awk -v directive=$1 'BEGIN { pspec=""; spec=""; outside=1 }
$1=="*"directive":" { pspec=spec; spec=""; outside=0; next }
outside || NF==0 || ( substr($1,1,1)=="*" && substr($1,length($1),1)==":" ) { outside=1; next }
spec=="" && substr($0,1,1)=="+" { spec=pspec " " substr($0,2); next }
{ spec=spec $0 }
END { print spec }';
return 0
}
_gcc-specs-exists ()
{
[[ -f $(_gcc-install-dir)/$1 ]]
}
_gcc_fullversion ()
{
local ver="$1";
shift;
set -- `$(tc-getCPP "$@") -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__"`;
eval echo "$ver"
}
_iconins ()
{
( local funcname=$1;
shift;
local size dir;
local context=apps;
local theme=hicolor;
while [[ $# -gt 0 ]]; do
case $1 in
-s | --size)
if [[ ${2%%x*}x${2%%x*} == "$2" ]]; then
size=${2%%x*};
else
size=${2};
fi;
case ${size} in
16 | 22 | 24 | 32 | 36 | 48 | 64 | 72 | 96 | 128 | 192 | 256)
size=${size}x${size}
;;
scalable)

;;
*)
eerror "${size} is an unsupported icon size!";
exit 1
;;
esac;
shift 2
;;
-t | --theme)
theme=${2};
shift 2
;;
-c | --context)
context=${2};
shift 2
;;
*)
if [[ -z ${size} ]]; then
insinto /usr/share/pixmaps;
else
insinto /usr/share/icons/${theme}/${size}/${context};
fi;
if [[ ${funcname} == doicon ]]; then
if [[ -f $1 ]]; then
doins "${1}";
else
if [[ -d $1 ]]; then
shopt -s nullglob;
doins "${1}"/*.{png,svg};
shopt -u nullglob;
else
eerror "${1} is not a valid file/directory!";
exit 1;
fi;
fi;
else
break;
fi;
shift 1
;;
esac;
done;
if [[ ${funcname} == newicon ]]; then
newins "$@";
fi ) || die
}
_multijob_fork ()
{
[[ $# -eq 1 ]] || die "incorrect number of arguments";
local ret=0;
[[ $1 == "post" ]] && : $(( ++mj_num_jobs ));
if [[ ${mj_num_jobs} -ge ${mj_max_jobs} ]]; then
multijob_finish_one;
ret=$?;
fi;
[[ $1 == "pre" ]] && : $(( ++mj_num_jobs ));
return ${ret}
}
_tc-getPROG ()
{
local tuple=$1;
local v var vars=$2;
local prog=$3;
var=${vars%% *};
for v in ${vars};
do
if [[ -n ${!v} ]]; then
export ${var}="${!v}";
echo "${!v}";
return 0;
fi;
done;
local search=;
[[ -n $4 ]] && search=$(type -p "$4-${prog}");
[[ -z ${search} && -n ${!tuple} ]] && search=$(type -p "${!tuple}-${prog}");
[[ -n ${search} ]] && prog=${search##*/};
export ${var}=${prog};
echo "${!var}"
}
autotools_check_macro ()
{
[[ -f configure.ac || -f configure.in ]] || return 0;
local trace_file=".__autoconf_trace_data";
if [[ ! -e ${trace_file} ]] || [[ ! aclocal.m4 -ot ${trace_file} ]]; then
WANT_AUTOCONF="2.5" autoconf $(autotools_m4dir_include) ${ALL_AUTOTOOLS_MACROS[@]/#/--trace=} > ${trace_file} 2> /dev/null;
fi;
local macro args=();
for macro in "$@";
do
has ${macro} ${ALL_AUTOTOOLS_MACROS[@]} || die "internal error: add ${macro} to ALL_AUTOTOOLS_MACROS";
args+=(-e ":${macro}:");
done;
grep "${args[@]}" ${trace_file}
}
autotools_check_macro_val ()
{
local macro scan_out;
for macro in "$@";
do
autotools_check_macro "${macro}" | gawk -v macro="${macro}" '($0 !~ /^[[:space:]]*(#|dnl)/) {
if (match($0, macro ":(.*)$", res))
print res[1]
}' | uniq;
done;
return 0
}
autotools_env_setup ()
{
if [[ ${WANT_AUTOMAKE} == "latest" ]]; then
local pv;
for pv in ${_LATEST_AUTOMAKE[@]/#*:};
do
ROOT=/ has_version "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}";
done;
[[ ${WANT_AUTOMAKE} == "latest" ]] && die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE}";
fi;
[[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.5
}
autotools_m4dir_include ()
{
_autotools_m4dir_include ${AT_M4DIR}
}
autotools_m4sysdir_include ()
{
_autotools_m4dir_include $(eval echo ${AT_SYS_M4DIR})
}
autotools_run_tool ()
{
local autofail=true m4flags=false missing_ok=false;
while [[ -n $1 ]]; do
case $1 in
--at-no-fail)
autofail=false
;;
--at-m4flags)
m4flags=true
;;
--at-missing)
missing_ok=true
;;
*)
break
;;
esac;
shift;
done;
if [[ ${EBUILD_PHASE} != "unpack" && ${EBUILD_PHASE} != "prepare" ]]; then
ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase";
fi;
if ${missing_ok} && ! type -P ${1} > /dev/null; then
einfo "Skipping '$*' due $1 not installed";
return 0;
fi;
autotools_env_setup;
local STDERR_TARGET="${T}/$1.out";
if [[ -e ${STDERR_TARGET} ]]; then
local i=1;
while :; do
STDERR_TARGET="${T}/$1-${i}.out";
[[ -e ${STDERR_TARGET} ]] || break;
: $(( i++ ));
done;
fi;
if ${m4flags}; then
set -- "${1}" $(autotools_m4dir_include) "${@:2}" $(autotools_m4sysdir_include);
fi;
printf "***** $1 *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}";
ebegin "Running $@";
"$@" >> "${STDERR_TARGET}" 2>&1;
if ! eend $? && ${autofail}; then
echo;
eerror "Failed Running $1 !";
eerror;
eerror "Include in your bugreport the contents of:";
eerror;
eerror " ${STDERR_TARGET}";
echo;
die "Failed Running $1 !";
fi
}
bashpid ()
{
sh -c 'echo ${PPID}'
}
built_with_use ()
{
_eutils_eprefix_init;
local hidden="no";
if [[ $1 == "--hidden" ]]; then
hidden="yes";
shift;
fi;
local missing_action="die";
if [[ $1 == "--missing" ]]; then
missing_action=$2;
shift;
shift;
case ${missing_action} in
true | false | die)

;;
*)
die "unknown action '${missing_action}'"
;;
esac;
fi;
local opt=$1;
[[ ${opt:0:1} = "-" ]] && shift || opt="-a";
local PKG=$(best_version $1);
[[ -z ${PKG} ]] && die "Unable to resolve $1 to an installed package";
shift;
local USEFILE=${EROOT}/var/db/pkg/${PKG}/USE;
local IUSEFILE=${EROOT}/var/db/pkg/${PKG}/IUSE;
if [[ ! -e ${USEFILE} ]] || [[ ! -e ${IUSEFILE} && ${hidden} == "no" ]]; then
case ${missing_action} in
true)
return 0
;;
false)
return 1
;;
die)
die "Unable to determine what USE flags $PKG was built with"
;;
esac;
fi;
if [[ ${hidden} == "no" ]]; then
local IUSE_BUILT=($(<"${IUSEFILE}"));
local expand;
for expand in $(echo ${USE_EXPAND} | tr '[:upper:]' '[:lower:]');
do
if [[ $1 == ${expand}_* ]]; then
expand="";
break;
fi;
done;
if [[ -n ${expand} ]]; then
if ! has $1 ${IUSE_BUILT[@]#[-+]}; then
case ${missing_action} in
true)
return 0
;;
false)
return 1
;;
die)
die "$PKG does not actually support the $1 USE flag!"
;;
esac;
fi;
fi;
fi;
local USE_BUILT=$(<${USEFILE});
while [[ $# -gt 0 ]]; do
if [[ ${opt} = "-o" ]]; then
has $1 ${USE_BUILT} && return 0;
else
has $1 ${USE_BUILT} || return 1;
fi;
shift;
done;
[[ ${opt} = "-a" ]]
}
check_license ()
{
die "you no longer need this as portage supports ACCEPT_LICENSE itself"
}
config_rpath_update ()
{
local dst src=$(type -P gettext | sed 's:bin/gettext:share/gettext/config.rpath:');
[[ $# -eq 0 ]] && set -- $(find -name config.rpath);
[[ $# -eq 0 ]] && return 0;
einfo "Updating all config.rpath files";
for dst in "$@";
do
einfo " ${dst}";
cp "${src}" "${dst}" || die;
done
}
darwintoolize ()
{
die "Use elibtoolize"
}
doicon ()
{
_iconins ${FUNCNAME} "$@"
}
domenu ()
{
( local i j ret=0;
insinto /usr/share/applications;
for i in "$@";
do
if [[ -f ${i} ]]; then
doins "${i}";
((ret+=$?));
else
if [[ -d ${i} ]]; then
for j in "${i}"/*.desktop;
do
doins "${j}";
((ret+=$?));
done;
else
((++ret));
fi;
fi;
done;
exit ${ret} )
}
eaclocal ()
{
[[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags)
}
eaclocal_amflags ()
{
local aclocal_opts amflags_file;
for amflags_file in GNUmakefile.am Makefile.am GNUmakefile.in Makefile.in;
do
[[ -e ${amflags_file} ]] || continue;
autotools_env_setup;
aclocal_opts=$(sed -n "/^ACLOCAL_AMFLAGS[[:space:]]*=/{ # match the first line
s:[^=]*=::p; # then gobble up all escaped lines
: nextline /\\\\$/{ n; p; b nextline; } }" ${amflags_file});
eval aclocal_opts=\""${aclocal_opts}"\";
break;
done;
echo ${aclocal_opts}
}
eautoconf ()
{
if [[ ! -f configure.ac && ! -f configure.in ]]; then
echo;
eerror "No configure.{ac,in} present in '${PWD}'!";
echo;
die "No configure.{ac,in} present!";
fi;
autotools_run_tool --at-m4flags autoconf "$@"
}
eautoheader ()
{
_at_uses_autoheader || return 0;
autotools_run_tool --at-no-fail --at-m4flags autoheader "$@"
}
eautomake ()
{
local extra_opts;
local makefile_name;
for makefile_name in {GNUmakefile,{M,m}akefile}.am "";
do
[[ -f ${makefile_name} ]] && break;
done;
if [[ -z ${makefile_name} ]]; then
_at_uses_automake || return 0;
else
if [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name%.am}.in ]]; then
local used_automake;
local installed_automake;
installed_automake=$(WANT_AUTOMAKE= automake --version | head -n 1 | sed -e 's:.*(GNU automake) ::');
used_automake=$(head -n 1 < ${makefile_name%.am}.in | sed -e 's:.*by automake \(.*\) from .*:\1:');
if [[ ${installed_automake} != ${used_automake} ]]; then
einfo "Automake used for the package (${used_automake}) differs from";
einfo "the installed version (${installed_automake}).";
eautoreconf;
return 0;
fi;
fi;
fi;
[[ -f INSTALL && -f AUTHORS && -f ChangeLog && -f NEWS && -f README ]] || extra_opts="${extra_opts} --foreign";
autotools_run_tool automake --add-missing --copy ${extra_opts} "$@"
}
eautopoint ()
{
autotools_run_tool autopoint "$@"
}
eautoreconf ()
{
local x g multitop;
if [[ -z ${AT_TOPLEVEL_EAUTORECONF} ]]; then
AT_TOPLEVEL_EAUTORECONF="yes";
multitop="yes";
multijob_init;
fi;
if [[ -z ${AT_NO_RECURSIVE} ]]; then
for x in $(autotools_check_macro_val AC_CONFIG_SUBDIRS);
do
if [[ -d ${x} ]]; then
pushd "${x}" > /dev/null;
if [[ -z ${PAST_TOPLEVEL_EAUTORECONF} ]]; then
PAST_TOPLEVEL_EAUTORECONF="yes" AT_NOELIBTOOLIZE="yes" multijob_child_init eautoreconf || die;
else
AT_NOELIBTOOLIZE="yes" eautoreconf || die;
fi;
popd > /dev/null;
fi;
done;
fi;
einfo "Running eautoreconf in '${PWD}' ...";
local m4dirs=$(autotools_check_macro_val AC_CONFIG_{AUX,MACRO}_DIR);
[[ -n ${m4dirs} ]] && mkdir -p ${m4dirs};
local i tools=(glibgettext false "autotools_run_tool glib-gettextize --copy --force" gettext false "autotools_run_tool --at-missing autopoint --force" intltool false "autotools_run_tool intltoolize --automake --copy --force" gtkdoc false "autotools_run_tool --at-missing gtkdocize --copy" gnomedoc false "autotools_run_tool --at-missing gnome-doc-prepare --copy --force" libtool false "_elibtoolize --install --copy --force");
for ((i = 0; i < ${#tools[@]}; i += 3 ))
do
if _at_uses_${tools[i]}; then
tools[i+1]=true;
${tools[i+2]};
fi;
done;
local rerun_aclocal=false;
eaclocal;
for ((i = 0; i < ${#tools[@]}; i += 3 ))
do
if ! ${tools[i+1]} && _at_uses_${tools[i]}; then
${tools[i+2]};
rerun_aclocal=true;
fi;
done;
${rerun_aclocal} && eaclocal;
eautoconf;
eautoheader;
[[ ${AT_NOEAUTOMAKE} != "yes" ]] && FROM_EAUTORECONF="yes" eautomake ${AM_OPTS};
if [[ ${AT_NOELIBTOOLIZE} != "yes" ]]; then
elibtoolize --force "${PWD}";
fi;
if [[ -n ${multitop} ]]; then
unset AT_TOPLEVEL_EAUTORECONF;
multijob_finish || die;
fi;
return 0
}
ebeep ()
{
ewarn "QA Notice: ebeep is not defined in EAPI=${EAPI}, please file a bug at https://bugs.gentoo.org"
}
econf_build ()
{
tc-env_build econf --build=${CBUILD:-${CHOST}} "$@"
}
ecvs_clean ()
{
[[ -z $* ]] && set -- .;
find "$@" -type d -name 'CVS' -prune -print0 | xargs -0 rm -rf;
find "$@" -type f -name '.cvs*' -print0 | xargs -0 rm -rf
}
edos2unix ()
{
[[ $# -eq 0 ]] && return 0;
sed -i 's/\r$//' -- "$@" || die
}
einstalldocs ()
{
debug-print-function ${FUNCNAME} "${@}";
local dodoc_opts=-r;
has ${EAPI} 0 1 2 3 && dodoc_opts=;
if ! declare -p DOCS &>/dev/null; then
local d;
for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS FAQ CREDITS CHANGELOG;
do
if [[ -s ${d} ]]; then
dodoc "${d}" || die;
fi;
done;
else
if [[ $(declare -p DOCS) == "declare -a"* ]]; then
if [[ -n ${DOCS[@]} ]]; then
dodoc ${dodoc_opts} "${DOCS[@]}" || die;
fi;
else
if [[ -n ${DOCS} ]]; then
dodoc ${dodoc_opts} ${DOCS} || die;
fi;
fi;
fi;
if [[ $(declare -p HTML_DOCS 2>/dev/null) == "declare -a"* ]]; then
if [[ -n ${HTML_DOCS[@]} ]]; then
dohtml -r "${HTML_DOCS[@]}" || die;
fi;
else
if [[ -n ${HTML_DOCS} ]]; then
dohtml -r ${HTML_DOCS} || die;
fi;
fi;
return 0
}
elibtoolize ()
{
local x;
local dirs=();
local do_portage="no";
local do_reversedeps="no";
local do_only_patches="no";
local do_uclibc="yes";
local deptoremove=;
local do_shallow="no";
local force="false";
local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed target-nm";
for x in "$@";
do
case ${x} in
--portage)
do_portage="yes"
;;
--reverse-deps)
do_reversedeps="yes";
elt_patches+=" fix-relink"
;;
--patch-only)
do_only_patches="yes"
;;
--remove-internal-dep=*)
deptoremove=${x#--remove-internal-dep=};
[[ -n ${deptoremove} ]] && elt_patches+=" rem-int-dep"
;;
--shallow)
do_shallow="yes"
;;
--no-uclibc)
do_uclibc="no"
;;
--force)
force="true"
;;
-*)
eerror "Invalid elibtoolize option: ${x}";
die "elibtoolize called with ${x} ??"
;;
*)
dirs+=("${x}")
;;
esac;
done;
[[ ${do_uclibc} == "yes" ]] && elt_patches+=" uclibc-conf uclibc-ltconf";
case ${CHOST} in
*-aix*)
elt_patches+=" hardcode aixrtl aix-noundef"
;;
*-darwin*)
elt_patches+=" darwin-ltconf darwin-ltmain darwin-conf"
;;
*-solaris*)
elt_patches+=" sol2-conf sol2-ltmain"
;;
*-freebsd*)
elt_patches+=" fbsd-conf fbsd-ltconf"
;;
*-hpux*)
elt_patches+=" hpux-conf deplibs hc-flag-ld hardcode hardcode-relink relink-prog no-lc"
;;
*-irix*)
elt_patches+=" irix-ltmain"
;;
*-mint*)
elt_patches+=" mint-conf"
;;
esac;
if $(tc-getLD) --version 2>&1 | grep -qs 'GNU gold'; then
elt_patches+=" gold-conf";
fi;
if [[ ${do_shallow} == "yes" ]]; then
[[ ${#dirs[@]} -ne 0 ]] && die "Using --shallow with explicit dirs doesn't make sense";
[[ -f ${S}/ltmain.sh || -f ${S}/configure ]] && dirs+=("${S}");
else
[[ ${#dirs[@]} -eq 0 ]] && dirs+=("${S}");
dirs=($(find "${dirs[@]}" '(' -name ltmain.sh -o -name configure ')' -printf '%h\n' | sort -u));
fi;
local d p ret;
for d in "${dirs[@]}";
do
export ELT_APPLIED_PATCHES=;
if [[ -f ${d}/.elibtoolized ]]; then
${force} || continue;
fi;
local outfunc="einfo";
[[ -f ${d}/.elibtoolized ]] && outfunc="ewarn";
${outfunc} "Running elibtoolize in: ${d#${WORKDIR}/}/";
if [[ ${outfunc} == "ewarn" ]]; then
ewarn " We've already been run in this tree; you should";
ewarn " avoid this if possible (perhaps by filing a bug)";
fi;
[[ -f ${d}/ltmain.sh ]] && for p in ${elt_patches};
do
ret=0;
case ${p} in
portage)
if ! grep -qs 'We do not want portage' "${d}/ltmain.sh"; then
ELT_walk_patches "${d}/ltmain.sh" "${p}";
ret=$?;
fi
;;
rem-int-dep)
ELT_walk_patches "${d}/ltmain.sh" "${p}" "${deptoremove}";
ret=$?
;;
fix-relink)
if grep -qs 'inst_prefix_dir' "${d}/ltmain.sh"; then
ELT_walk_patches "${d}/ltmain.sh" "${p}";
ret=$?;
fi
;;
max_cmd_len)
if grep -qs 'max_cmd_len' "${d}/ltmain.sh"; then
ELT_walk_patches "${d}/ltmain.sh" "${p}";
ret=$?;
fi
;;
as-needed)
ELT_walk_patches "${d}/ltmain.sh" "${p}";
ret=$?
;;
uclibc-ltconf)
if [[ -s ${d}/ltconfig ]]; then
ELT_walk_patches "${d}/ltconfig" "${p}";
ret=$?;
fi
;;
fbsd-ltconf)
if [[ -s ${d}/ltconfig ]]; then
ELT_walk_patches "${d}/ltconfig" "${p}";
ret=$?;
fi
;;
darwin-ltconf)
if [[ -s ${d}/ltconfig ]]; then
ELT_walk_patches "${d}/ltconfig" "${p}";
ret=$?;
fi
;;
darwin-ltmain)
if [[ -e ${d}/ltmain.sh ]] && ! grep -qs 'verstring="-compatibility_version' "${d}/ltmain.sh"; then
ELT_walk_patches "${d}/ltmain.sh" "${p}";
ret=$?;
fi
;;
install-sh)
ELT_walk_patches "${d}/install-sh" "${p}";
ret=$?
;;
cross)
if tc-is-cross-compiler; then
ELT_walk_patches "${d}/ltmain.sh" "${p}";
ret=$?;
fi
;;
*)
ELT_walk_patches "${d}/ltmain.sh" "${p}";
ret=$?
;;
esac;
if [[ ${ret} -ne 0 ]]; then
case ${p} in
relink)
local version=$(ELT_libtool_version "${d}/ltmain.sh");
if ! grep -qs 'inst_prefix_dir' "${d}/ltmain.sh" && [[ $(VER_to_int "${version}") -ge $(VER_to_int "1.4.0") ]]; then
ewarn " Could not apply relink.patch!";
fi
;;
portage)
if [[ ${do_portage} == "yes" ]]; then
if ! grep -qs 'We do not want portage' "${d}/ltmain.sh"; then
echo;
eerror "Portage patch requested, but failed to apply!";
eerror "Please file a bug report to add a proper patch.";
die "Portage patch requested, but failed to apply!";
fi;
else
if grep -qs 'We do not want portage' "${d}/ltmain.sh"; then
:;
else
local version=$(ELT_libtool_version "${d}"/ltmain.sh);
echo;
eerror "Portage patch failed to apply (ltmain.sh version ${version})!";
eerror "Please file a bug report to add a proper patch.";
die "Portage patch failed to apply!";
fi;
ELT_APPLIED_PATCHES="portage";
fi
;;
darwin-*)
[[ ${CHOST} == *"-darwin"* ]] && ewarn " Darwin patch set '${p}' failed to apply!"
;;
esac;
fi;
done;
[[ -f ${d}/ltmain.sh ]] && if [[ -z ${ELT_APPLIED_PATCHES} ]]; then
if [[ ${do_portage} == "no" && ${do_reversedeps} == "no" && ${do_only_patches} == "no" && ${deptoremove} == "" ]]; then
ewarn "Cannot apply any patches, please file a bug about this";
die;
fi;
fi;
[[ -f ${d}/configure ]] && for p in ${elt_patches};
do
ret=0;
case ${p} in
uclibc-conf)
if grep -qs 'Transform linux' "${d}/configure"; then
ELT_walk_patches "${d}/configure" "${p}";
ret=$?;
fi
;;
fbsd-conf)
if grep -qs 'version_type=freebsd-' "${d}/configure"; then
ELT_walk_patches "${d}/configure" "${p}";
ret=$?;
fi
;;
darwin-conf)
if grep -qs '&& echo \.so ||' "${d}/configure"; then
ELT_walk_patches "${d}/configure" "${p}";
ret=$?;
fi
;;
aixrtl | hpux-conf)
ret=1;
local subret=0;
while [[ $subret -eq 0 ]]; do
subret=1;
if [[ -e ${d}/configure ]]; then
ELT_walk_patches "${d}/configure" "${p}";
subret=$?;
fi;
if [[ $subret -eq 0 ]]; then
ret=0;
fi;
done
;;
mint-conf | gold-conf | sol2-conf)
ELT_walk_patches "${d}/configure" "${p}";
ret=$?
;;
target-nm)
ELT_walk_patches "${d}/configure" "${p}";
ret=$?
;;
*)

;;
esac;
if [[ ${ret} -ne 0 ]]; then
case ${p} in
uclibc-*)
[[ ${CHOST} == *-uclibc ]] && ewarn " uClibc patch set '${p}' failed to apply!"
;;
fbsd-*)
if [[ ${CHOST} == *-freebsd* ]]; then
if [[ -z $(grep 'Handle Gentoo/FreeBSD as it was Linux' "${d}/configure" 2>/dev/null) ]]; then
eerror " FreeBSD patch set '${p}' failed to apply!";
die "FreeBSD patch set '${p}' failed to apply!";
fi;
fi
;;
darwin-*)
[[ ${CHOST} == *"-darwin"* ]] && ewarn " Darwin patch set '${p}' failed to apply!"
;;
esac;
fi;
done;
rm -f "${d}/libtool";
> "${d}/.elibtoolized";
done
}
elt_patch_dir ()
{
local d="${ECLASSDIR}/ELT-patches";
if [[ ! -d ${d} ]]; then
d="${_LIBTOOL_ECLASSDIR_LOCAL}/ELT-patches";
fi;
echo "${d}"
}
emktemp ()
{
local exe="touch";
[[ $1 == -d ]] && exe="mkdir" && shift;
local topdir=$1;
if [[ -z ${topdir} ]]; then
[[ -z ${T} ]] && topdir="/tmp" || topdir=${T};
fi;
if ! type -P mktemp > /dev/null; then
local tmp=/;
while [[ -e ${tmp} ]]; do
tmp=${topdir}/tmp.${RANDOM}.${RANDOM}.${RANDOM};
done;
${exe} "${tmp}" || ${exe} -p "${tmp}";
echo "${tmp}";
else
if [[ ${exe} == "touch" ]]; then
TMPDIR="${topdir}" mktemp -t tmp.XXXXXXXXXX;
else
TMPDIR="${topdir}" mktemp -dt tmp.XXXXXXXXXX;
fi;
fi
}
epatch ()
{
function _epatch_draw_line ()
{
[[ -z $1 ]] && set "$(printf "%65s" '')";
echo "${1//?/=}"
};
unset P4CONFIG P4PORT P4USER;
local EPATCH_OPTS=(${EPATCH_OPTS[*]});
while [[ $# -gt 0 ]]; do
case $1 in
-*)
EPATCH_OPTS+=("$1")
;;
*)
break
;;
esac;
shift;
done;
if [[ $# -gt 1 ]]; then
local m;
for m in "$@";
do
epatch "${m}";
done;
return 0;
fi;
local SINGLE_PATCH="no";
[[ $# -eq 0 ]] && set -- "${EPATCH_SOURCE}";
if [[ -f $1 ]]; then
SINGLE_PATCH="yes";
set -- "$1";
local EPATCH_SUFFIX=$1;
else
if [[ -d $1 ]]; then
evar_push_set LC_COLLATE C;
set -- "$1"/*${EPATCH_SUFFIX:+."${EPATCH_SUFFIX}"};
evar_pop;
else
if [[ -f ${EPATCH_SOURCE}/$1 ]]; then
epatch "${EPATCH_SOURCE}/$1";
return $?;
else
[[ $# -ne 0 ]] && EPATCH_SOURCE=$1;
echo;
eerror "Cannot find \$EPATCH_SOURCE! Value for \$EPATCH_SOURCE is:";
eerror;
eerror " ${EPATCH_SOURCE}";
eerror " ( ${EPATCH_SOURCE##*/} )";
echo;
die "Cannot find \$EPATCH_SOURCE!";
fi;
fi;
fi;
EPATCH_OPTS="${EPATCH_COMMON_OPTS} ${EPATCH_OPTS[*]}";
local PIPE_CMD;
case ${EPATCH_SUFFIX##*\.} in
xz)
PIPE_CMD="xz -dc"
;;
lzma)
PIPE_CMD="lzma -dc"
;;
bz2)
PIPE_CMD="bzip2 -dc"
;;
gz | Z | z)
PIPE_CMD="gzip -dc"
;;
ZIP | zip)
PIPE_CMD="unzip -p"
;;
*)

;;
esac;
[[ ${SINGLE_PATCH} == "no" ]] && einfo "${EPATCH_MULTI_MSG}";
local x;
for x in "$@";
do
[[ ! -f ${x} ]] && continue;
local patchname=${x##*/};
local a=${patchname#*_};
a=${a%%_*};
if ! [[ ${SINGLE_PATCH} == "yes" || ${EPATCH_FORCE} == "yes" || ${a} == all || ${a} == ${ARCH} ]]; then
continue;
fi;
if [[ -n ${EPATCH_EXCLUDE} ]]; then
eshopts_push -o noglob;
local ex;
for ex in ${EPATCH_EXCLUDE};
do
if [[ ${patchname} == ${ex} ]]; then
einfo " Skipping ${patchname} due to EPATCH_EXCLUDE ...";
eshopts_pop;
continue 2;
fi;
done;
for ex in ${EPATCH_USER_EXCLUDE};
do
if [[ ${patchname} == ${ex} ]]; then
einfo " Skipping ${patchname} due to EPATCH_USER_EXCLUDE ...";
eshopts_pop;
continue 2;
fi;
done;
eshopts_pop;
fi;
if [[ ${SINGLE_PATCH} == "yes" ]]; then
if [[ -n ${EPATCH_SINGLE_MSG} ]]; then
einfo "${EPATCH_SINGLE_MSG}";
else
einfo "Applying ${patchname} ...";
fi;
else
einfo " ${patchname} ...";
fi;
local STDERR_TARGET="${T}/${patchname}.out";
if [[ -e ${STDERR_TARGET} ]]; then
STDERR_TARGET="${T}/${patchname}-$$.out";
fi;
printf "***** %s *****\nPWD: %s\n\n" "${patchname}" "${PWD}" > "${STDERR_TARGET}";
local count=0;
local PATCH_TARGET;
if [[ -n ${PIPE_CMD} ]]; then
PATCH_TARGET="${T}/$$.patch";
echo "PIPE_COMMAND: ${PIPE_CMD} ${x} > ${PATCH_TARGET}" >> "${STDERR_TARGET}";
if ! ( ${PIPE_CMD} "${x}" > "${PATCH_TARGET}" ) >> "${STDERR_TARGET}" 2>&1; then
echo;
eerror "Could not extract patch!";
count=5;
break;
fi;
else
PATCH_TARGET=${x};
fi;
local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }');
if [[ -n ${abs_paths} ]]; then
count=1;
printf "NOTE: skipping -p0 due to absolute paths in patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}";
fi;
local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}");
if [[ -n ${rel_paths} ]]; then
echo;
eerror "Rejected Patch: ${patchname} !";
eerror " ( ${PATCH_TARGET} )";
eerror;
eerror "Your patch uses relative paths '../':";
eerror "${rel_paths}";
echo;
die "you need to fix the relative paths in patch";
fi;
local patch_cmd;
local patch="patch";
eval $(alias patch 2>/dev/null | sed 's:^alias ::');
while [[ ${count} -lt 5 ]]; do
patch_cmd="${patch} -p${count} ${EPATCH_OPTS}";
( _epatch_draw_line "***** ${patchname} *****";
echo;
echo "PATCH COMMAND: ${patch_cmd} < '${PATCH_TARGET}'";
echo;


Last edited by paradigm-X on Mon Jan 20, 2014 8:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
paradigm-X
Apprentice
Apprentice


Joined: 19 Sep 2013
Posts: 168

PostPosted: Mon Jan 20, 2014 8:28 pm    Post subject: Reply with quote

While looking around for information about this apparent bug, or error, as the case may be, I found the following pertinent information:

https://bugzilla.redhat.com/show_bug.cgi?id=814850


And, it further indicates that a bug is likely the cause, as well as a possible workaround like so:

Doc Type: Bug Fix
Doc Text:
Kickstart installations that run shell scripts using redirected input may experience execution problems due to a missing /dev/fd directory. You may workaround this problem by adding a %pre script at the top of your kickstart file that does this: %pre ln -sf /proc/self/fd /dev/fd %end
----------------

I tested this workaround manually by issuing the following command in Terminal: "ln -sf /proc/self/fd /dev/fd". It worked, allowing me to use emerge afterwards. Until the cause for the broken symlink has been determined and recitified, I must use this means for emerging. Although this fix pertains to the RedHat OS, the solution may be applicable to Gentoo as well. Perhaps Gentoo users would need to put the script above, i.e., "ln -sf /proc/self/fd /dev/fd", into the Gentoo startup routine in some manner. In order to test this idea, my question is, where would the best place be to put it, and should it be altered in any way to accord with the Gentoo way of doing things?
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9347

PostPosted: Tue Jan 21, 2014 2:12 am    Post subject: Reply with quote

The command you quote is exactly what should have happened automatically. The problem is that, for the users reporting problems in this thread, it is not happening automatically and no one has yet determined why. Running that command on each boot is a workaround.
Back to top
View user's profile Send private message
lea0014
n00b
n00b


Joined: 09 Mar 2010
Posts: 24

PostPosted: Tue Jan 21, 2014 4:41 am    Post subject: Reply with quote

Make sure that you have enabled udev USE globaly, and try to change the python profile
Code:
localhost ~ # eselect python list
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.2
  [3]   python3.3
eselect python set X

Casually i had a similar problem today with another package, and the solution was to set python2.7 profile.
Back to top
View user's profile Send private message
paradigm-X
Apprentice
Apprentice


Joined: 19 Sep 2013
Posts: 168

PostPosted: Tue Jan 21, 2014 5:28 am    Post subject: Reply with quote

> "Running that command on each boot is a workaround."

I have not a single clue whether what I have done is the cause of an apparent change in the solution available to us, but I am now able to do emerge normally after rebooting without having made any attempt to create a script that would perform this link automatically: /dev/fd ---> /proc/self/fd. As a matter of fact, even now, as I look at this command output:

ls -la /dev/fd

I see it say "cannot access /dev/fd: No such file or directory". Yet, emerge is working. Though I have been installing a few programs initially on this new system, the only thing I have done to my knowledge in relation to changing the emerge process is to add this to fstab:

none /var/tmp/portage tmpfs noatime 0 0

That is to create a tmpfs file for building packages. I did this with no intention of fixing the other problem. As I said, the link is still missing, but I can emerge now regardless.
Back to top
View user's profile Send private message
DNAspark99
Guru
Guru


Joined: 03 Sep 2004
Posts: 321

PostPosted: Tue Jan 21, 2014 8:13 pm    Post subject: Reply with quote

Same issue. Portage can't compile because of complaint about no /dev/fd symlink to /proc/self/fd. (also using 3.11.7-hardened-r1.)

Although it's a simple fix, ('ln -sf /proc/self/fd /dev/fd'), it doesn't persist upon reboot. Have that in /etc/local.d/fix.start for now.

And no, dropping to python 2.7, or creating a tmpfs for /var/tmp/portage, did NOT work for me.
Back to top
View user's profile Send private message
paradigm-X
Apprentice
Apprentice


Joined: 19 Sep 2013
Posts: 168

PostPosted: Tue Jan 21, 2014 11:59 pm    Post subject: Reply with quote

> "And no, dropping to python 2.7, or creating a tmpfs for /var/tmp/portage, did NOT work for me."

Yes, I agree with this now too because I am finding that the change I initially noticed in the procedure was only coincidental to the implementation of a tempfs: it did not long persist. Oddly, however, something else seems to be happening in the background because the emerge procedure appears to work fine, despite the absence of a link, but only for a while, and then it suddenly and arbitrarily quits working. At least that is how it appears as I install several programs in groups. A number of them will emerge normally and then in the middle of the group it just fails with an error about the link.

So I still have no clue what is causing the problem, but I thought that noting my observations may prove helpful to the effort, if any is happening, of tackling it.
Back to top
View user's profile Send private message
DNAspark99
Guru
Guru


Joined: 03 Sep 2004
Posts: 321

PostPosted: Wed Jan 22, 2014 7:32 pm    Post subject: Reply with quote

Ok, in my case (fresh install of stage3-amd64-hardened-20140116.tar.bz2 + kernel 3.11.7-hardened-r1), where the /dev/fd symlink wasn't being created, I noticed there was no 'udev' in the boot runlevel. So I added it, and rebooted (being sure to remove my local.d/fix.start script first), - and udev successfully creates this, and possibly other necessary files under /dev.

Code:

rc-update add udev boot
Back to top
View user's profile Send private message
netixen
n00b
n00b


Joined: 26 Sep 2013
Posts: 31

PostPosted: Sun Mar 23, 2014 10:02 am    Post subject: Reply with quote

This bug still existed a week ago on a 3.11.7-hardened. On other gentoo systems i have, udev and udev-mount are in the sysinit runlevel.
Code:
rc-update add udev sysinit
rc-update add udev-mount sysinit
Back to top
View user's profile Send private message
ILP
n00b
n00b


Joined: 26 Mar 2014
Posts: 3

PostPosted: Wed Mar 26, 2014 3:36 am    Post subject: Reply with quote

I have a similar problem with stage3-amd64-hardened-20140320.tar.bz2

Code:
mkdir / dev / fd
ln-s / proc / self / fd / dev / fd


emerge OK! But reboot is lost

Code:
rc-update add udev boot
reboot


or

Code:
rc-update add udev sysinit
rc-update add udev-mount sysinit
reboot


/dev/fd have exits, but Eth0 network is lost
Back to top
View user's profile Send private message
netixen
n00b
n00b


Joined: 26 Sep 2013
Posts: 31

PostPosted: Wed Mar 26, 2014 9:29 am    Post subject: Reply with quote

Quote:
/dev/fd have exits, but Eth0 network is lost


Check for the name of the interface (udev might have renamed it)
Code:
ifconfig -a


then make sure the net.eth0 or whatever the name of the interface is in boot
Code:
rc-update -v show
Back to top
View user's profile Send private message
ILP
n00b
n00b


Joined: 26 Mar 2014
Posts: 3

PostPosted: Fri Mar 28, 2014 4:44 am    Post subject: Reply with quote

Quote:
Check for the name of the interface (udev might have renamed it)


Quote:
ifconfig -a


eth0 has been renamed eno16777736

^^ I am a linux newbie.
Thank Netixen! Netixen can help me with a solution to repair the network name?
Back to top
View user's profile Send private message
ILP
n00b
n00b


Joined: 26 Mar 2014
Posts: 3

PostPosted: Fri Mar 28, 2014 10:35 am    Post subject: Reply with quote

my problem was resolved.

If Network Interface name error by udev (go here https://forums.gentoo.org/viewtopic-t-953356-start-0.html)
For my example, make new empty file 80-net-name-slot.rules

Code:
nano -w /etc/udev/rules.d/80-net-name-slot.rules
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum