When I try to emerge safecat ebuild it fails with "undefined reference to hier" error. Reproducible: Always Steps to Reproduce: 1. emerge safecat 2. 3. Actual Results: : undefined reference to `hier' collect2: ld returned 1 exit status make: *** [install] Error 1 !!! ERROR: net-mail/safecat-1.11 failed. !!! Function src_install, Line 42, Exitcode 2 Expected Results: Get properly compiled & installed. bash-2.05b$ emerge info Portage 2.0.49-r4 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-gentoo-r7) ================================================================= System uname: 2.4.20-gentoo-r7 i686 Celeron (Coppermine) ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=i686 -pipe -funroll-loops " CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -march=i686 -pipe -funroll-loops " DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs sandbox ccache buildpkg" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg gnome libg++ libwww mad mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline arts tetex svga java ruby X sdl gpm tcpd pam ssl perl python esd imlib oggvorbis gtk qt kde motif opengl cdr doc evms2 ipv6 maildir matrox scanner tcltk wxwindows"
Created attachment 17887 [details] Result of emerging safecat
I could (inconsistently) reproduce this error on my machine. The error is caused by the following line in the ebuild: grep -v man hier.c | grep -v doc > hier.c It seems that the above command occasionally trips over itself resulting in hier.c becoming a zero-byte file (which explains why we receive an "undefined reference to `hier'" message.) Altering hier.c via epatch is one way to avoid this problem.
Created attachment 18072 [details, diff] proposed safecat-1.11-gentoo.patch Note: this patch incorporates the existing gentoo patch file. :)
fixed in CVS. I didn't go the patch route, I just changed the command setup slightly to not destroy data. I fixed the head -1 issue with the package at the same time.