Emerge of both x86 and ~x86 versions of app-misc/endeavour fails with message: string.cpp:31: error: declaration of `char* strcasestr(const char*, const char*)' throws different exceptions ../include/string.h:46: error: than previous declaration `char* strcasestr(const char*, const char*) throw ()' string.cpp: In function `char* strcasestr(const char*, const char*)': string.cpp:221: error: declaration of `char* strcasestr(const char*, const char*)' throws different exceptions string.cpp:31: error: than previous declaration `char* strcasestr(const char*, const char*) throw ()' make[1]: *** [string.o] Error 1 Reproducible: Always Steps to Reproduce: 1.emerge endeavour 2. 3. Actual Results: Will attach full results of "emerge -v endeavour" and "strace emerge -v endeavour" in next post Expected Results: Install box /home/sven # emerge --info Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r4 i686) ================================================================= System uname: 2.6.11-gentoo-r4 i686 AMD Athlon(tm) XP 2400+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 17 2005, 11:22:49)] ccache version 2.3 [enabled] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.easynet.nl/mirror/gentoo/ http://ftp.easynet.nl/mirror/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X aalib acpi alsa apm avi berkdb bitmap-fonts canna cdr crypt cups curl dga directfb divx4linux dnd dvd dvdr emacs emboss encode esd esk fam fbcon flac flash foomaticdb fortran freetype gdbm gif gpm gtk gtk2 guile icq imagemagick imlib ipv6 jabber jack java joystick jpeg kde leim libg++ libwww lirc mad mikmod mmx motif mp3 mpeg mule ncurses nls nptl nvidia oggvorbis opengl oscar oss pam pdflib perl png python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd tetex threads tiff tls truetype truetype-fonts type1-fonts unicode videos xml xml2 xmms xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Created attachment 54171 [details] Output from : emerge -v endeavour
Created attachment 54270 [details] possibly ugly way of fixing the problem Hm, changing the definition of the critical function to look like strcasestr(const char*, const char*)throw() on line 31 and 221 of the string.cpp file does the trick. However, I am not altogether sure that that is a good idea... Alternatively, I assume, one would have to stop the program from accessing /usr/include/string.h so that it accesses the program supplied /usr/tmp/portage/endeavour... .../endeavour-2.4.6/include/string.h instead. I have no idea how to do that, though.
A possibly simpler solution I tried this morning (but don't know how to fix into an ebuild). rename string.cpp into string.c before compiling. The problem is that string.h defines strcatstr as a function with "C" conventions, whereas the function is declared with c++ conventions in string.c
it's a bug in gcc-3.3.x ... gcc-3.4.x doesnt mind the code at all ...
*** This bug has been marked as a duplicate of 85780 ***