Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 579086 - dev-java/lucene[contrib]-3.6.2: build fails
Summary: dev-java/lucene[contrib]-3.6.2: build fails
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-05 11:46 UTC by Vasiliy Yeremeyev
Modified: 2021-03-21 12:38 UTC (History)
3 users (show)

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


Attachments
build.log (lucene.build.log,7.24 KB, text/plain)
2016-04-05 11:46 UTC, Vasiliy Yeremeyev
Details
emerge --info (emerge.info,5.98 KB, text/plain)
2016-04-05 11:49 UTC, Vasiliy Yeremeyev
Details
lucene-3.6.2-r2.ebuild.patch (lucene-3.6.2-r2.ebuild.patch,6.54 KB, patch)
2018-01-06 17:35 UTC, PhobosK
Details | Diff
lucene_contrib_icu4j_v50.patch (lucene_contrib_icu4j_v50.patch,944 bytes, patch)
2018-01-06 17:40 UTC, PhobosK
Details | Diff
lucene-3.5.0-r2.ebuild.patch (lucene-3.5.0-r2.ebuild.patch,4.63 KB, patch)
2018-01-06 17:44 UTC, PhobosK
Details | Diff
lucene-3.6.2-r2.ebuild (lucene-3.6.2-r2.ebuild,3.43 KB, text/plain)
2018-01-06 17:46 UTC, PhobosK
Details
lucene-3.5.0-r2.ebuild (lucene-3.5.0-r2.ebuild,3.42 KB, text/plain)
2018-01-06 17:48 UTC, PhobosK
Details
lucene-3.6.2-r2.ebuild (lucene-3.6.2-r2.ebuild,3.38 KB, text/plain)
2021-01-10 18:24 UTC, Fabio Rossi
Details
lucene-3.6.2-ant-1.10.patch (lucene-3.6.2-ant-1.10.patch,1.06 KB, patch)
2021-01-10 18:24 UTC, Fabio Rossi
Details | Diff
# emerge --info (file_579086.txt,5.87 KB, text/plain)
2021-03-04 19:20 UTC, cloun108
Details
Build log (lucene-patch-log,9.75 KB, text/plain)
2021-03-10 22:03 UTC, skidrow.jc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vasiliy Yeremeyev 2016-04-05 11:46:59 UTC
Created attachment 429674 [details]
build.log

dev-java/lucene[contrib]-3.6.2: build fails

