Bug 72909 - [patch] app-text/chasen fails to compile (gcc 3.4.x problem)
|
Bug#:
72909
|
Product: Gentoo Linux
|
Version: 2004.3
|
Platform: All
|
|
OS/Version: Linux
|
Status: CLOSED
|
Severity: normal
|
Priority: P3
|
|
Resolution: FIXED
|
Assigned To: cjk@gentoo.org
|
Reported By: nigoro@gentoo.org
|
|
Component: Applications
|
|
|
URL:
|
|
Summary: [patch] app-text/chasen fails to compile (gcc 3.4.x problem)
|
|
Keywords: Inclusion
|
|
Status Whiteboard:
|
|
Opened: 2004-11-30 04:47 0000
|
In my environment, the following error occurs and fails to compile.
I think that this problem relates to gcc 3.4.x.
source='dartsdic.cpp' object='dartsdic.lo' libtool=yes \
depfile='.deps/dartsdic.Plo' tmpdepfile='.deps/dartsdic.TPlo' \
depmode=gcc3 /bin/sh ../depcomp \
/bin/sh ../libtool --mode=compile g++ -DRCPATH="\"/etc/chasenrc\"" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/include -O2 -pipe -fPIC -c -o dartsdic.lo `test -f dartsdic.cpp || echo './'`dartsdic.cpp
rm -f .libs/dartsdic.lo
g++ -DRCPATH=\"/etc/chasenrc\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/include -O2 -pipe -fPIC -c dartsdic.cpp -MT dartsdic.lo -MD -MP -MF .deps/dartsdic.TPlo -fPIC -DPIC -o .libs/dartsdic.lo
dartsdic.cpp: In function `int da_build_dump(da_build_t*, char*, FILE*)':
dartsdic.cpp:187: error: ISO C++ forbids cast to non-reference type used as lvalue
make[2]: *** [dartsdic.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/chasen-2.4.0_pre1/work/chasen-2.4.0-preview1/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/chasen-2.4.0_pre1/work/chasen-2.4.0-preview1'
make: *** [all] Error 2
emerge info output:
Portage 2.0.51-r3 (default-ppc64-2004.3, gcc-3.4.1, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r4 ppc64)
=================================================================
System uname: 2.6.9-gentoo-r4 ppc64 PPC970, altivec supported
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.3-r3
Headers: sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="ppc64"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe"
CHOST="powerpc64-unknown-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /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/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 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks sandbox"
GENTOO_MIRRORS="http://mirror.gentoo.gr.jp/"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.jp.gentoo.org/gentoo-portage"
USE="X Xaw3d aalib alsa altivec apache2 arts berkdb bitmap-fonts cdr chasen cjk crypt cups dga dvd dvdr emacs encode esd f77 flac flash foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imagemagick imap imlib jack joystick jpeg kakasi kde libwww lirc mad mikmod mitshm motif mozilla mpeg mule ncurses nls nogcj nptl oggvorbis opengl oss pam pdflib perl png ppc64 python qt quicktime readline samba sdl slang sndfile ssl tcpd tetex theora tiff truetype unicode usb xanim xml xml2 xmms xv xvid zlib"
Yes, it's related to gcc34. All sources with chasen
have this problem (I made shinji package, available
at http://sourceforge.jp/projects/shinji/ yesterday,
and it also contains this bug)
Probablly
+ keys[size] = const_cast<char*>(key.data());
is better?
I made a revision bump, which includes Yuta's patch.
Markus