Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120393 - dbus-0.60-r3 fials with gcc >=4 and USE="gcj"
Summary: dbus-0.60-r3 fials with gcc >=4 and USE="gcj"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Project Gentopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-26 02:25 UTC by Kristiaan Lenaerts
Modified: 2006-02-01 07:25 UTC (History)
0 users

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


Attachments
dbus-0.60-gcj.patch (dbus-0.60-gcj.patch,800 bytes, patch)
2006-01-26 02:28 UTC, Kristiaan Lenaerts
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kristiaan Lenaerts 2006-01-26 02:25:59 UTC
In gcc 4.x, gcj-jar is renamed to fastjar (or different program, not sure.).

The patch dbus-0.60-gcj.patch unconditionally changes jar to gcj-jar, and so it fails on gcc 4.x. I made a simple patch to configure.in that detects during configure which program is available, first gcj-jar and then fastjar. It works fine on my gcc4.1 system, and should work on other versions of gcc.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-01-26 02:27:35 UTC

*** This bug has been marked as a duplicate of 117960 ***
Comment 2 Kristiaan Lenaerts 2006-01-26 02:28:06 UTC
Created attachment 78143 [details, diff]
dbus-0.60-gcj.patch

this patch replaces the existing gcj patch, because JAR can't be set unconditionally for the configure detection to work.
Comment 3 Kristiaan Lenaerts 2006-01-26 02:32:36 UTC
not a duplicate, this bug only concerns problems with gcc >= 4.* and gcc, due to problems with the gcj patch.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-01-26 02:36:49 UTC
Reopen with actual error messages and emerge --info then, we don't change ebuilds and add patches just because someone submits them. Thanks.
Comment 5 Kristiaan Lenaerts 2006-01-26 08:46:55 UTC
here is all the info that could be usefull:


MAKEOPTS="-j1" FEATURES="-distcc" emerge -av --oneshot dbus

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-apps/dbus-0.60-r3  USE="X gcj gtk mono python xml2 -debug -doc -qt" 0 kB

...

mkdir .libs
gcj -g -O2 -Wl,-O1 -Wl,--sort-common -s -o .libs/test-message --main=TestMessage TestMessage.o  ../gcj/org/freedesktop/dbus/.libs/libdbus-gcj-1.so -L/var/tmp/portage/dbus-0.60-r3/work/dbus-0.60/gcj/org/freedesktop/dbus -lnsl
creating test-message
find org -type d -o -type f -name '*.class' | \
sed -e '/\/\./d' | \
gcj-jar cfM0E@ dbus-1.jar
/bin/sh: gcj-jar: command not found
make[3]: *** [dbus-1.jar] Error 127
make[3]: Leaving directory `/var/tmp/portage/dbus-0.60-r3/work/dbus-0.60/gcj'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dbus-0.60-r3/work/dbus-0.60/gcj'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dbus-0.60-r3/work/dbus-0.60'
make: *** [all] Error 2

!!! ERROR: sys-apps/dbus-0.60-r3 failed.
!!! Function src_compile, Line 106, Exitcode 2
!!! make failed
!!! If you need support, post the topmost build error, NOT this status message.




emerge --info

Portage 2.1_pre3-r1 (default-linux/x86/2005.0, gcc-4.1.0-beta20060120, glibc-2.3.6-r2, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 Intel(R) Pentium(R) M processor 1.50GHz
Gentoo Base System version 1.12.0_pre15
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r8, 2.15.97, 2.16.1-r1, 2.16.90.0.3, 2.16.91.0.1, 2.16.91.0.4, 2.16.91.0.5
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer -g -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer -g -ggdb -ffriend-injection -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distcc distlocks fixpackages sandbox sfperms splitdebug strict strip"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -s"
MAKEOPTS="-s -j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/bmg-main"
SYNC="rsync://cube/portage"
USE="x86 X a52 aac aalib acl acpi alsa apm artworkextra audiofile beagle berkdb bitmap-fonts browserplugin bzip2 cairo cddb cdparanoia cdr crypt cups curl dbus dga divx4linux djbfft dlloader dmx dpms dri dts dv dvd dvdr dvdread dvi ecc eds emboss encode erandom ethereal evo evolution exif expat fam fame ffmpeg fla flac foomaticdb fortran ftp gcj gd gdbm gif gimpprint gksu glitz glut gmail gmp gnome gnomedb gnutls gphoto2 gpm grammar graphviz gstreamer gstreamer10 gtk gtk2 gtkhtml guile hal icq icu idea idn imagemagick imap imlib jabber java javacomm jikes jpeg junit kerberos lame lcms ldap libcaca libg++ libgda libwww lzo mad math matroska mikmod mime mjpeg mmap mmx mmx2 mmxext mng mono motif mozilla moznocompose moznoirc moznomail mp3 mpeg mpi mplayer msn nautilus ncurses nls nptl nptlonly nsplugin ogg oggvorbis openal opengl oss pam pcmcia pcre pdf pdflib perl pic pie plotutils png pnp pop posix postscript povray ppd profile python quicktime radeon readline real rtc ruby samba sdl slang sox speex spell spreadsheet sqlite sse sse2 ssl svg svga t1lib tcltk tcpd tetex theora thesaurus threads tiff transcode truetype truetype-fonts type1-fonts udev unicode usb userlocales videos vidix vorbis win32codecs wmf wordperfect wv wxwindows x264 xanim xinerama xml xml2 xprint xv xvid xvmc yv12 zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, LC_ALL, LINGUAS

gcc -v

Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/gcc-4.1.0_beta20060120/work/gcc-4.1-20060120/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.0-beta20060120 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.0-beta20060120/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20060120 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20060120/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20060120/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.0-beta20060120/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --enable-java-awt=gtk --enable-languages=c,c++,java,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.0-beta20060120  (prerelease)

locate gcj-jar

/usr/i686-pc-linux-gnu/gcc-bin/3.4.4/gcj-jar

locate fastjar

/usr/lib/debug/usr/i686-pc-linux-gnu/gcc-bin/4.1.0-beta20060120/fastjar.debug
/usr/i686-pc-linux-gnu/gcc-bin/4.0.2/fastjar
/usr/i686-pc-linux-gnu/gcc-bin/4.1.0-beta20060120/fastjar
/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/info/fastjar.info.gz
/usr/share/gcc-data/i686-pc-linux-gnu/4.0.2/man/man1/fastjar.1.gz
/usr/share/gcc-data/i686-pc-linux-gnu/4.0.2/info/fastjar.info.gz
/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20060120/man/man1/fastjar.1.gz
/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20060120/info/fastjar.info.gz


replacing gcj-jar with fastjar in the current patch solves the problem for gcc-4.x, but this is of course not acceptable, it would break backward compitibility. The patch I attached solves that, by detecting the available jar-program.

Also, when checking the version on gcj-jar with /usr/i686-pc-linux-gnu/gcc-bin/3.4.4/gcj-jar -V, I get:

jar (fastjar) 0.92-gcc

Copyright 1999, 2000, 2001  Bryan Burns
Copyright 2002 Free Software Foundation
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

so it's just renamed in gcc < 4.0...
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2006-02-01 07:25:22 UTC
fixed on dbus-0.60-r4. Thank you.