dev-java/lucene-3.6.2 fails to build with USE="contrib":

    [javac] /var/tmp/portage/dev-java/lucene-3.6.2/work/lucene-3.6.2/test-framework/src/java/org/apache/lucene/util/InternalAssumptionViolatedException.java:20: error: package org.hamcrest does not exist
    [javac] import org.hamcrest.Description;
    [javac]                    ^
    [javac] /var/tmp/portage/dev-java/lucene-3.6.2/work/lucene-3.6.2/test-framework/src/java/org/apache/lucene/util/InternalAssumptionViolatedException.java:30: error: cannot access SelfDescribing
    [javac] final class InternalAssumptionViolatedException extends AssumptionViolatedException {
    [javac]       ^
    [javac]   class file for org.hamcrest.SelfDescribing not found
    [javac] /var/tmp/portage/dev-java/lucene-3.6.2/work/lucene-3.6.2/test-framework/src/java/org/apache/lucene/util/InternalAssumptionViolatedException.java:51: error: cannot find symbol
    [javac]   public void describeTo(Description description) {
    [javac]                          ^
    [javac]   symbol:   class Description
    [javac]   location: class InternalAssumptionViolatedException

...

BUILD FAILED


dev-java/hamcrest-core-1.1 is installed. hamcrest-core-1.3 can not be installed due to bug #572768.
Comment 1 Vasiliy Yeremeyev 2016-04-05 11:49:52 UTC
Created attachment 429676 [details]
emerge --info
Comment 2 PhobosK 2018-01-06 17:35:54 UTC
Created attachment 513542 [details, diff]
lucene-3.6.2-r2.ebuild.patch

I can confirm this bug with Java VM icedtea-bin-8

And I confirm that the dev-java/lucene[contrib]-3.5.0-r1 fails also though with a different error:

compile-test-framework:
    [mkdir] Created dir: /dev/shm/portage/dev-java/lucene-3.5.0-r1/work/lucene-3.5.0/build/classes/test-framework
    [javac] Compiling 33 source files to /dev/shm/portage/dev-java/lucene-3.5.0-r1/work/lucene-3.5.0/build/classes/test-framework
    [javac] /dev/shm/portage/dev-java/lucene-3.5.0-r1/work/lucene-3.5.0/src/test-framework/java/org/apache/lucene/util/LuceneTestCase.java:50: error: package org.junit does not exist
    [javac] import org.junit.After;
    [javac]                 ^


Both failures are with Java VM icedtea-bin-8 which provides Java 1.8 just as your configuration that is oracle-jdk-bin-1.8....

I have no idea if these errors appear when Java < 1.8...

Anyway IMHO the current dev-java/lucene-3.5.0-r1 and dev-java/lucene-3.6.2-r1 are really broken especially the last one that has the src_prepare() phase duplicated....

Both versions if contrib flag is used require icu4j 4.8 and this is no longer available in portage, so the contrib icu will not compile...

Using doc flag also doesn't work properly....


Anyway... I did rewrote almost from scratch both ebuilds: dev-java/lucene-3.5.0-r1 and dev-java/lucene-3.6.2-r1 and made them r2...

I am uploading them here both as a patch and the full ebuild, so other could use it till this is fixed in portage...


Should I create a new bug for a version bump on both versions?
Comment 3 PhobosK 2018-01-06 17:40:04 UTC
Created attachment 513544 [details, diff]
lucene_contrib_icu4j_v50.patch

This is the patch to make icu4j > 50 to work with lucene.

This should go into files folder of the package in portage.

The patch is taken from Fedora - https://koji.fedoraproject.org/koji/buildinfo?buildID=398552

See explanation here: http://source.icu-project.org/repos/icu/icu4j/tags/release-50-1/readme.html#changes
Comment 4 PhobosK 2018-01-06 17:44:10 UTC
Created attachment 513546 [details, diff]
lucene-3.5.0-r2.ebuild.patch

The patch to the lucene-3.5.0-r1.ebuild with the fixes mentioned above.

This version of lucene (slot 3.5) is needed for the dev-java/netbeans-ide-8.2-r1

Also requires the lucene_contrib_icu4j_v50.patch
Comment 5 PhobosK 2018-01-06 17:46:46 UTC
Created attachment 513548 [details]
lucene-3.6.2-r2.ebuild

This is the full ebuild of the newly proposed for portage r2 - lucene-3.6.2-r2.ebuild
Comment 6 PhobosK 2018-01-06 17:48:01 UTC
Created attachment 513550 [details]
lucene-3.5.0-r2.ebuild

This is the full ebuild of the newly proposed for portage r2 - lucene-3.5.0-r2.ebuild
Comment 7 PhobosK 2018-01-06 17:53:05 UTC
All proposed ebuilds work fine with icedtea-bin-8, but should be tested with other Java VM too.

All USE flags - sources, docs, contrib - work OK too...

Tests are still disabled/restricted since all ICU modules tests in contrib fail. All other tests work OK....

Please test these with other VMs and different combinations of the USE flags...


Gentoo Devs, 
Can you please advice if these ebuilds are OK and could go to official portage? :)
Comment 8 Fabio Rossi 2021-01-10 18:14:18 UTC
I am trying your ebuild for lucene-3.6.2-r2 but there are two issues:

1) after copying the patch and ebuild in my personal overlay __mine__, one dep is still missing and it is not in portage:

# emerge -pv lucene::__mine__

These are the packages that would be merged, in order:

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "dev-java/ant-nodeps:0".
(dependency required by "dev-java/lucene-3.6.2-r2::__mine__" [ebuild])
(dependency required by "lucene::__mine__" [argument])

2) I have looked around for ant-nodeps in build.xml, it seems is not used, so after having removed the dep from the ebuild, I get the following error:

