Here you have the relevant information from my system: Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.1, glibc-2.3.2-r6, 2.4.22-ac4) ================================================================= System uname: 2.4.22-ac4 i686 VIA Nehemiah Gentoo Base System version 1.4.3.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -mcpu=pentium3 -mfpmath=sse -msse -mmmx -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CXXFLAGS="-O3 -mcpu=pentium3 -mfpmath=sse -msse -mmmx -pipe" MAKEOPTS="-j2" USE="x86 oss apm arts avi crypt cups encode foomaticdb gif gtk imlib jpeg kde gnome libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl pdflib png qt quicktime sdl spell svga truetype xml2 xmms xv zlib gdbm berkdb slang readline gpm tcpd pam ssl perl python -X pcmcia" As you can see this is a ~x86 system, with gentoo 1.4 (fresh install from stage 1) I'm using linux-headers-2.4.22, wireless-tools-v27_pre2, kernel 2.4.22-ac4 and modutils-2.4.25. I also tried with wireless-tools-v26 too, but with no luck. This is what happens when I emerge hostap-driver-0.1.1: Calculating dependencies ...done! >>> emerge (1 of 1) net-wireless/hostap-driver-0.1.1 to / >>> md5 src_uri ;-) hostap-driver-0.1.1.tar.gz >>> Unpacking source... >>> Unpacking hostap-driver-0.1.1.tar.gz to /var/tmp/portage/hostap-driver-0.1.1/work * Kernel PCMCIA is disabled, using external pcmcia-cs sources >>> Unpacking pcmcia-cs-3.2.5.tar.gz to /var/tmp/portage/hostap-driver-0.1.1/work >>> Source unpacked. * Building the following drivers: pccard pci plx tail: `-1' option is obsolete; use `-n 1' Try `tail --help' for more information. cc1: Broken pipe: when writing output to gcc -I/var/tmp/portage/hostap-driver-0.1.1/work/pcmcia-cs-3.2.5/include -I/usr/src/linux/include -O2 -D__KERNEL__ -DMODULE -Wall -g -c -DPRISM2_DOWNLOAD_SUPPORT -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -fomit-frame-pointer -E -D__GENKSYMS__ driver/modules/hostap.c | \ /sbin/genksyms -k > driver/modules/hostap.ver /sbin/genksyms: option requires an argument -- k Usage: genksyms [-dDwqhV] [-k kernel_version] [-p prefix] > .../linux/module/*.ver -d, --debug Increment the debug level (repeatable) -D, --dump Dump expanded symbol defs (for debugging only) -w, --warnings Enable warnings -q, --quiet Disable warnings (default) -h, --help Print this message -V, --version Print the release version -k ver --kernel ver Set the kernel version for which we are compiling -p string --prefix string Set a mangling prefix for all symbols Run 'make install_pccard' as root to install hostap_cs.o Run 'make install_plx' as root to install hostap_plx.o Run 'make install_pci' as root to install hostap_pci.o In file included from /var/tmp/portage/hostap-driver-0.1.1/work/pcmcia-cs-3.2.5/include/linux/module.h:6, from driver/modules/hostap.c:21: /usr/src/linux/include/linux/module.h:15:1: warning: "_set_ver" redefined In file included from /usr/src/linux/include/linux/modversions.h:3, from <command line>:9: /usr/src/linux/include/linux/modsetver.h:9:1: warning: this is the location of the previous definition cc1: Broken pipe: when writing output to make: *** [driver/modules/hostap.ver] Error 1 !!! ERROR: net-wireless/hostap-driver-0.1.1 failed. !!! Function src_compile, Line 67, Exitcode 2 !!! (no error message)
The problem is with tail (from sys-apps/coreutils-5.0.91) ; it only accepts "tail -n 1" , not "tail -1" as hostap's Makefile does. So the fix for the ebuild should be as simple as doing: sed -e "s/tail -1/tail -n 1/" Makefile
Finally adding this to the ebuild fixed the problem: # fix for new coreutils sed -i -e "s:tail -1:tail -n 1:" "${S}/Makefile" There is also another small probelm with hostapd-0.1.0.ebuild, where you do a 'newexe "${FILESDIR}/hostapd.init.d" hostapd', because there is no hostapd.init.d in the files dir. This is the output from emerge: >>> Install hostapd-0.1.0 into /var/tmp/portage/hostapd-0.1.0/image/ category net-wireless cp: cannot stat `/usr/portage/net-wireless/hostapd/files/hostapd.init.d': No such file or directory install: cannot stat `/var/tmp/portage/hostapd-0.1.0/temp/hostapd': No such file or directory
Both fixed in CVS (no new revision).