<?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>87021</bug_id>
          
          <creation_ts>2005-03-28 12:52 0000</creation_ts>
          <short_desc>Error emergeing media-libs/libgii-0.9.9</short_desc>
          <delta_ts>2005-04-02 00:52:57 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>Library</component>
          <version>2004.3</version>
          <rep_platform>x86</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>jddavis@triad.rr.com</reporter>
          <assigned_to>chriswhite@gentoo.org</assigned_to>
          <cc>aphex@ihug.co.nz</cc>

      

      
          <long_desc isprivate="0">
            <who>jddavis@triad.rr.com</who>
            <bug_when>2005-03-28 12:52:17 0000</bug_when>
            <thetext> </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jddavis@triad.rr.com</who>
            <bug_when>2005-03-28 12:54:57 0000</bug_when>
            <thetext>After attempting to apply other various patches to libgii-0.9.0, emerge stops consistently at this poing:

cpuinfo.o(.text+0x28): In function `main&apos;:
/var/tmp/portage/libgii-0.9.0/work/libgii-0.9.0/demos/cpuinfo.c:34: undefined re ference to `ggGetSwarType&apos;
collect2: ld returned 1 exit status
make[2]: *** [cpuinfo] Error 1
make[2]: *** Waiting for unfinished jobs....
i686-pc-linux-gnu-gcc -march=athlon-xp -O3 -pipe -fPIC -D_REENTRANT -D_THREAD_SA FE -DDEBUG -g -Wall -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wswitch -Wmissing-prototypes -Wreturn-type -Wshadow -Wnested-externs -Wredundant-decls - Werror-implicit-function-declaration -o .libs/tasksched tasksched.o  ../gg/.libs /libgg.so -ldl -lpthread
creating tasksched
make[2]: Leaving directory `/var/tmp/portage/libgii-0.9.0/work/libgii-0.9.0/demo s&apos;
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/libgii-0.9.0/work/libgii-0.9.0&apos;
make: *** [all] Error 2

!!! ERROR: media-libs/libgii-0.9.0 failed.
!!! Function src_compile, Line 34, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jddavis@triad.rr.com</who>
            <bug_when>2005-03-28 12:55:48 0000</bug_when>
            <thetext>Emerge Info:
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.4.28-gentoo-r8 i686)
=================================================================
System uname: 2.4.28-gentoo-r8 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 27 2005, 12:06:46)]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.9.5, 1.7.9-r1, 1.6.3, 1.5, 1.4_p6, 1.8.5-r3
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.4.22, 2.4.22-r1, 2.4.19-r1
ACCEPT_KEYWORDS=&quot;x86 ~x86&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-march=athlon-xp -O3 -pipe -fPIC&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /etc/apache2-php5 /etc/cli-php5 /etc/joe /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-march=athlon-xp -O3 -pipe -fPIC&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs autoconfig ccache distlocks sandbox sfperms&quot;
GENTOO_MIRRORS=&quot;http://gentoo.mirrors.pair.com http://distro.ibiblio.org/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.mirrors.pair.com/ http://gentoo.seren.com/gentoo http://adelie.polymtl.ca/ rsync://ftp.snt.utwente.nl/gentoo ftp://sunsite.cnlab-switch.ch/mirror/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;x86 3dnow X \ aalib aim alsa apache2 apm arts audiofile avi bash-completion bcmath berkdb bin-dist bitmap-fonts bmp bonobo bzlib cdr crypt ctype cups curl curlwrappers dbn dbx dga dio direcfb directfb divx4linux dvd dvdr emboss encode esd ethereal evo exif fam fbcon fdftk flac flash foomaticdb fortran ftp gd gdbm ggi ghoto2 gif gnome gnutils gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imap imlib innodb ipv6 java jpeg kde kerberos ladcca lcms ldap lesstif libg++ libgda libwww mad makecheck mbox mcal mcrypt mhash mikmod mime ming mmap mmx mmx2 motif mozilla mp3 mpeg mysql mysqli ncurses nls odbc oggvorbis ogvorbis opengl oss pam pcntl pcre pda pdflib perl php pic plotutils png posix profile python qt quicktime readline samba scanner sdl session shared sharedmem simplexml slang sndfile snmp soap sockets speex spell spl ssl svg svga tcltk tcpd theora tidy tiff tokenizer truetype truetype-fonts type1-fonts uclib unicode usb vhosts wddx wmf wxwindows xine xls xml xml2 xmms xpm xv xvid zlib video_cards_radeon&quot;
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jddavis@triad.rr.com</who>
            <bug_when>2005-03-28 12:58:19 0000</bug_when>
            <thetext>I&apos;ve tried various CFLAG combinations but this didn&apos;t work.  Probelm for emerge seems to be solely held in failure of cpuinfo.c to compile.

I&apos;ve added two patches that bypass the demos section and allow libgii to compile and emerge successfully.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jddavis@triad.rr.com</who>
            <bug_when>2005-03-28 13:00:05 0000</bug_when>
            <thetext>Created an attachment (id=54713)
removes demos/ refs from source Makefile.in
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jddavis@triad.rr.com</who>
            <bug_when>2005-03-28 13:00:37 0000</bug_when>
            <thetext>Created an attachment (id=54714)
removes demos/ refs from source configure.in
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jddavis@triad.rr.com</who>
            <bug_when>2005-03-28 13:02:19 0000</bug_when>
            <thetext>Created an attachment (id=54715)
ebuild to apply demo removal patches during emerge
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>carlo@gentoo.org</who>
            <bug_when>2005-03-28 15:03:08 0000</bug_when>
            <thetext>Chris: I&apos;m pushing this to you, because you also take care of Bug 86941. The only application using this library is games-action/heroes, which would be a good good argument to force the games herd to take over maintainership, though. ;)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jddavis@triad.rr.com</who>
            <bug_when>2005-03-28 17:48:18 0000</bug_when>
            <thetext>Before this gets shoved over to games, I started the process to update media-video/vlc!

Also, while my fix below allows libgii to emerge. it does not fix the problem with the core routine that fails in the cpuinfo.c file:

`ggGetSwarType&apos;

