<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>72833</bug_id>
          
          <creation_ts>2004-11-29 10:33 0000</creation_ts>
          <short_desc>wireless-tools fails to compile (bad CFLAG munging)</short_desc>
          <delta_ts>2004-11-30 02:40:50 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>vapier@gentoo.org</reporter>
          <assigned_to>henrik@brixandersen.dk</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-11-29 10:33:23 0000</bug_when>
            <thetext>i686-pc-linux-gnu-gcc -pipe -march=pentium4 -O2 -frename-registers -fomit-frame-
pointer -mmmx -msse -msse2 -fdelete-null-pointer-checks -funroll-loops -D_FILE_O
FFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -MMD    -c iwevent.c
i686-pc-linux-gnu-gcc -pipe -march=pentium4 -O2 -frename-registers -fomit-frame-pointer -mmmx -msse -msse2 -fdelete-null-pointer-checks -funroll-loops -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -MMD    -c ifrename.c
i686-pc-linux-gnu-gcc -shi686-pc-linux-gnu-ared -o libiw.so.28 -Wl,-soname,libiw.so.28 -lm -lc iwlib.so
i686-pc-linux-gnu-gcc: unrecognized option `-shi686-pc-linux-gnu-ared&apos;
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../crt1.o(.text+0x18): In function `_start&apos;:
init.c: undefined reference to `main&apos;
collect2: ld returned 1 exit status
make: *** [libiw.so.28] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: net-wireless/wireless-tools-28_pre3 failed.
!!! Function src_compile, Line 51, Exitcode 2
!!! emake failed

Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0,glibc-2.3.4.20041006-r0, 2.6.10-rc2 i686)
=================================================================
System uname: 2.6.10-rc2 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
Gentoo Base System version 1.6.6
distcc 2.18.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r6,sys-devel/autoconf-2.13
Automake: sys-devel/automake-1.5,sys-devel/automake-1.9.3,sys-devel/automake-1.8.5-r2,sys-devel/automake-1.7.9,sys-devel/automake-1.6.3,sys-devel/automake-1.4_p6
Binutils: sys-devel/binutils-2.15.92.0.2-r2,sys-devel/binutils-2.15.94.0.1
Headers:  sys-kernel/linux26-headers-1,sys-kernel/linux26-headers-2.6.8.1-r2
Libtools: sys-devel/libtool-1.5.10
ACCEPT_KEYWORDS=&quot;x86 ~x86&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-pipe -march=pentium4 -O2 -frename-registers -fomit-frame-pointer -mmmx -msse -msse2 -fdelete-null-pointer-checks -funroll-loops -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
COMPILER=&quot;&quot;
CONFIG_PROTECT=&quot;/etc /opt/glftpd/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-pipe -march=pentium4 -O2 -frename-registers -fomit-frame-pointer -mmmx -msse -msse2 -fdelete-null-pointer-checks -funroll-loops -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig ccache cvs distlocks noauto noinfo sandbox sfperms sign&quot;
GENTOO_MIRRORS=&quot;ftp://ftp.ussg.iu.edu/pub/linux/gentoo&quot;
MAKEOPTS=&quot;-j4&quot;
PKGDIR=&quot;/mnt/space/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://gentoo/gentoo-portage&quot;
USE=&quot;X aalib acl acpi adns alsa apache2 avi bitmap-fonts cdr crypt cscope cups dedicated dga directfb dvd dvdr emu10k1 encode esd f77 fbcon flac flash foomaticdb fortran gd gd-external gdbm gif gpm gstreamer gtk gtk2 imagemagick imap imlib ipv6 joystick jpeg kde libwww mad maildir mikmod mmx moznocompose moznoirc moznomail mpeg mysql nas ncurses nls nocardbus nptl nptlonly offensive oggvorbis opengl oss pam pdflib perl php pic plotutils png pnp python quicktime readline samba sdl skey slp snmp socks5 speex spell sqlite sse ssl svga tcltk tcpd tiff truetype wavelan x86 xine xml xml2 xmms xv zlib video_cards_nvidia&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>henrik@brixandersen.dk</who>
            <bug_when>2004-11-29 12:46:55 0000</bug_when>
            <thetext>Looks weird - could you please attach the output of &apos;emerge -v --info&apos;?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2004-11-29 17:38:37 0000</bug_when>
            <thetext>it doesnt matter if i attach that, the sed stuff in src_unpack is still wrong

    sed -i &quot;s:ar:$(tc-getAR):&quot; \
        ${S}/Makefile

that generates this bad diff:
-       $(CC) -shared -o $@ -Wl,-soname,$@ $(LIBS) -lc $^
+       $(CC) -shi686-pc-linux-gnu-ared -o $@ -Wl,-soname,$@ $(LIBS) -lc $^

every single one of those sed statements should have a match clause:
&quot;/^AR/s:ar:$(tc-getAR):&quot;

also, they should all be joined into 1 big sed instead of many small ones</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>henrik@brixandersen.dk</who>
            <bug_when>2004-11-30 02:40:50 0000</bug_when>
            <thetext>Fixed.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>