Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 742554 - dev-java/stringtemplate: /usr/share/stringtemplate-4/package.env causes dev-java/antlr-3.5.2: to fail (ERROR: Package antlr-3.5 was not found!)
Summary: dev-java/stringtemplate: /usr/share/stringtemplate-4/package.env causes dev-j...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: PullRequest
: 739746 791622 803161 824002 (view as bug list)
Depends on: 833953
Blocks: 785817
  Show dependency tree
 
Reported: 2020-09-14 23:43 UTC by Thomas Capricelli
Modified: 2022-03-17 08:56 UTC (History)
23 users (show)

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


Attachments
build.log (build.log,2.21 KB, text/plain)
2020-09-14 23:44 UTC, Thomas Capricelli
Details
emerge --info (emerge.info,17.98 KB, text/plain)
2020-09-15 11:52 UTC, Thomas Capricelli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2020-09-14 23:43:53 UTC
It says
!!! ERROR: Package antlr-3.5 was not found!

100% reproducible.

% eselect java-vm list
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

I also have dev-java/openjdk-jre-bin-11.0.8_p10 and dev-java/openjdk-jre-bin-11.0.8_p10-r1 installed, not showing in eselect.


Reproducible: Always
Comment 1 Thomas Capricelli 2020-09-14 23:44:40 UTC
Created attachment 660300 [details]
build.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-09-14 23:58:26 UTC
emerge --info?

OpenJDK 11 won't show in eselect because system-vm is masked. Not ready yet.
Comment 3 Thomas Capricelli 2020-09-15 11:52:07 UTC
Created attachment 660381 [details]
emerge --info
Comment 4 Georgy Yakovlev archtester gentoo-dev 2020-09-24 18:31:30 UTC
seems recent eclass changes broke something, and antlr-3.5 can't be installed, because it pulls in stringtemplate-4, which has
> DEPEND="antlr-runtime.jar@antlr-3.5"

in the env file.

Unfortunately I don't have time to dive into that anytime soon.
it happens only on fresh system where you don't have antlr-3.5 installed yet.


WORKAROUND:

open /usr/share/stringtemplate-4/package.env and remove DEPEND="antlr-runtime.jar@antlr-3.5" line.

emerge --oneshot antlr:3.5


re-add
DEPEND="antlr-runtime.jar@antlr-3.5"

