Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 297721 - media-sound/mac-3.99.4.5.4 fail to build with gcc-4.4.2
Summary: media-sound/mac-3.99.4.5.4 fail to build with gcc-4.4.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-21 01:45 UTC by Yu Yuwei
Modified: 2009-12-23 13:04 UTC (History)
1 user (show)

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


Attachments
patch for strstr (mac-3.99.4.5.4-strstr.patch,1.16 KB, patch)
2009-12-21 01:46 UTC, Yu Yuwei
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yu Yuwei 2009-12-21 01:45:53 UTC
strstr is strstr(char *, const char*) in c++

Reproducible: Always

Steps to Reproduce:
1. emerge mac-3.99.4.5.4


Actual Results:  
APECompressCreate.cpp: In member function 'int CAPECompressCreate::FinalizeFile(CIO*, int, int, const void*, int, int, int, const void*, int)':
APECompressCreate.cpp:282: error: invalid conversion from 'const char*' to 'char*'
APECompressCreate.cpp:289: error: invalid conversion from 'const char*' to 'char*'
distcc[32505] ERROR: compile APECompressCreate.cpp on localhost failed
make[3]: *** [APECompressCreate.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/var/tmp/portage/media-sound/mac-3.99.4.5.4/work/mac-3.99-u4-b5-s4/src/MACLib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-sound/mac-3.99.4.5.4/work/mac-3.99-u4-b5-s4/src/MACLib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-sound/mac-3.99.4.5.4/work/mac-3.99-u4-b5-s4/src'
make: *** [all-recursive] Error 1
 * ERROR: media-sound/mac-3.99.4.5.4 failed:
 *   emake failed
 * 
 * Call stack:
 *     ebuild.sh, line   55:  Called src_compile
 *   environment, line 2904:  Called _eapi2_src_compile
 *     ebuild.sh, line  647:  Called die
 * The specific snippet of code:
 *   		emake || die "emake failed"
 * 
 * If you need support, post the output of 'emerge --info =media-sound/mac-3.99.4.5.4',
 * the complete build log and the output of 'emerge -pqv =media-sound/mac-3.99.4.5.4'.
 * The complete build log is located at '/var/tmp/portage/media-sound/mac-3.99.4.5.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-sound/mac-3.99.4.5.4/temp/environment'.
 * S: '/var/tmp/portage/media-sound/mac-3.99.4.5.4/work/mac-3.99-u4-b5-s4'

>>> Failed to emerge media-sound/mac-3.99.4.5.4, Log file:

>>>  '/var/tmp/portage/media-sound/mac-3.99.4.5.4/temp/build.log'


Expected Results:  
successful compile

see attached patch
Comment 1 Yu Yuwei 2009-12-21 01:46:31 UTC
Created attachment 213631 [details, diff]
patch for strstr
Comment 2 Yu Yuwei 2009-12-21 01:48:04 UTC
emerge --info

Portage 2.2_rc59 (default/linux/x86/10.0/desktop, gcc-4.4.2, glibc-2.11-r1, 2.6.32-gentoo i686)
=================================================================
System uname: Linux-2.6.32-gentoo-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3600+-with-gentoo-2.0.1
Timestamp of tree: Wed, 16 Dec 2009 01:45:03 +0000
distcc 3.1 i686-pc-linux-gnu [enabled]
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4, 3.1.1-r1
dev-python/pycrypto: 2.0.1-r8
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.3
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=k8 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distcc distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirrors.xmu.edu.cn/gentoo http://gentoo.aditsu.net/ ftp://ftp3.tsinghua.edu.cn/mirror/gentoo"
LANG="zh_CN.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,--as-needed"
LINGUAS="zh_CN"
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/portage/local/layman/openmoko/trunk/openmoko-target /usr/portage/local/layman/gentoo-china /usr/portage/local/layman/acevery /usr/portage/local/layman/mpd /usr/portage/local/layman/acevery-openmoko"
SYNC="rsync://mirrors.xmu.edu.cn/gentoo-portage"
USE="3dnow X a52 aac acl acpi alsa apache2 asf avahi bash-completion berkdb branding bzip2 cairo cdr cjk cleartype cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode evo exif faac faad fam ffmpeg firefox flac fortran fts3 fuse gdbm gif gimp gnome gnutls gpm gstreamer gtk gtk2 hal iconv iptc ipv6 jpeg jpeg2k lame ldap libnotify lunar mad mikmod mmx modules mp3 mp4 mpeg mudflap mysql nautilus ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png ppds pppd pulseaudio python qt3support quicktime raw readline reflection samba sdl session spell spl sqlite sse sse2 ssl startup-notification svg sysfs tcpd threads thunar tiff truetype unicode usb vim vim-syntax vorbis wav win32codecs wmf x264 x86 xattr xft xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" FOO2ZJS_DEVICES="hpp1008" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN" QEMU_SOFTMMU_TARGETS="arm i386" QEMU_USER_TARGETS="arm" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-12-21 05:30:32 UTC
(In reply to comment #1)
> Created an attachment (id=213631) [details]
> patch for strstr
> 

Better suited for upstream directly. But, I'll assign it to the gentoo maintainers for now. Thanks.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2009-12-21 10:21:54 UTC
Adding billie@ to CC since he committed this...
Comment 5 Daniel Pielmeier gentoo-dev 2009-12-21 11:11:24 UTC
I am on stable gcc, so I did not notice this. I can add this to the already existing gcc44.patch.

@Yu Yuwei: Thanks for the patch. It looks like you have posted the inverse changes. Shouldn't it be "(const char *)" in the end?
Comment 6 Yu Yuwei 2009-12-21 14:09:13 UTC
(In reply to comment #5)
> I am on stable gcc, so I did not notice this. I can add this to the already
> existing gcc44.patch.
> 
> @Yu Yuwei: Thanks for the patch. It looks like you have posted the inverse
> changes. Shouldn't it be "(const char *)" in the end?
> 
Hi Daniel, I found that from the prototype in /usr/include/string.h, which belongs to glibc-2.11-r1. 

You can see that when strstr use in C++, the first parameter is char * :)

It is declared as below:

/* Find the first occurrence of NEEDLE in HAYSTACK.  */
#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
extern "C++"
{
extern char *strstr (char *__haystack, __const char *__needle)
     __THROW __asm ("strstr") __attribute_pure__ __nonnull ((1, 2));
extern __const char *strstr (__const char *__haystack,
			     __const char *__needle)
     __THROW __asm ("strstr") __attribute_pure__ __nonnull ((1, 2));

# ifdef __OPTIMIZE__
__extern_always_inline char *
strstr (char *__haystack, __const char *__needle) __THROW
{
  return __builtin_strstr (__haystack, __needle);
}

__extern_always_inline __const char *
strstr (__const char *__haystack, __const char *__needle) __THROW
{
  return __builtin_strstr (__haystack, __needle);
}
# endif
}
#else
extern char *strstr (__const char *__haystack, __const char *__needle)
     __THROW __attribute_pure__ __nonnull ((1, 2));
#endif

Comment 7 Yu Yuwei 2009-12-21 14:11:06 UTC
(In reply to comment #5)
> @Yu Yuwei: Thanks for the patch. It looks like you have posted the inverse
> changes. Shouldn't it be "(const char *)" in the end?
> 

In fact, the patch didn't touch the diffs of the gcc4 patch :)
Comment 8 Daniel Pielmeier gentoo-dev 2009-12-21 14:46:29 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > @Yu Yuwei: Thanks for the patch. It looks like you have posted the inverse
> > changes. Shouldn't it be "(const char *)" in the end?
> > 
> In fact, the patch didn't touch the diffs of the gcc4 patch :)

Okay I will create a new gcc44.patch which includes your diffs.
Comment 9 Yu Yuwei 2009-12-21 15:30:12 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #5)
> > > @Yu Yuwei: Thanks for the patch. It looks like you have posted the inverse
> > > changes. Shouldn't it be "(const char *)" in the end?
> > > 
> > In fact, the patch didn't touch the diffs of the gcc4 patch :)
> 
> Okay I will create a new gcc44.patch which includes your diffs.
> 
Thanks Daniel :)
Comment 10 Daniel Pielmeier gentoo-dev 2009-12-21 17:07:54 UTC
+  21 Dec 2009; Daniel Pielmeier <billie@gentoo.org> mac-3.99.4.5.4.ebuild,
+  +files/mac-3.99.4.5.4-gcc44.patch:
+  Update gcc-4.4 patch. Thanks to Yu Yuwei in bug #297721.

I have just updated the patch. The changes should be available in a few hours. Please test as I have no gcc-4.4 available.
Comment 11 Yu Yuwei 2009-12-22 00:54:24 UTC
(In reply to comment #10)
> +  21 Dec 2009; Daniel Pielmeier <billie@gentoo.org> mac-3.99.4.5.4.ebuild,
> +  +files/mac-3.99.4.5.4-gcc44.patch:
> +  Update gcc-4.4 patch. Thanks to Yu Yuwei in bug #297721.
> 
> I have just updated the patch. The changes should be available in a few hours.
> Please test as I have no gcc-4.4 available.
> 

thanks, I will try it later :)
Comment 12 Yu Yuwei 2009-12-22 07:15:43 UTC
(In reply to comment #10)
> +  21 Dec 2009; Daniel Pielmeier <billie@gentoo.org> mac-3.99.4.5.4.ebuild,
> +  +files/mac-3.99.4.5.4-gcc44.patch:
> +  Update gcc-4.4 patch. Thanks to Yu Yuwei in bug #297721.
> 
> I have just updated the patch. The changes should be available in a few hours.
> Please test as I have no gcc-4.4 available.
> 

successfully emerged, Thanks :)
Comment 13 Daniel Pielmeier gentoo-dev 2009-12-22 14:38:26 UTC
Thanks for your report.
Comment 14 Yu Yuwei 2009-12-23 13:04:15 UTC
My pleasure.

(In reply to comment #13)
> Thanks for your report.
>