This routine is also called in media-libs/libggi which seems to be dependent upon media-libs/libgii</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aphex@ihug.co.nz</who>
            <bug_when>2005-03-29 21:43:15 0000</bug_when>
            <thetext>ggGetSwarType is defined in the GII 0.9.x libs, specifically in libgg.so

I havn&apos;t looked into the demos problem, but they try to link with the library that was just built, libgg. So it may be that due to your MAKEOPTS, the demos start getting built before the actual lib is finished. Try dropping to -j1 and see if that works. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aphex@ihug.co.nz</who>
            <bug_when>2005-03-29 22:17:09 0000</bug_when>
            <thetext>Hmm scratch that, it just built fine for me...
And upon building with your precise CFLAGS, it then died for me.
I tracked it down to the -fPIC flag. Disable that and it should build fine.
And to be honest, you shouldn&apos;t have -fPIC/-fpic in global CFLAGS anyway.

This can be fixed by filtering the -fPIC flag in the ebuild with 
&quot;filter-flags -fPIC&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kloeri@gentoo.org</who>
            <bug_when>2005-04-02 00:52:57 0000</bug_when>
            <thetext>Thanks Dion for working out the cause of the build failure. -fPIC is now filtered in the ebuild.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>54713</attachid>
            <date>2005-03-28 13:00 0000</date>
            <desc>removes demos/ refs from source Makefile.in</desc>
            <filename>libgii-0.9.0-Makefile.in.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIE1ha2VmaWxlLmluLm9yZyAgICAgMjAwNS0wMy0yOCAxNToxOTowMS4wMDAwMDAwMDAgLTA1
MDAKKysrIE1ha2VmaWxlLmluIDIwMDUtMDMtMjggMTU6MTk6MDEuMDAwMDAwMDAwIC0wNTAwCkBA
IC0yNTQsNyArMjU0LDcgQEAKCiAjIG11bHRpcGxlIEFVVE9NQUtFX09QVElPTlMgbGluZXMgb25s
eSBjb25mdXNlcyBhdXRvbWFrZSAxLjYKIEFVVE9NQUtFX09QVElPTlMgPSAxLjQgZm9yZWlnbgot
U1VCRElSUyA9IGluY2x1ZGUgZ2cgZ2lpIGlucHV0IGZpbHRlciByZWdyZXNzIGRlbW9zIGRvYyBt
NCBkaXN0CitTVUJESVJTID0gaW5jbHVkZSBnZyBnaWkgaW5wdXQgZmlsdGVyIHJlZ3Jlc3MgZG9j
IG00IGRpc3QKIGdpaWNvbmZkYXRhZGlyID0gJHtzeXNjb25mZGlyfS8ke2dnaV9zdWJkaXJ9CiBn
aWljb25mZGF0YV9EQVRBID0gbGliZ2lpLmNvbmYKIERJU1RDTEVBTkZJTEVTID0gbGliZ2lpLmNv
bmYK
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>54714</attachid>
            <date>2005-03-28 13:00 0000</date>
            <desc>removes demos/ refs from source configure.in</desc>
            <filename>libgii-0.9.0-configure.in.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGNvbmZpZ3VyZS5pbi5vcmcgICAgMjAwNS0wMy0yOCAxNToxODowMi4wMDAwMDAwMDAgLTA1
MDAKKysrIGNvbmZpZ3VyZS5pbiAgICAgICAgMjAwNS0wMy0yOCAxNToxODowMi4wMDAwMDAwMDAg
LTA1MDAKQEAgLTkxNCw3ICs5MTQsNiBAQAogZmlsdGVyL2tleXRyYW5zL01ha2VmaWxlCiBmaWx0
ZXIvc2F2ZS9NYWtlZmlsZQogZmlsdGVyL3RjcC9NYWtlZmlsZQotZGVtb3MvTWFrZWZpbGUKIGlu
Y2x1ZGUvTWFrZWZpbGUKIGluY2x1ZGUvZ2dpL3N5c3RlbS5oCiBpbmNsdWRlL2dnaS9NYWtlZmls
ZQo=
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>54715</attachid>
            <date>2005-03-28 13:02 0000</date>
            <desc>ebuild to apply demo removal patches during emerge</desc>
            <filename>libgii-0.9.0.ebuild</filename>
            <type>application/octet-stream</type>
            <data encoding="base64">IyBEaXN0cmlidX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