Bug 87021 - Error emergeing media-libs/libgii-0.9.9
Bug#: 87021 Product:  Gentoo Linux Version: 2004.3 Platform: x86
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: chriswhite@gentoo.org Reported By: jddavis@triad.rr.com
Component: Library
URL: 
Summary: Error emergeing media-libs/libgii-0.9.9
Keywords:  
Status Whiteboard: 
Opened: 2005-03-28 12:52 0000
Description:   Opened: 2005-03-28 12:52 0000

    

------- Comment #1 From John D. Davis 2005-03-28 12:54:57 0000 -------
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':
/var/tmp/portage/libgii-0.9.0/work/libgii-0.9.0/demos/cpuinfo.c:34: undefined
re ference to `ggGetSwarType'
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'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/libgii-0.9.0/work/libgii-0.9.0'
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.

------- Comment #2 From John D. Davis 2005-03-28 12:55:48 0000 -------
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="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fPIC"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/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"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fPIC"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="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"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="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"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY


------- Comment #3 From John D. Davis 2005-03-28 12:58:19 0000 -------
I've tried various CFLAG combinations but this didn't work.  Probelm for emerge
seems to be solely held in failure of cpuinfo.c to compile.

I've added two patches that bypass the demos section and allow libgii to
compile and emerge successfully.

------- Comment #4 From John D. Davis 2005-03-28 13:00:05 0000 -------
Created an attachment (id=54713) [details]
removes demos/ refs from source Makefile.in

------- Comment #5 From John D. Davis 2005-03-28 13:00:37 0000 -------
Created an attachment (id=54714) [details]
removes demos/ refs from source configure.in

------- Comment #6 From John D. Davis 2005-03-28 13:02:19 0000 -------
Created an attachment (id=54715) [details]
ebuild to apply demo removal patches during emerge

------- Comment #7 From Carsten Lohrke 2005-03-28 15:03:08 0000 -------
Chris: I'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.
;)

------- Comment #8 From John D. Davis 2005-03-28 17:48:18 0000 -------
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'

This routine is also called in media-libs/libggi which seems to be dependent
upon media-libs/libgii

------- Comment #9 From Dion Sole 2005-03-29 21:43:15 0000 -------
ggGetSwarType is defined in the GII 0.9.x libs, specifically in libgg.so

I havn'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. 

------- Comment #10 From Dion Sole 2005-03-29 22:17:09 0000 -------
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't have -fPIC/-fpic in global CFLAGS anyway.

This can be fixed by filtering the -fPIC flag in the ebuild with 
"filter-flags -fPIC"

------- Comment #11 From Bryan Østergaard (RETIRED) 2005-04-02 00:52:57 0000 -------
Thanks Dion for working out the cause of the build failure. -fPIC is now
filtered in the ebuild.