compile-core:
    [mkdir] Created dir: /var/tmp/portage/dev-java/lucene-3.6.2-r2/work/lucene-3.6.2/build/test-framework/classes/java
    [javac] Compiling 51 source files to /var/tmp/portage/dev-java/lucene-3.6.2-r2/work/lucene-3.6.2/build/test-framework/classes/java
    [javac] /var/tmp/portage/dev-java/lucene-3.6.2-r2/work/lucene-3.6.2/test-framework/src/java/org/apache/lucene/util/LuceneJUnitDividingSelector.java:26: error: LuceneJUnitDividingSelector is not abstract and does not override abstract method isSelected(Resource) in ResourceSelector
    [javac] public class LuceneJUnitDividingSelector extends BaseExtendSelector {
    [javac]        ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 1 error
Comment 9 Fabio Rossi 2021-01-10 18:21:58 UTC
I have found a further patch from Debian https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895797, I am attaching a modified ebuild and a modified patch for Gentoo
Comment 10 Fabio Rossi 2021-01-10 18:24:07 UTC
Created attachment 682270 [details]
lucene-3.6.2-r2.ebuild
Comment 11 Fabio Rossi 2021-01-10 18:24:39 UTC
Created attachment 682273 [details, diff]
lucene-3.6.2-ant-1.10.patch
Comment 12 cloun108 2021-03-04 19:20:42 UTC
Created attachment 689379 [details]
# emerge --info
Comment 13 cloun108 2021-03-04 19:23:08 UTC
compile-core:
    [mkdir] Created dir: /var/tmp/portage/dev-java/lucene-3.6.2-r2/work/lucene-3.6.2/build/test-framework/classes/java
    [javac] Compiling 51 source files to /var/tmp/portage/dev-java/lucene-3.6.2-r2/work/lucene-3.6.2/build/test-framework/classes/java
    [javac] /var/tmp/portage/dev-java/lucene-3.6.2-r2/work/lucene-3.6.2/test-framework/src/java/org/apache/lucene/util/InternalAssumptionViolatedException.java:20: error: package org.hamcrest does not exist
    [javac] import org.hamcrest.Description;
    [javac]                    ^
    [javac] /var/tmp/portage/dev-java/lucene-3.6.2-r2/work/lucene-3.6.2/test-framework/src/java/org/apache/lucene/util/InternalAssumptionViolatedException.java:30: error: cannot access SelfDescribing
    [javac] final class InternalAssumptionViolatedException extends AssumptionViolatedException {
    [javac]       ^
    [javac]   class file for org.hamcrest.SelfDescribing not found
...... (omitted errors resulting from this one)


I have encountered the problem as well.
Comment 14 cloun108 2021-03-05 07:50:31 UTC
Sorry, failed to apply a patch. Fixed now for me.
Comment 15 skidrow.jc 2021-03-10 22:03:19 UTC
Created attachment 690603 [details]
Build log

I applied the ant-1.10 patch and icu4j_v50 patch and still doesn't build
Comment 16 Larry the Git Cow gentoo-dev 2021-03-21 12:38:08 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/sci.git/commit/?id=e78efb63107558c492825f9aaa0a35f61b29a2a9

commit e78efb63107558c492825f9aaa0a35f61b29a2a9
Author:     Andrew Ammerlaan <andrewammerlaan@riseup.net>
AuthorDate: 2021-03-21 12:35:36 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@riseup.net>
CommitDate: 2021-03-21 12:35:36 +0000

    dev-java/lucene: add new lucene versions for scilab
    
    At the moment this only builds with USE="-modules"
    because we are missing a dependency. Will add the
    keywords if/when I get the dependency working
    
    Also added a fixed ebuild for version 3.6.2,
    the one in ::gentoo fails with USE="contrib"
    see linked bug
    
    Bug: https://bugs.gentoo.org/733258
    Bug: https://bugs.gentoo.org/579086
    Package-Manager: Portage-3.0.17, Repoman-3.0.2
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>

 dev-java/lucene/Manifest                           |   3 +
 dev-java/lucene/files/lucene-3.6.2-ant-1.10.patch  |  24 +++
 .../lucene/files/lucene_contrib_icu4j_v50.patch    |  20 +++
 dev-java/lucene/lucene-3.6.2-r2.ebuild             | 162 +++++++++++++++++++
 dev-java/lucene/lucene-5.2.1.ebuild                | 165 +++++++++++++++++++
 dev-java/lucene/lucene-8.4.0.ebuild                | 180 +++++++++++++++++++++
 dev-java/lucene/metadata.xml                       |  12 ++
 7 files changed, 566 insertions(+)