<?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>160937</bug_id>
          
          <creation_ts>2007-01-08 16:42 0000</creation_ts>
          <short_desc>sys-apps/hwsetup-1.2 fails to build against sys-apps/pciutils-2.2.4</short_desc>
          <delta_ts>2007-01-31 18:11:31 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>Linux</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>agaffney@gentoo.org</reporter>
          <assigned_to>livecd@gentoo.org</assigned_to>
          <cc>ehmsen@gentoo.org</cc>
    
    <cc>sanchan@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>agaffney@gentoo.org</who>
            <bug_when>2007-01-08 16:42:30 0000</bug_when>
            <thetext>&gt;&gt;&gt; Compiling source in /var/tmp/portage/sys-apps/hwsetup-1.2/work/hwsetup-1.2 ...
i686-pc-linux-gnu-gcc -I/usr/include/kudzu -DBLACKLIST -Wall -fPIC -O2 -march=pentium4 -fomit-frame-pointer -pipe -s  -o hwsetup hwsetup.c -lkudzu -lpci
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libpci.a(names.o): In function `pci_load_name_list&apos;:
(.text+0x4a0): undefined reference to `gzopen&apos;
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libpci.a(names.o): In function `pci_load_name_list&apos;:
(.text+0x529): undefined reference to `gzgets&apos;
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libpci.a(names.o): In function `.L154&apos;:
(.text+0x618): undefined reference to `gzclose&apos;
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libpci.a(names.o): In function `.L154&apos;:
(.text+0x635): undefined reference to `gzeof&apos;
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libpci.a(names.o): In function `.L154&apos;:
(.text+0x6bc): undefined reference to `gzclose&apos;
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libpci.a(names.o): In function `.L154&apos;:
(.text+0xa98): undefined reference to `gzopen&apos;
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libpci.a(names.o): In function `.L155&apos;:
(.text+0xc03): undefined reference to `gzerror&apos;
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libpci.a(names.o): In function `.L155&apos;:
(.text+0xc25): undefined reference to `gzclose&apos;
collect2: ld returned 1 exit status
distcc[26691] ERROR: compile hwsetup.c on localhost failed
make: *** [hwsetup] Error 1


[ebuild   R   ] sys-apps/pciutils-2.2.4  0 kB</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>johan@bondeson.mine.nu</who>
            <bug_when>2007-01-08 17:53:31 0000</bug_when>
            <thetext>Adding -lz to the LDFLAGS in src_compile resolves this bug.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sanchan@gentoo.org</who>
            <bug_when>2007-01-10 18:49:01 0000</bug_when>
            <thetext>It fails also on normal systems:
