Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55870 - emerge groovy can't find asm-1
Summary: emerge groovy can't find asm-1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-02 05:40 UTC by Jan Mentzel
Modified: 2005-10-18 01:31 UTC (History)
3 users (show)

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


Attachments
Patch to use asm-1.4.3. (Compiler.java.diff,934 bytes, patch)
2004-07-03 23:41 UTC, Howard B. Golden
Details | Diff
groovy-1.0_beta4-r2.ebuild (groovy-1.0_beta4-r1.ebuild,4.24 KB, text/plain)
2005-04-03 05:07 UTC, Eivind Tagseth
Details
basescript-1.0_beta4 (basescript-1.0_beta4,3.36 KB, text/plain)
2005-04-03 05:08 UTC, Eivind Tagseth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Mentzel 2004-07-02 05:40:47 UTC
emerge or ant can't find asm 

-------------------------------------------------
# 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                <<<<<< ?
Could not find package asm-1                  <<<<<< !!!!
>>> 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:71: package org.objectweb.asm does not exist
    [javac] import org.objectweb.asm.ClassWriter;
    [javac]                          ^
    [javac] /var/tmp/portage/groovy-1.0_beta4-r1/work/groovy-1.0-beta-4/src/main/org/codehaus/groovy/tools/Compiler.java:72: package org.objectweb.asm.util does not exist
...
    [javac] The system is out of resources.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.OutOfMemoryError

BUILD FAILED
file:/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: 7 seconds

!!! ERROR: dev-java/groovy-1.0_beta4-r1 failed.
!!! Function src_compile, Line 60, Exitcode 1
!!! Failed to compile jar
-------------------------------------------------

# emerge -p asm dev-java/ant

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

Calculating dependencies ...done!
[ebuild   R   ] dev-java/asm-1.4.3  
[ebuild     U ] dev-java/ant-1.6.1-r1 [1.5.4-r1] 
-------------------------------------------------

... before I had dev-java/ant-1.6.1-r1 but "emerge groovy" downgraded to 1.5.4-r1
Comment 1 Jan Mentzel 2004-07-02 05:43:20 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"
Comment 2 Howard B. Golden 2004-07-03 23:38:49 UTC
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.
Comment 3 Howard B. Golden 2004-07-03 23:41:03 UTC
Created attachment 34753 [details, diff]
Patch to use asm-1.4.3.

See previous comment for description of patch.
Comment 4 Jan Mentzel 2004-07-04 12:59:42 UTC
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
Comment 5 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-07-31 14:08:31 UTC
Let me give this a bash.
Comment 6 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-07-31 15:52:40 UTC
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.
Comment 7 Maxwell Grender-Jones 2004-08-03 13:19:33 UTC
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...)
Comment 8 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-08-22 05:18:07 UTC
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.
Comment 9 sritchie 2004-11-10 22:36:50 UTC
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
Comment 10 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-12-28 15:40:17 UTC
Now that Saleem is turning into the Maven wizard, perhaps he wants to employ some of his magic.
Comment 11 Eivind Tagseth 2005-04-03 05:07:21 UTC
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.
Comment 12 Eivind Tagseth 2005-04-03 05:08:31 UTC
Created attachment 55179 [details]
basescript-1.0_beta4

basescript patched to make certain variables overridable (necessary for the
ebuild to work).
Comment 13 Thomas Matthijs (RETIRED) gentoo-dev 2005-10-18 01:31:10 UTC
Thanks, fixed