Summary: | emerge groovy can't find asm-1 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jan Mentzel <jan_mentzel> |
Component: | New packages | Assignee: | Java team <java> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | howard_b_golden, max, shingole |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch to use asm-1.4.3.
groovy-1.0_beta4-r2.ebuild basescript-1.0_beta4 |
Description
Jan Mentzel
2004-07-02 05:40:47 UTC
sorry, forgot it ... # emerge info Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7) ================================================================= System uname: 2.6.7 i686 Intel(R) Pentium(R) M processor 1700MHz Gentoo Base System version 1.4.16 distcc 2.14 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium3 -msse2 -pipe -fomit-frame-pointer -funroll-loops -falign-functions=4" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /etc/tomcat /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -msse2 -pipe -fomit-frame-pointer -funroll-loops -falign-functions=4" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X acpi alsa apm arts avi berkdb cdr crypt cups encode foomaticdb gdbm gif gl gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mikmod mmx motif mpeg mysql ncurses nls oggvorbis opengl pam pdflib perl png postgresql python qt quicktime readline sdl slang spell sse ssl sun-jdk svga tcltk tcpd truetype video_cards_radeon x86 xml xml2 xmms xv zlib" I believe that line 38 in the groovy ebuild: java-pkg_jar-from asm-1 || die "Missing asm" should be changed to: java-pkg_jar-from asm || die "Missing asm" because the .jar file created by dev-java/asm-1.4.3 is in /usr/share/asm, not /usr/share/asm-1. This is because dev-java/asm-1.4.3 is SLOT="0" The above change will resolve the "can't find asm-1" However, after I do this, I still can't complete the compile of groovy. I get the following error messages: >>> emerge (2 of 2) dev-java/groovy-1.0_beta4-r1 to / >>> md5 src_uri ;-) groovy-1.0-beta-4-src.tar.gz >>> Unpacking source... >>> Unpacking groovy-1.0-beta-4-src.tar.gz to /var/tmp/portage/groovy-1.0_beta4-r1/work tar: A lone zero block at 5501 >>> Source unpacked. Buildfile: build.xml compile: [mkdir] Created dir: /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/target/classes [javac] Compiling 232 source files to /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/target/classes [javac] /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/src/main/org/codehaus/groovy/tools/Compiler.java:72: cannot resolve symbol [javac] symbol : class DumpClassVisitor [javac] location: package util [javac] import org.objectweb.asm.util.DumpClassVisitor; [javac] ^ [javac] /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/src/main/groovy/util/AntBuilder.java:343: warning: createElement(org.apache.tools.ant.Project,java.lang.Object,java.lang.String) in org.apache.tools.ant.IntrospectionHelper has been deprecated [javac] dataType = ih.createElement(getAntProject(), object, name.toLowerCase()); [javac] ^ [javac] /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/src/main/org/codehaus/groovy/tools/Compiler.java:336: cannot resolve symbol [javac] symbol : class DumpClassVisitor [javac] location: class org.codehaus.groovy.tools.Compiler [javac] DumpClassVisitor dumpVisitor = new DumpClassVisitor(new PrintWriter(new OutputStreamWriter(System.out))); [javac] ^ [javac] /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/src/main/org/codehaus/groovy/tools/Compiler.java:336: cannot resolve symbol [javac] symbol : class DumpClassVisitor [javac] location: class org.codehaus.groovy.tools.Compiler [javac] DumpClassVisitor dumpVisitor = new DumpClassVisitor(new PrintWriter(new OutputStreamWriter(System.out))); [javac] ^ [javac] 3 errors [javac] 1 warning BUILD FAILED /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/build.xml:34: Compile failed; see the compiler error output for details. Total time: 10 seconds !!! ERROR: dev-java/groovy-1.0_beta4-r1 failed. !!! Function src_compile, Line 60, Exitcode 1 !!! Failed to compile jar There is no org.objectweb.asm.util.DumpClassVisitor in /usr/share/asm/lib/asm-util.jar. According to the CVS entry, http://cvs.forge.objectweb.org/cgi-bin/viewcvs.cgi/asm/src/org/objectweb/asm/util/Attic/DumpClassVisitor.java, DumpClassVisitor has been renamed ASMifierClassVisitor. A patch is attached. Created attachment 34753 [details, diff]
Patch to use asm-1.4.3.
See previous comment for description of patch.
I did this: # emerge groovy Calculating dependencies ...done! >>> emerge (1 of 1) dev-java/groovy-1.0_beta4-r1 to / >>> md5 src_uri ;-) groovy-1.0-beta-4-src.tar.gz >>> Unpacking source... >>> Unpacking groovy-1.0-beta-4-src.tar.gz to /var/tmp/portage/groovy-1.0_beta4-r1/work tar: A lone zero block at 5501 [Ctrl]+[s] I replaced all "DumpClassVisitor" with "ASMifierClassVisitor" in /var/tmp/protage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/src/main/org/codehaus/groovy/tools/Compiler.java [Ctrl]+[q] >>> Source unpacked. Buildfile: build.xml compile: [mkdir] Created dir: /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/target/classes [javac] Compiling 232 source files to /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/target/classes [copy] Copying 4 files to /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/target/test-classes jar: [jar] Building jar: /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/target/groovy-1.0-beta-4.jar BUILD SUCCESSFUL Total time: 9 seconds groovyc: groovyc: No such file or directory !!! ERROR: dev-java/groovy-1.0_beta4-r1 failed. !!! Function src_compile, Line 74, Exitcode 127 !!! Failed to invoke groovyc --------------------------------------- but there is a "groovyc" ... I did a [Ctrl]+[s] directly after "UILD SUCCESSFUL" appeared. And then # pwd /var/tmp/portage # find -name groovyc ./groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/src/bin/groovyc ./groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/groovyc # for i in "`find -type f -name groovyc`"; do ls -l $i; done -rw-r--r-- 1 root root 3935 Jul 4 21:35 ./groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/groovyc -rw-r--r-- 1 root root 3909 Mar 12 17:28 ./groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/src/bin/groovyc h Let me give this a bash. Groovy has always been a bleeding mess. I have added some of your patches now, but it's still not compiling properly. Will try beta5. I have just tried groovy beta6, compiled using maven, which worked fine. Is gentoo against using maven as a build tool? Is this because maven handles the dependencies rather than gentoo? It's easy enough to take into account doc/jikes useflags through -D arguments to maven, and when the thing is actually run, we can use all the gentoo compiled libraries (as java links at runtime). Would it be useful for me therefore to provide a mavenized ebuild (I'm guessing answers to above questions will probably answer this one...) The problem with maven is that it downloads its down depencies, and it does it at build time (yes, you can turn the actual downloading off). This means that security patches and other critical fixes we add to our gentoo packages are being ignored by maven-built packages, as maven bundles all dependencies into the final release product. I simply don't see any point in every java project having their own, identical copy of the xml apis, for instance. Even more, when a bug is found in that version, all packages with it must be updated. You can ask maven to generate an ant build-script. That's what I did with the initial packaging of groovy, then I reworked it until it started making sense. If you have the time and inclination to do something similar, I'd be _REALLY_ impressed and much obliged. Frankly, I don't care if the build process uses maven or not, as long as 1) it doesn't download anything during the build 2) it uses Gentoo libraries, not its own libraries from the ibiblio repo 3) it builds *everything* from source code. I am finding similar build difficulties. However, in addition to the asm stuff, my "emerge groovy" seems to be unable to find the appropriate tomcat5 libaries. So groovy can't find the Servlet classes, for example: arbutus lib # emerge groovy Calculating dependencies ...done! >>> emerge (1 of 1) dev-java/groovy-1.0_beta4-r1 to / >>> md5 src_uri ;-) groovy-1.0-beta-4-src.tar.gz >>> Unpacking source... >>> Unpacking groovy-1.0-beta-4-src.tar.gz to /var/tmp/portage/groovy-1.0_beta4-r1/work tar: A lone zero block at 5501 >>> Source unpacked. Buildfile: build.xml compile: [mkdir] Created dir: /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/target/classes [javac] Compiling 232 source files to /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/target/classes [javac] /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/src/main/groovy/servlet/GroovyServlet.java:48: package javax.servlet does not exist [javac] import javax.servlet.ServletConfig; [javac] ^ I have tomcat-5.0.27-r4 installed. Who is supposed to set the CLASSPATH so that compiling stuff for tomcat5 works? Is this the developer, system or ebuild responsibility? Confused... --Stuart Now that Saleem is turning into the Maven wizard, perhaps he wants to employ some of his magic. Created attachment 55178 [details]
groovy-1.0_beta4-r2.ebuild
Using this ebuild (sorry, forgot to save the old one, so I cannot easily make a
patch), I'm able to build a working (?) groovy.
See the ebuild for comments.
Not the prettiest of solutions, but it seems to work. Needs a patch to
basescript as well.
Created attachment 55179 [details]
basescript-1.0_beta4
basescript patched to make certain variables overridable (necessary for the
ebuild to work).
Thanks, fixed |