to the  /usr/share/stringtemplate-4/package.env file.
Comment 5 nael 2020-10-05 18:35:22 UTC
(In reply to Georgy Yakovlev from comment #4)
> seems recent eclass changes broke something, and antlr-3.5 can't be
> installed, because it pulls in stringtemplate-4, which has
> > DEPEND="antlr-runtime.jar@antlr-3.5"
[...] 
> WORKAROUND:
> 
> open /usr/share/stringtemplate-4/package.env and remove
> DEPEND="antlr-runtime.jar@antlr-3.5" line.
> emerge --oneshot antlr:3.5

I reproduced it when trying to install geogebra-bin on a fresh gentoo.
Thank you for the workaround! It unblocked the dependencies installation here.

I don't know much about the java packages so I don't think I can help on that, but count with my system if you want to test ebuiilds.
Comment 6 Anton Gubarkov 2020-10-26 08:37:01 UTC
Thanks for the workaround. I got my geogebra running now!
Comment 7 Georgy Yakovlev archtester gentoo-dev 2021-03-19 21:22:45 UTC
*** Bug 739746 has been marked as a duplicate of this bug. ***
Comment 8 James L. Hammons 2021-05-15 13:33:45 UTC
Can confirm both the bug and the workaround.  :-)
Comment 9 Miroslav Šulc gentoo-dev 2021-05-22 08:46:56 UTC
i think the problem is on our side. we should split antlr to antlr-runtime and antlr-tool (and provide antlr as the package including both). antlr-runtime does not depend on stringtemplate, only antlr-tool. and stringtemplate only depends on antlr-runtime. so that would break the mutual dependency on each other.
Comment 10 Volkmar W. Pogatzki 2021-05-26 17:41:40 UTC
*** Bug 791622 has been marked as a duplicate of this bug. ***
Comment 11 Yuan Liao (Leo3418) 2021-07-21 03:50:04 UTC
*** Bug 803161 has been marked as a duplicate of this bug. ***
Comment 12 Volkmar W. Pogatzki 2021-07-23 08:44:22 UTC
(In reply to Miroslav Šulc from comment #9)
> i think the problem is on our side. we should split antlr to antlr-runtime
> and antlr-tool (and provide antlr as the package including both).
> antlr-runtime does not depend on stringtemplate, only antlr-tool. and
> stringtemplate only depends on antlr-runtime. so that would break the mutual
> dependency on each other.

Removing that certain line from dev-java/stringtemplate/stringtemplate-4.0.8-r1.ebuild as proposed in [1]
solves the issue.  I am using dev-java/stringtemplate-4.3.1 since several weeks without further issues.

[1]https://github.com/gentoo/gentoo/pull/21018/commits/163f6a9aaddac2d9fdcf76fcaaa0710158303f73
Comment 13 Victor Orozco 2021-09-23 18:11:39 UTC
I can confirm that #5 workaround works. 

If it helps I found this bug while trying to compile OpenJDK and OpenJFX which depends on antlr.
Comment 14 jorge 2021-10-30 18:37:57 UTC
I can also confirm workaround in #5 works. I ran into this when trying to install Geogebra (and after unmasking javafx in /etc/portage/profile/use.mask).
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-18 05:16:43 UTC
*** Bug 824002 has been marked as a duplicate of this bug. ***
Comment 16 Markus Osterhoff 2021-12-30 08:56:12 UTC
another comfirmation that nael's Workaround in #5 works; compiling $stuff for geogebra now :)
Comment 17 Larry the Git Cow gentoo-dev 2022-01-25 09:30:05 UTC
The bug has been referenced in the following commit(s):

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

commit eb9234c26f9dd6984276ee8c499835a4318152ec
Author:     Yuan Liao <liaoyuan@gmail.com>
AuthorDate: 2022-01-20 20:50:39 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2022-01-25 09:30:03 +0000

    dev-java/antlr: Split antlr-runtime and antlr-tool for 3.5.2
    
    Suggested-by: Miroslav Šulc <fordfrog@gentoo.org>
    Bug: https://bugs.gentoo.org/742554
    Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/23904
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-java/antlr/antlr-3.5.2-r2.ebuild | 63 ++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

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

commit ee4ae9f475412915941b4c4ed4a479bf528cc5b0
Author:     Yuan Liao <liaoyuan@gmail.com>
AuthorDate: 2022-01-20 02:51:31 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2022-01-25 09:30:03 +0000

    dev-java/stringtemplate: Add 4.3.1, resolve antlr-3.5 circular dep
    
    stringtemplate-4 requires antlr-3.5 only during the build time to
    generate *.java files from src/org/stringtemplate/v4/compiler/*.g files.
    This causes the circular dependency issue described by the linked bug
    since antlr-3.5 depends on stringtemplate-4.  Fortunately, the sources
    JAR for stringtemplate 4.3.1 from Maven Central contains those generated
    *.java files (presumably pre-generated by the upstream), so if the Java
    sources from that JAR are used, the build-time dependency on antlr-3.5
    can be eliminated, finally resolving this chicken-or-egg problem.
    
    Bug: https://bugs.gentoo.org/742554
    Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-java/stringtemplate/Manifest                   |  2 +
 ...mplate-4.3.1-BaseTest-javac-source-target.patch | 28 ++++++++
 .../stringtemplate/stringtemplate-4.3.1.ebuild     | 74 ++++++++++++++++++++++
 3 files changed, 104 insertions(+)

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

commit 909450e1de5a80651db10160a29d8d4c2266756c
Author:     Yuan Liao <liaoyuan@gmail.com>
AuthorDate: 2022-01-20 21:50:51 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2022-01-25 09:30:03 +0000

    dev-java/antlr-tool: Initial import
    
    Suggested-by: Miroslav Šulc <fordfrog@gentoo.org>
    Bug: https://bugs.gentoo.org/742554
    Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-java/antlr-tool/Manifest                     |  2 +
 dev-java/antlr-tool/antlr-tool-3.5.2.ebuild      | 76 ++++++++++++++++++++++++
 dev-java/antlr-tool/files/3.5.2-test-fixes.patch | 36 +++++++++++
 dev-java/antlr-tool/metadata.xml                 | 11 ++++
 4 files changed, 125 insertions(+)

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

commit 0c0af3c5f3d155e080999d21b352eb5d792d17d0
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2021-08-14 15:53:19 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2022-01-25 09:30:02 +0000

    dev-java/antlr-runtime: new package
    
    Bug: https://bugs.gentoo.org/742554
    
    This is only the first part.
    Next step should be stringtemplate:4
    either from https://github.com/antlr/stringtemplate4/blob/master/build.xml
    or https://github.com/antlr/stringtemplate4/blob/master/src/BUILD.bazel
    
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Closes: https://github.com/gentoo/gentoo/pull/23841
    Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-java/antlr-runtime/Manifest                   |  1 +
 dev-java/antlr-runtime/antlr-runtime-3.5.2.ebuild | 38 +++++++++++++++++++++++
 dev-java/antlr-runtime/metadata.xml               | 10 ++++++
 3 files changed, 49 insertions(+)
Comment 18 Denis Tokarev 2022-02-09 23:54:31 UTC
It seems that at this point in time, in order to solve the build issues you'd need to add
=dev-java/stringtemplate-4.3.1 ~amd64
to the accept_keywords.
Comment 19 jorge 2022-02-21 10:39:58 UTC
(In reply to Denis Tokarev from comment #18)
> It seems that at this point in time, in order to solve the build issues
> you'd need to add
> =dev-java/stringtemplate-4.3.1 ~amd64
> to the accept_keywords.

I confirm this. To fresh install geogebra (amd64 arch):

1) Unmask javafx (not related to this bug)
2) Accept unstable keyword ~amd64 in:
    - dev-java/openjfx
    - dev-java/stringtemplate-4.3.1
    - dev-java/antlr-runtime:3.5
Comment 20 Larry the Git Cow gentoo-dev 2022-03-17 08:56:32 UTC
The bug has been closed via the following commit(s):

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

commit 3fc8eb9e269b59e7c26b76f14ca3236417bdae3c
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2022-03-17 06:35:50 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2022-03-17 08:56:28 +0000

    dev-java/stringtemplate: Drop 4.0.8-r1
    
    Closes: https://bugs.gentoo.org/742554
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-java/stringtemplate/Manifest                   |  2 -
 .../stringtemplate/files/4.0.8-r1-test-fixes.patch | 73 ---------------------
 .../files/stringtemplate-4.0.8-fix-tests.patch     | 72 ---------------------
 .../stringtemplate/stringtemplate-4.0.8-r1.ebuild  | 75 ----------------------
 4 files changed, 222 deletions(-)