man gawk states that if not specified AWKPATH is ".:/usr/local/share/awk" but gawk are build as core component and AWKPATH is set to ".:/usr/share/awk" Reproducible: Always Steps to Reproduce: $ strace -f awk -f abcd 2>&1 | grep abcd execve("/usr/bin/awk", ["awk", "-f", "abcd"], [/* 58 vars */]) = 0 open("./abcd", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/share/awk/abcd", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("abcd", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) emerge info *** Deprecated use of action 'info', use '--info' instead Portage 2.1.3.9 (default-linux/x86/2006.1, gcc-3.4.6, glibc-2.5-r4, 2.6.19-gentoo-r5-20070322-00 i686) ================================================================= System uname: 2.6.19-gentoo-r5-20070322-00 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz Timestamp of tree: Sun, 07 Oct 2007 23:30:01 +0000 ccache version 2.3 [disabled] app-shells/bash: 3.2_p17 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r5 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.3 dev-util/confcache: 0.4.2-r1 sys-apps/baselayout: 1.12.9-r2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17-r1 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.21 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-mcpu=pentium4 -O3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/bind" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-mcpu=pentium4 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp/portage" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/sunrise /usr/portage/local/layman/zugaina" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d a52 aac aalib acl acpi aim alsa apache2 audiofile avi berkdb bitmap-fonts bzip2 bzlib caps cdparanoia cdr cli cracklib crypt cscope ctype cups curl dbus divx4linux dlloader dmx dri dts dvd dvdread encode exif ffmpeg flac flash fortran ftp gcj gd gdbm ggi gif glitz glut gmp gpm graphviz gs gtk gtk2 hal iconv icq idn ieee1394 imagemagick imlib ipv6 isdnlog java jbig jce jikes jpeg lcms libcaca libwww logrotate lzo mad matroska midi mikmod mmap mms mmx mng motif mozilla mp3 mpeg msn mudflap multitarget musepack mysql mythtv nas ncurses network nptl nptlonly nvidia objc++ objc-gc ogg openal opengl openmp pam pcre pdf pdflib perl php plotutils png portaudio posix ppds pppd python qt qt3 qt4 quicktime readline reflection samba sasl scpd sdl session shorten slang slp smp sndfile sox speex spell spl sse sse2 ssl svg sysfs szip tcltk tcpd test theora threads tiff truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vddx videos vidix vim-with-x vorbis win32codecs wmf x86 xanim xattr xcb xine xml xml2 xorg xosd xpm xprint xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvdummy fbdev nvidia vesa vmware" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Sigh... Have you snipped the part where it says "The actual directory may vary, depending upon how gawk was built and installed." on purpose?
what jakub said