Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 306881 - media-libs/faac-1.28-r1 (because of libmp4v2) fails due to strcasestr ambiguity
Summary: media-libs/faac-1.28-r1 (because of libmp4v2) fails due to strcasestr ambiguity
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL: http://code.google.com/p/mp4v2/issues...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-25 21:53 UTC by Andrew John Hughes
Modified: 2011-03-06 11:30 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (faac-1.28-r1.log,26.63 KB, text/plain)
2010-02-25 21:54 UTC, Andrew John Hughes
Details
Configure log (faac-1.28-r1-config.log,98.63 KB, text/plain)
2010-03-08 14:53 UTC, Andrew John Hughes
Details
Fixes the issue by adding -std=c99 to CFLAGS (altivec.patch,388 bytes, patch)
2010-03-08 20:15 UTC, Andrew John Hughes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew John Hughes 2010-02-25 21:53:54 UTC
make[3]: Entering directory `/var/tmp/portage/media-libs/faac-1.28-r1/work/faac-1.28/common/mp4v2'
powerpc-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include   -Wall -O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb -MT 3gp.o -MD -MP -MF .deps/3gp.Tpo -c -o 3gp.o 3gp.cpp
powerpc-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include   -Wall -O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb -MT atom_amr.o -MD -MP -MF .deps/atom_amr.Tpo -c -o atom_amr.o atom_amr.cpp
powerpc-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include   -Wall -O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb -MT atom_avc1.o -MD -MP -MF .deps/atom_avc1.Tpo -c -o atom_avc1.o atom_avc1.cpp
powerpc-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include   -Wall -O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb -MT atom_avcC.o -MD -MP -MF .deps/atom_avcC.Tpo -c -o atom_avcC.o atom_avcC.cpp
powerpc-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include   -Wall -O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb -MT atom_d263.o -MD -MP -MF .deps/atom_d263.Tpo -c -o atom_d263.o atom_d263.cpp
In file included from mp4common.h:30,
                 from atom_amr.cpp:29:
mpeg4ip.h:126: error: new declaration ‘char* strcasestr(const char*, const char*)’
/usr/include/string.h:367: error: ambiguates old declaration ‘const char* strcasestr(const char*, const char*)’
atom_amr.cpp: In constructor ‘MP4AmrAtom::MP4AmrAtom(const char*)’:
atom_amr.cpp:33: warning: deprecated conversion from string constant to ‘char*’
atom_amr.cpp:36: warning: deprecated conversion from string constant to ‘char*’
atom_amr.cpp:38: warning: deprecated conversion from string constant to ‘char*’
atom_amr.cpp:41: warning: deprecated conversion from string constant to ‘char*’
atom_amr.cpp:43: warning: deprecated conversion from string constant to ‘char*’
make[3]: *** [atom_amr.o] Error 1


Reproducible: Always




Portage 2.2_rc63 (default/linux/powerpc/ppc64/10.0/32bit-userland/desktop, gcc-4.4.3, glibc-2.11-r1, 2.6.31-gentoo-r6.omega ppc64)
=================================================================
System uname: Linux-2.6.31-gentoo-r6.omega-ppc64-PPC970MP,_altivec_supported-with-gentoo-2.0.1
Timestamp of tree: Thu, 25 Feb 2010 02:45:03 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p2
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.0-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.51.0.6
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.32
ACCEPT_KEYWORDS="ppc ~ppc"
ACCEPT_LICENSE="@FSF-APPROVED-EXT @X11-LICENSES @PRESUMED-FOSS @CREATIVE-COMMONS adobe-ps freedist"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages installsources news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://gentoo.virginmedia.com/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/java-overlay /usr/local/portage/ppc64 /usr/local/portage/xmmsroot2_overlay /var/lib/layman/kde-sunset"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl addbookmarks alias alsa altivec asf autoreplace avahi bash-completion berkdb bindist bluetooth branding bzip2 cairo caps cdaudio cdda cddb cdparanoia cdr cli connectionstatus consolekit contactnotes cracklib crypt cups curl cvs cxx daap dbus dga dia dirac djvu dri dts dv dvd dvdnav dvdr dvdread dvi eds effects emacs emboss emf encode evo examples exif fam fame ffmpeg fftw firefox flac fortran fping gcc64 gcj gdbm gif gimp git gmp gnome gnome-keyring gnutls gpac gpgme gphoto2 gpm gstreamer gtk hal hfs highlight history iconv id3tag idn ieee1394 imagemagick imap imlib ipod ipv6 irc jack java java5 javascript jingle jpeg jpeg2k kde kerberos ladspa lame lapack latex lcms libnotify live lzma lzo mad matroska mbox mikmod mjpeg mmap mng modules mp2 mp3 mp4 mpeg mplayer mudflap musepack musicbrainz ncurses netmeeting network nls nntp nowlistening nptl nptlonly nsplugin ogg openal openexr opengl openmp optimisememory oss pam pcre pdf perl pidgin plotutils png pnm policykit pop postscript ppc ppds pppd pulseaudio python qt3 qt3support qt4 quicktime readline reflection rtc sasl scanner schroedinger sdl session shout slp smime smp sms smtp snmp sox speex spell spl sqlite ssl startup-notification statistics stream subtitles subversion svg sysfs syslog t1lib tcpd tetex texteffect tga theora threads thunar tiff translator truetype twolame unicode usb v4l2 vcd visualization vorbis vram webkit webpresence wifi wmf x264 xattr xchattext xcomposite xine xinerama xml xmmsroot2 xorg xscreensaver xulrunner xv xvid yahoo zeroconf zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en" RUBY_TARGETS="ruby18" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="nv fbdev" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Andrew John Hughes 2010-02-25 21:54:44 UTC
Created attachment 221223 [details]
Build log
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-02-26 15:18:10 UTC
The ebuild is using external libmp4v2, so this doesn't look right:

checking whether MP4Create is declared... no
checking whether MP4MetadataDelete is declared... no
configure: *** Building with internal mp4v2 ***

Also this is a dupe of bug 295484, see Comment #2 there
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2010-02-26 17:36:47 UTC

*** This bug has been marked as a duplicate of bug 295484 ***
Comment 4 Andrew John Hughes 2010-03-08 14:52:47 UTC
Reopening this bug because I can't reopen the other.

I was rebuilding faac because the system mp4v2 had been updated to 1.9.1. The tests fail in configure.  From config.log:

configure:14577: checking whether MP4Create is declared
configure:14577: powerpc-unknown-linux-gnu-gcc -c -O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb  conftest.c >&5
In file included from /usr/include/mp4v2/mp4v2.h:58,
                 from conftest.c:30:
/usr/include/mp4v2/general.h:265: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MP4Make3GPCompliant'
/usr/include/mp4v2/general.h:283: error: expected declaration specifiers or '...' before 'bool'
/usr/include/mp4v2/general.h:286: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MP4DeleteTrackEdit'
/usr/include/mp4v2/general.h:315: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MP4SetTrackEditMediaStart'
/usr/include/mp4v2/general.h:328: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MP4SetTrackEditDuration'
/usr/include/mp4v2/general.h:341: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MP4SetTrackEditDwell'
/usr/include/mp4v2/general.h:348: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MP4ReadSampleFromEditTime'

config.log attached.
Comment 5 Andrew John Hughes 2010-03-08 14:53:43 UTC
Created attachment 222671 [details]
Configure log
Comment 6 Andrew John Hughes 2010-03-08 15:06:42 UTC
Succeeds without setting CFLAGS:

./configure --prefix=/usr --build=powerpc-unknown-linux-gnu --host=powerpc-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib

but fails with setting them to ones used by portage:

CFLAGS="-O2 -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb" ./configure --prefix=/usr --build=powerpc-unknown-linux-gnu --host=powerpc-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib
Comment 7 Andrew John Hughes 2010-03-08 15:07:47 UTC
make succeeds when external libmp4v2 is found.
Comment 8 Andrew John Hughes 2010-03-08 15:23:37 UTC
-mcpu=G5 is breaking it.

CFLAGS="-O2 -mtune=G5 -mabi=altivec -pipe -ggdb" ./configure --prefix=/usr --build=powerpc-unknown-linux-gnu --host=powerpc-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib

External mp4v2 detected.

CFLAGS="-O2 -mtune=G5 -mcpu=G5 -pipe -ggdb" ./configure --prefix=/usr --build=powerpc-unknown-linux-gnu --host=powerpc-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib

Internal used.
Comment 9 Andrew John Hughes 2010-03-08 15:28:50 UTC
-mcpu=G5 is equivalent to -mcpu=power4 -maltivec.  Removing -maltivec causes the external libmp4v2 to be picked up.
Comment 10 Andrew John Hughes 2010-03-08 15:30:44 UTC
   * Compiling with `-maltivec' adds keywords `__vector', `vector',
     `__pixel', `pixel', `__bool' and `bool'.  When compiling ISO C,
     the context-sensitive substitution of the keywords `vector',
     `pixel' and `bool' is disabled.  To use them, you must include
     `<altivec.h>' instead.

Each of the problematic lines includes bool.
Comment 11 Andrew John Hughes 2010-03-08 15:49:38 UTC
Adding:

#if defined(__ALTIVEC__)
#undef bool
#endif

to /usr/include/libmp4v2/platform.h seems to fix it.
Comment 12 Rafał Mużyło 2010-03-08 16:50:57 UTC
Does 
#if defined(__ALTIVEC__)
#include <altivec.h>
#endif
work too ?
Comment 13 Rafał Mużyło 2010-03-08 17:01:20 UTC
Or rather (looking at altivec.h source) __APPLE_ALTIVEC__ .
Comment 14 Andrew John Hughes 2010-03-08 20:02:33 UTC
We don't want __APPLE_ALTIVEC__; that's a predefined compiler variable for Apple's GCC.

Including altivec.h doesn't help.  It seems there are two possible solutions:

* Add the addition to platform.h in the previous comment in the #ifndef __cplusplus__ section.  mp4v2 is written in C++, which is why it doesn't hit this issue.
* Add -std=c99 to faac which makes the build pass.

I prefer the latter as the effect is more localised.  Altering a system header could potentially break other packages.
Comment 15 Andrew John Hughes 2010-03-08 20:15:04 UTC
Created attachment 222717 [details, diff]
Fixes the issue by adding -std=c99 to CFLAGS
Comment 16 Andrew John Hughes 2010-03-08 20:15:46 UTC
Attached patch allows it to be emerged here.  Please apply to the ebuild.
Comment 17 Andrew John Hughes 2010-03-08 20:19:46 UTC
Patched version still builds fine on x86_64 too.
Comment 18 Samuli Suominen (RETIRED) gentoo-dev 2010-03-08 23:36:47 UTC
Andrew, you seem to have good grasp what's going wrong here, any chance you could report this to http://code.google.com/p/mp4v2 's ticketing system? mp4v2 got recently new upstream, so chances are we'd get this fixed upstream (either by adding the cflag to configure.ac or other way)

thanks
Comment 19 Brent Baude (RETIRED) gentoo-dev 2010-05-12 16:48:19 UTC
patch works fine for ppc64 too. is someone going to commit this?
Comment 20 Samuli Suominen (RETIRED) gentoo-dev 2010-05-12 17:03:48 UTC
(In reply to comment #19)
> patch works fine for ppc64 too. is someone going to commit this?
> 

nope. it won't go into portage before it's reported upstream[1] for inclusion, we won't be carrying this in ebuild

[1] http://code.google.com/p/mp4v2
Comment 21 Samuli Suominen (RETIRED) gentoo-dev 2010-07-04 12:28:12 UTC
Some of you might want to provide additional details to:

http://code.google.com/p/mp4v2/issues/detail?id=62

Futhermore the "same" issue was fixed in media-libs/openjpeg by:

sed -i 's:defined(HAVE_STDBOOL_H):1:' libopenjpeg/openjpeg.h || die #305333

So to keep this constant, can someone please try adding:

defined(HAVE_STDBOOL_H)

to platform.h and report it if works? 

I couldn't reproduce this problem in my ppc64 chroot...
Comment 22 Jeremy Noring 2010-07-26 20:17:42 UTC
I responded in the mp4v2 bug, but just to make sure you guys get it, I think you should take Andrew John Hughes' patch.  I do not believe mp4v2 can compile with std=c99 as it is C++.  It definitely doesn't make a lot of sense, since c99 defines a C standard.

http://code.google.com/p/mp4v2/issues/detail?id=62
Comment 23 matt 2010-10-06 19:44:04 UTC
added  (then removed ) -std=c99 to my cflags and faac compiles and works.  tested with a wav file and played it with mplayer.


matt@ibookx ~ $ emerge --info 
Portage 2.1.8.3 (default/linux/powerpc/ppc32/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.34 ppc)
=================================================================
System uname: Linux-2.6.34-ppc-7447A,_altivec_supported-with-gentoo-1.12.13
Timestamp of tree: Wed, 06 Oct 2010 16:15:01 +0000
distcc 3.1 powerpc-unknown-linux-gnu [disabled]
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.6.3-r1, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec -std=c99"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec -std=c99"
DISTDIR="/mnt/myusbdisk/data/distdir/"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US"
LC_ALL="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
PKGDIR="/mnt/myusbdisk/data/package_dir"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/myusbdisk/tmp/portage_tmpdir/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/nesicide /usr/local/portage/mupen64plus"
SYNC="rsync://192.168.168.16/portage"
USE="acl altivec berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl nptlonly openmp pam pcre ppc pppd qt3support readline reflection session ssl sysfs unicode xorg zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 24 Mike Hammill 2010-11-01 23:43:15 UTC
Just to report same error on ppc32 arch with:
CFLAGS="-mcpu=7450 -O2 -pipe -maltivec -mabi=altivec"
 ...
mpeg4ip.h:126: error: new declaration ‘char* strcasestr(const char*, const char*)’
/usr/include/string.h:367: error: ambiguates old declaration ‘const char* strcasestr(const char*, const char*)’
 ...
Comment 25 Benda Xu gentoo-dev 2010-11-19 15:01:24 UTC
same problem here.

Portage 2.1.9.24 (default/linux/powerpc/ppc64/10.0/32bit-userland, gcc-4.4.5, glibc-2.12.1-r3, 2.6.32-gentoo-r7 ppc64)
CFLAGS="-O2 -pipe -mcpu=G5 -mtune=G5 -maltivec -mabi=altivec -mno-altivec"


how about appending a CFLAGS of -mno-altivec in ebuild?
Comment 26 Steve Arnold archtester gentoo-dev 2011-01-24 00:05:56 UTC
Will someone please just bump wireless-tools and fix this one?  I hit it just today on a recent g4 install, which seems rather silly...
Comment 27 Steve Arnold archtester gentoo-dev 2011-01-24 00:07:50 UTC
Sorry, wrong pointless bug...  This one just needs the gcc switch, which seems fine considering comment #22 is correct.
Comment 28 Marc-Andre Landry 2011-02-22 03:45:07 UTC
Work for me. On a ppc 7400, altivec PowerMac3,1.

Using CFLAGS="-Os -mcpu=7400 -mtune=7400 -std=c99" as proposed patch. 
Comment 29 Marc-Andre Landry 2011-02-22 03:58:17 UTC
AS there seem to be a lot of confusion on this bug report. I hit the exactly same issue as reported by Andrew in the beginning. The discussion about using internal or external library doesn't apply to my consideration. I simply want to tell that this flags look to trigger a feature inside GCC that simply gave me the chance to successfully merge this library. I won't say I understand the magic going on here.
Comment 30 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2011-03-06 11:30:53 UTC
+  06 Mar 2011; Kacper Kowalik <xarthisius@gentoo.org> faac-1.28-r1.ebuild,
+  +files/faac-1.28-altivec.patch:
+  Add workaround for altivec wrt #306881. Thanks to Andrew John Hughes
+  <gnu_andrew@member.fsf.org> for report and thorough analysis.
+