&gt;&gt;&gt; Emerging (1 of 72) sys-apps/hwsetup-1.2 to /
 * hwsetup_1.2-3.tar.gz MD5 ;-) ...                                                                                                                                         [ ok ]
 * hwsetup_1.2-3.tar.gz RMD160 ;-) ...                                                                                                                                      [ ok ]
 * hwsetup_1.2-3.tar.gz SHA1 ;-) ...                                                                                                                                        [ ok ]
 * hwsetup_1.2-3.tar.gz SHA256 ;-) ...                                                                                                                                      [ ok ]
 * hwsetup_1.2-3.tar.gz size ;-) ...                                                                                                                                        [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                        [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                       [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                      [ ok ]
 * checking hwsetup_1.2-3.tar.gz ;-) ...                                                                                                                                    [ ok ]
&gt;&gt;&gt; Unpacking source...
&gt;&gt;&gt; Unpacking hwsetup_1.2-3.tar.gz to /var/tmp/portage/sys-apps/hwsetup-1.2/work
 * Applying hwsetup-1.2-dyn_blacklist.patch ...                                                                                                                             [ ok ]
 * Applying hwsetup-1.2-fastprobe.patch ...                                                                                                                                 [ ok ]
 * Applying hwsetup-1.2-gentoo.patch ...                                                                                                                                    [ ok ]
&gt;&gt;&gt; Source unpacked.
&gt;&gt;&gt; Compiling source in /var/tmp/portage/sys-apps/hwsetup-1.2/work/hwsetup-1.2 ...
x86_64-pc-linux-gnu-gcc -I/usr/include/kudzu -DBLACKLIST -Wall -fPIC -march=athlon64 -O2 -pipe  -s  -o hwsetup hwsetup.c -lkudzu -lpci
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libpci.a(names.o): In function `pci_load_name_list&apos;:
(.text+0x4e6): undefined reference to `gzopen&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libpci.a(names.o): In function `pci_load_name_list&apos;:
(.text+0x55f): undefined reference to `gzgets&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libpci.a(names.o): In function `pci_load_name_list&apos;:
(.text+0x693): undefined reference to `gzclose&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libpci.a(names.o): In function `pci_load_name_list&apos;:
(.text+0x82f): undefined reference to `gzclose&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libpci.a(names.o): In function `pci_load_name_list&apos;:
(.text+0x8f3): undefined reference to `gzeof&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libpci.a(names.o): In function `pci_load_name_list&apos;:
(.text+0xc2a): undefined reference to `gzopen&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libpci.a(names.o): In function `pci_load_name_list&apos;:
(.text+0xc51): undefined reference to `gzerror&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libpci.a(names.o): In function `pci_load_name_list&apos;:
(.text+0xc72): undefined reference to `gzclose&apos;
collect2: ld returned 1 exit status
make: *** [hwsetup] Error 1
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sanchan@gentoo.org</who>
            <bug_when>2007-01-10 18:49:20 0000</bug_when>
            <thetext># emerge --info
Portage 2.1.2_rc4-r7 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.8
Last Sync: Wed, 10 Jan 2007 17:20:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
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
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19
ACCEPT_KEYWORDS=&quot;amd64 ~amd64&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot; -march=athlon64 -O2 -pipe &quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /opt/jetty/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c&quot;
CXXFLAGS=&quot; -march=athlon64 -O2 -pipe &quot;
DISTDIR=&quot;/home/ftp/distfiles&quot;
EMERGE_DEFAULT_OPTS=&quot;--with-bdeps y&quot;
FEATURES=&quot;autoconfig ccache collision-protect cvs distlocks elog java-strict metadata-transfer multilib-strict sandbox sfperms sign strict stricter test userfetch userpriv&quot;
GENTOO_MIRRORS=&quot;http://mirror.switch.ch/ftp/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ &quot;
LANG=&quot;it_IT.utf8&quot;
LINGUAS=&quot;it&quot;
PKGDIR=&quot;/home/ftp/packages&quot;
PORTAGE_RSYNC_EXTRA_OPTS=&quot; --timeout=400 --progress &quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/overlays/portage&quot;
SYNC=&quot;rsync://rsync.europe.gentoo.org/gentoo-portage&quot;
USE=&quot;7zip X a52 aac acl acpi alsa amd64 amr aoss apache2 arts asf audiofile avahi bash-completion berkdb bitmap-fonts bl bzip2 cairo caps ccache cdb cddb cdparanoia cdr chroot cli cpudetection cracklib crypt css cups curl dba dbus devhelp dga directfb djvu dlloader dmi dovecot-sasl dri dts dv dvd dvdr dvdread dynagraph encode epydoc erandom esd exif expat extrafilters fame ffmpeg firefox flac fltk foomaticdb gd gdbm ggi gif gimp gimpprint glibc-omitfp glut gmp gnokii gnome gnutls gphoto2 gpm graphviz gtk gtkhtml guile hal howl-compat iconv idn ieee1394 imagemagick imlib ipv6 isdnlog ithreads java javacomm jbig jikes jpeg jpeg2k justify kde kdeenablefinal kdehiddenvisibility lcms ldap libcaca libg++ libnotify linuxthreads-tls lm_sensors logitech-mouse logrotate lzo mad mailwrapper matroska mbox mdb mhash mikmod mjpeg mmap mng motif mozdevelop mozsvg mp3 mpeg mpm-worker msn musepack musicbrainz mysql ncurses nfs nls nptl nptlonly nsplugin numeric nvidia odbc offensive ogg on-the-fly-crypt openexr opengl oss pam pcre pdf perl php png povray ppds pppd pulseaudio python qa qt3 qt3support qt4 quicktime rdesktop readline reflection restrict-javascript rtc samba scanner sdl session slang smime smp sndfile snmp speex spell spl ssl startup-notification subversion svg sysfs syslog tcltk tcpd test tetex tga theora threads tidy tiff timidity tk truetype truetype-fonts type1-fonts udev unicode usb userlocales utempter v4l v4l2 vcd vda vorbis vorbis-psy wma wmf wmp xcomposite xforms xine xinerama xml xorg xpm xscreensaver xv xvid xvmc yv12 zeroconf zlib&quot; ALSA_CARDS=&quot;intel8x0&quot; ALSA_PCM_PLUGINS=&quot;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&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;mouse evdev keyboard&quot; KERNEL=&quot;linux&quot; LINGUAS=&quot;it&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;nvidia nv&quot;
Unset:  CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, MAKEOPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>agaffney@gentoo.org</who>
            <bug_when>2007-01-10 19:08:11 0000</bug_when>
            <thetext>Looking at that output again, it looks like it&apos;s not actually hwsetup that has the problem. It looks like it&apos;s libpci&apos;s names.o that needs -lz.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sanchan@gentoo.org</who>
            <bug_when>2007-01-10 19:16:28 0000</bug_when>
            <thetext>Just to be sure, add -lz anyway to LDFLAGS. If it&apos;s already linked, it&apos;s not a problem. The problem is if it&apos;s not linked.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-01-10 22:08:31 0000</bug_when>
            <thetext>hwsetup sucks ... libpci.a is only a static archive so anything that uses it will need to pull in the libs for pciutils

that means you need to add -lz

also, hwsetup uses -s in compiling ... you should fix that too</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sanchan@gentoo.org</who>
            <bug_when>2007-01-22 10:45:12 0000</bug_when>
            <thetext>Fixing this is trivial, if you&apos;ve too much work to do I can commit the changes by myself:

--- hwsetup-1.2.ebuild.orig     2007-01-22 11:30:27.000000000 +0100
+++ hwsetup-1.2.ebuild  2007-01-22 11:34:49.000000000 +0100
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/sys-apps/hwsetup/hwsetup-1.2.ebuild,v 1.1 2007/01/05 19:44:46 wolf31o2 Exp $

-inherit eutils toolchain-funcs
+inherit eutils toolchain-funcs flag-o-matic

 MY_PV=${PV}-3
 DESCRIPTION=&quot;Hardware setup program from Knoppix - used only on LiveCD&quot;
@@ -29,7 +29,8 @@
 }

 src_compile() {
-       emake LDFLAGS=&quot;-s ${LDFLAGS}&quot; OPT=&quot;${CFLAGS}&quot; CC=&quot;$(tc-getCC)&quot; || die &quot;emake failed&quot;
+       append-ldflags -lz
+       emake LDFLAGS=&quot;${LDFLAGS}&quot; OPT=&quot;${CFLAGS}&quot; CC=&quot;$(tc-getCC)&quot; || die &quot;emake failed&quot;
 }

 src_install() {</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolf31o2@gentoo.org</who>
            <bug_when>2007-01-23 22:26:26 0000</bug_when>
            <thetext>I&apos;ll try to get to this tomorrow.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nyhm@gentoo.org</who>
            <bug_when>2007-01-24 08:36:08 0000</bug_when>
            <thetext>Why use append-ldflags for that?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolf31o2@gentoo.org</who>
            <bug_when>2007-01-31 18:11:31 0000</bug_when>
            <thetext>OK... this is FIXED now in CVS...

Thanks everyone...</thetext>
          </long_desc>
      
    </bug>

</bugzilla>