Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 74187

Summary: Can't emerge log4j with sun-jdk-1.5.0 regardless of USE-flags
Product: Gentoo Linux Reporter: Claes Mogren <cm>
Component: New packagesAssignee: Java team <java>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: 2004.3   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Claes Mogren 2004-12-12 06:05:22 UTC
All ebuilds for log4j fails to build with sun-jdk-1.5.0. With or without changeing the USE-flags. I have searched for log4j in the buglist and posted in bug #71636 without any replies. This is NOT a duplicate of that bug!


root@tyst> USE="-jikes -doc -javamail -jmx -jms" emerge  log4j                ~
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-java/log4j-1.2.9 to /
>>> md5 src_uri ;-) logging-log4j-1.2.9.tar.gz
>>> Unpacking source...
>>> Unpacking logging-log4j-1.2.9.tar.gz to /var/tmp/portage/log4j-1.2.9/work
tar: A lone zero block at 17639
>>> Source unpacked.
Buildfile: build.xml
  .
  .
  .
build.jms:

jmxCheck:

jmx:
     [echo] JMX is present.

build.jmx:
    [javac] Compiling 7 source files to /var/tmp/portage/log4j-1.2.9/work/logging-log4j-1.2.9/dist/classes
    [javac] /var/tmp/portage/log4j-1.2.9/work/logging-log4j-1.2.9/src/java/org/apache/log4j/jmx/Agent.java:7: package com.sun.jdmk.comm does not exist
    [javac] import com.sun.jdmk.comm.HtmlAdaptorServer;
    [javac]                          ^
    [javac] /var/tmp/portage/log4j-1.2.9/work/logging-log4j-1.2.9/src/java/org/apache/log4j/jmx/Agent.java:24: cannot find symbol
    [javac] symbol  : class HtmlAdaptorServer
    [javac] location: class org.apache.log4j.jmx.Agent
    [javac]     HtmlAdaptorServer html = new HtmlAdaptorServer();
    [javac]     ^
    [javac] /var/tmp/portage/log4j-1.2.9/work/logging-log4j-1.2.9/src/java/org/apache/log4j/jmx/Agent.java:24: cannot find symbol
    [javac] symbol  : class HtmlAdaptorServer
    [javac] location: class org.apache.log4j.jmx.Agent
    [javac]     HtmlAdaptorServer html = new HtmlAdaptorServer();
    [javac]                                  ^
    [javac] /var/tmp/portage/log4j-1.2.9/work/logging-log4j-1.2.9/src/java/org/apache/log4j/jmx/AppenderDynamicMBean.java:233: warning: non-varargs call of varargs method with inexact argument type for last parameter;
    [javac] cast to java.lang.Object for a varargs call
    [javac] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
    [javac]     return mu.readMethod.invoke(appender, null);
    [javac]                                               ^
    [javac] /var/tmp/portage/log4j-1.2.9/work/logging-log4j-1.2.9/src/java/org/apache/log4j/jmx/LayoutDynamicMBean.java:180: warning: non-varargs call of varargs method with inexact argument type for last parameter;
    [javac] cast to java.lang.Object for a varargs call
    [javac] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
    [javac]     return mu.readMethod.invoke(layout, null);
    [javac]                                             ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 3 errors
    [javac] 2 warnings

BUILD FAILED
/var/tmp/portage/log4j-1.2.9/work/logging-log4j-1.2.9/build.xml:261: Compile failed; see the compiler error output for details.

Total time: 6 seconds

!!! ERROR: dev-java/log4j-1.2.9 failed.
!!! Function src_compile, Line 36, Exitcode 1


It wants to build jmx even with the "-jmx" USE-flag, why?. My info is:

Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r4 i686)
=================================================================
System uname: 2.6.9-gentoo-r4 i686 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Nov 21 2004, 13:05:10)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r1
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -pipe -march=athlon-xp -msse2 -fforce-addr -fomit-frame-pointer -maccumulate-outgoing-args -fprefetch-loop-arrays -ffast-math -ftracer"
CHOST="i686-pc-linux-gnu"
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/lib/mozilla/defaults/pref /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="-O3 -pipe -march=athlon-xp -msse2 -fforce-addr -fomit-frame-pointer -maccumulate-outgoing-args -fprefetch-loop-arrays -ffast-math -ftracer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://ftp0.sunet.se/pub/Linux/distributions/gentoo ftp://ftp1.sunet.se/pub/Linux/distributions/gentoo http://trumpetti.atm.tut.fi/gentoo http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/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="3dnow X aalib alsa apache2 apm atlas avi bitmap-fonts blender-game bluetooth bonobo cdr crypt cups dba dga dvd dvdr encode esd evo f77 fam flac foomaticdb fortran gd gd-external gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml hal imagemagick imlib java jpeg junit ldap libg++ libwww mad mikmod mmx motif mozilla mpeg mysql ncurses nls nptl offensive oggvorbis opengl oss pam pdflib perl php png postgres python quicktime readline samba sdl session slang spell sse ssl svga tcltk tcpd tetex tiff truetype usb x86 xml xml2 xmms xv zlib"
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2004-12-12 12:20:12 UTC
Not all stuff does work with Java 5, yet. That's, why this package is hard masked.

Comment 2 Claes Mogren 2004-12-12 13:49:41 UTC
I tried with sun-jdk-1.4.05 too, but that didn't work either. But after I unmerged  dev-java/ant, dev-java/ant-core and dev-java/ant-tasks I could emerge ant-core and then log4j with 1.4. But then ant-tasks fails instead on this:

  .
  .
BUILD SUCCESSFUL
Total time: 13 seconds
... Cleaning Up Build Directories
... Done Bootstrapping Ant Distribution
Buildfile: build.xml

prepare:

check_for_optional_packages:

BUILD FAILED
java.lang.UnsupportedClassVersionError: org/apache/commons/logging/LogFactory (Unsupported major.minor version 49.0)

Total time: 2 seconds

!!! ERROR: dev-java/ant-tasks-1.6.2-r5 failed.
!!! Function src_compile, Line 68, Exitcode 1
!!! build failed

That was with the standard emerge. To get around that I set the nocommonslogging USE-flag, but instead go this:

BUILD FAILED
java.lang.UnsupportedClassVersionError: com/jcraft/jsch/Session (Unsupported major.minor version 49.0)

Finally, after adding the nojsch flag it compiled. Guess it had something to do with those tools being compiled with java-1.5.

Anyway, finally got ant back in. :') 
Comment 3 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-12-20 10:44:42 UTC
At the present time, you can not expect your system to work if you compile packages with the JDK 1.5 and back down to JDK 1.4 afterwards.

By default, the JDK 1.5 creates .class files that will only run on 1.5 and
newer. This is what bites you. Recompile all packages you compiled with
1.5.

We are gradually adding 1.5 support to all packages, see #69970.
Comment 4 Claes Mogren 2004-12-20 13:47:51 UTC
Thanks for the info! Bug 69970 looks like a good way to deal with this. :)
Comment 5 Jan Brinkmann (RETIRED) gentoo-dev 2005-01-05 04:48:05 UTC
we need only one bug to tell us that it's not possible at the moment to merge log4j using jdk-1.5, i think. :)

*** This bug has been marked as a duplicate of 71636 ***