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

Bug 784275

Summary: dev-java/aspectj please provide the aspectj compiler (ajc)
Product: Gentoo Linux Reporter: Alessandro Barbieri <lssndrbarbieri>
Component: Current packagesAssignee: Java team <java>
Status: CONFIRMED ---    
Severity: normal CC: fordfrog, ionen
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/21791
https://github.com/gentoo/gentoo/pull/21913
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 784350    
Bug Blocks:    
Attachments: Comparison of installed dev-java/aspectj and upstream aspectjweaver.jar

Description Alessandro Barbieri 2021-04-20 02:35:38 UTC
Is it possible to also provide aspectj-weaver or it needs another ebuild?
Comment 1 Larry the Git Cow gentoo-dev 2021-04-21 09:47:26 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbd9b0b3f46288849f0140971189310df9229e86

commit bbd9b0b3f46288849f0140971189310df9229e86
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2021-04-21 06:58:56 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2021-04-21 09:47:20 +0000

    dev-java/aspectj: bump to 1.9.6
    
    Closes: https://bugs.gentoo.org/601608
    Bug: https://bugs.gentoo.org/784275
    
    Package-Manager: Portage-3.0.17, Repoman-3.0.2
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Closes: https://github.com/gentoo/gentoo/pull/20484
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-java/aspectj/Manifest             |  1 +
 dev-java/aspectj/aspectj-1.9.6.ebuild | 45 +++++++++++++++++++++++++++++++++++
 dev-java/aspectj/metadata.xml         |  4 ++++
 3 files changed, 50 insertions(+)
Comment 2 Miroslav Šulc gentoo-dev 2021-04-21 17:47:53 UTC
Alessandro, the new version (1.9.6) has org.aspectj.weaver, is that what you meant? i did not check the older version whether it was part of the jar aswell. if that is what you meant, i suppose we can close this bug.
Comment 3 Alessandro Barbieri 2021-04-21 18:13:58 UTC
Thank you, I'll try it now. Having Weaver only in the last version is fine for me.
Comment 4 Alessandro Barbieri 2021-04-21 18:46:43 UTC
I can't see Weaver installed with the last version
Comment 5 Alessandro Barbieri 2021-04-21 19:02:35 UTC
Is it possible to also provide the aspectj compiler (ajc)?
Comment 6 Miroslav Šulc gentoo-dev 2021-04-21 19:47:45 UTC
if you try the following command, there's not what you need?

unzip -l /usr/share/aspectj/lib/aspectj.jar | grep weaver
Comment 7 Alessandro Barbieri 2021-04-21 20:21:08 UTC
https://github.com/bsc-performance-tools/extrae/blob/5ccdf0c5be70c33c03e2fa85d2bc082987d55d03/config/java.m4#L149

From here it wants an aspectjweaver.jar
Comment 8 Volkmar W. Pogatzki 2021-05-09 18:43:47 UTC
(In reply to Alessandro Barbieri from comment #7)
> https://github.com/bsc-performance-tools/extrae/blob/
> 5ccdf0c5be70c33c03e2fa85d2bc082987d55d03/config/java.m4#L149
> 
> From here it wants an aspectjweaver.jar

Doesn't it work with dev-java/aspectj-1.9.6?
If not, what's the error message?
Comment 9 Alessandro Barbieri 2021-05-10 00:04:26 UTC
configure will check first for aspect.jar, then for ajc and then for aspectweaver.jar

it expect them to be in the same tree structure as the one you have while manually installing the bundled jar from upstream
https://www.eclipse.org/downloads/download.php?file=/tools/aspectj/aspectj-1.9.6.jar

./lib
./lib/aspectjrt.jar
./lib/aspectjweaver.jar
./lib/aspectjtools.jar
./bin
./bin/ajc
./bin/ajbrowser
./bin/aj
./bin/aj5

checking for Java directory... found
checking for Java... /usr/lib64/openjdk-8/bin/java
checking for Java compiler... /usr/lib64/openjdk-8/bin/javac
checking for Java header and stub file generator... /usr/lib64/openjdk-8/bin/javah
checking for Java archive tool... /usr/lib64/openjdk-8/bin/jar
checking for Java include directories... found
checking for Java JVMTI header files... found
checking for AspectJ directory... found
checking for AspectJ compiler (ajc)... configure: error: Cannot find ajc within AspectJ given path!
Comment 10 Volkmar W. Pogatzki 2021-05-10 06:41:32 UTC
(In reply to Alessandro Barbieri from comment #9)
> configure will check first for aspect.jar, then for ajc and then for
> aspectweaver.jar
> 
> it expect them to be in the same tree structure as the one you have while
> manually installing the bundled jar from upstream
> https://www.eclipse.org/downloads/download.php?file=/tools/aspectj/aspectj-1.
> 9.6.jar
> 
> ./lib
> ./lib/aspectjrt.jar
> ./lib/aspectjweaver.jar
> ./lib/aspectjtools.jar
> [...]

Well, looks like there's clearly something wrong with the ebuild:
qlist aspectj | grep jar
/usr/share/aspectj/lib/aspectj.jar

The .jar files to be provided are:
* aspectjrt - the AspectJ runtime
* aspectjweaver - the AspectJ weaver
* aspectjtools - the AspectJ compiler
as listed on https://github.com/eclipse/org.aspectj#building
https://github.com/eclipse/org.aspectj/blob/master/pom.xml#L79-L83
Comment 11 Volkmar W. Pogatzki 2021-05-18 08:53:20 UTC
Created attachment 709632 [details]
Comparison of installed dev-java/aspectj and upstream aspectjweaver.jar

Running pkgdiff with the installed /usr/share/aspectj/lib/aspectj.jar and original aspectjweaver.jar confirms these are widely identical.  The installed however is missing some parts.
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-java/aspectj/aspectj-1.9.6.ebuild#n33
Comment 12 Larry the Git Cow gentoo-dev 2021-11-13 10:31:54 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20d3cca399a6e7c539802db54feabe96c4898a6b

commit 20d3cca399a6e7c539802db54feabe96c4898a6b
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2021-07-30 20:50:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-11-13 10:31:47 +0000

    dev-java/aspectj: bump to 1.9.7
    
    adds bcel-verifier which is needed for testing dev-java/asm:3
    provides aspectjweaver.jar and aspectjrt.jar
    Bug: https://bugs.gentoo.org/784275
    
    Package-Manager: Portage-3.0.20, Repoman-3.0.2
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Closes: https://github.com/gentoo/gentoo/pull/21913
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-java/aspectj/Manifest             |  1 +
 dev-java/aspectj/aspectj-1.9.7.ebuild | 79 +++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)
Comment 13 Alessandro Barbieri 2022-05-19 02:53:20 UTC
Reopening because only the jars are provided and the following binaries are missing
./bin/ajc
./bin/ajbrowser
./bin/aj
./bin/aj5