lucene2 jdk dependence

Bug #185917 reported by Marek Slama
8
Affects Status Importance Assigned to Milestone
lucene2 (Ubuntu)
Fix Released
Undecided
Onkar Shinde

Bug Description

Currently lucene2 depends on sun-java5-jre and sun-java5-jdk but it is in multiverse. I checked with icedtea-java7-jre and icedtea-java7-jdk and it builds fine. It is important for NetBeans IDE 6.0.1 packaging to move lucene2 to universe as we depends on lucene2 and want to be in universe. NetBeans 6.0.1 packages depends on icedtea-java7. I will attach diff.gz with my change.

Related branches

Revision history for this message
Marek Slama (mslama-email) wrote :
Revision history for this message
Onkar Shinde (onkarshinde) wrote :

The problem is not with Sun JDK dependency. The problem is that one unit test fails on build servers since it can not get access to certain DTD hosted on internet. And this problem is independent of the compiler used.

The lucene2 core (and contrib) libraries build with GCJ also. I have already tried this by disabling unit tests. The solution to unit test failure is known but depends on another bug #183164.

Have patience. In about a week's time this will get fixed. :-)

Revision history for this message
Onkar Shinde (onkarshinde) wrote :

Assigning to myself since I am going to fix this eventually.

Changed in lucene2:
assignee: nobody → onkarshinde
Revision history for this message
jablko (ms419) wrote :

Thanks Onkar, for working on lucene2 in Ubuntu.

I'm interested in building lucene2 with GCJ - you mention:

The lucene2 core (and contrib) libraries build with GCJ also. I have already tried this by disabling unit tests. The solution to unit test failure is known but depends on another bug #183164.

However I'm getting the following unit test failures:

    [junit] Testsuite: org.apache.lucene.search.TestSort
    [junit] Tests run: 17, Failures: 2, Errors: 0, Time elapsed: 1.755 sec
    [junit]
    [junit] Testcase: testInternationalSort(org.apache.lucene.search.TestSort):FAILED
    [junit] expected:<B[FJD]H> but was:<B[JDF]H>
    [junit] junit.framework.ComparisonFailure: expected:<B[FJD]H> but was:<B[JDF]H>
    [junit] at org.apache.lucene.search.TestSort.assertMatches(TestSort.java:639)
    [junit] at org.apache.lucene.search.TestSort.testInternationalSort(TestSort.java:358)
    [junit]
    [junit]
    [junit] Testcase: testInternationalMultiSearcherSort(org.apache.lucene.search.TestSort): FAILED
    [junit] expected:<B[FJD]H> but was:<B[JDF]H>
    [junit] junit.framework.ComparisonFailure: expected:<B[FJD]H> but was:<B[JDF]H>
    [junit] at org.apache.lucene.search.TestSort.assertMatches(TestSort.java:639)
    [junit] at org.apache.lucene.search.TestSort.testInternationalMultiSearcherSort(TestSort.java:382)
    [junit]
    [junit]
    [junit] Test org.apache.lucene.search.TestSort FAILED

Are these the failures to which you're referring?

Thanks and best wishes, Jack

Revision history for this message
Onkar Shinde (onkarshinde) wrote :

Jack,

No the errors you are seeing are different. The one I was talking about is related to unit test 'testEncoding' found in contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java.
I never encountered the errors you are specifying because my build never got past the test that uses DTD.

Today I used some workaround for the DTD problem (bug #183164) and now I similar as the one you specified. I also found a reference to this on Debian pkg-java mailing list. http://lists.alioth.debian.org/pipermail/pkg-java-commits/2007-August/003771.html
I am not sure if this is GCJ specific error.
I will try to build the package with Icedtea and see if error persists. If it does not then building with Icedtea is 'the solution'. But this also means that I will have to add a patch for build scripts to specify target VM version as 1.5 else the resulting binary won't be usable with other runtimes. (Icedtea uses VM version 1.7).
If the error persists then I don't know what path I will have to take.

Revision history for this message
Onkar Shinde (onkarshinde) wrote :

I have added a debdiff to bug bug #183164 and hopefully it will get accepted in a day or two. I will then fix lucene2.

@Marek,
Can you please attach a debdiff rather than .diff.gz so that I can check differences between your solution and mine and merge them if possible.

Revision history for this message
Marek Slama (mslama-email) wrote :

Attached. I did these changes to be able to build binary packages from source package.

Revision history for this message
Marek Slama (mslama-email) wrote :

Again in correct order. (Previous debdiff was in reverse order.)

Revision history for this message
Daniel Hahler (blueyed) wrote :

Just for info: This is addressed/included in the patch for bug 189602.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lucene2 - 2.2.0-2ubuntu1

---------------
lucene2 (2.2.0-2ubuntu1) hardy; urgency=low

  * debian/control
    - Add w3c-dtd-xhtml as build dependency. Needed to fix build failure.
    - Use icedtea-java7-jdk build dependency. (LP: #185917)
    - Modify Maintainer value to match the DebianMaintainerField
      specification.
    - Add 'Homepage' field and remove links from description.
    - Update standards version to 3.7.3.
  * debian/patches
    - 82_fix_xhtml_dtd_access.dpatch - Patch for fixing contrib unit tests.
      Fixes FTBFS on buildd. (LP: #189602)
    - 00list - Updated to include above patch
  * debian/rules
    - Set JAVA_HOME corresponding to icedtea.

 -- Onkar Shinde <email address hidden> Tue, 15 Jan 2008 19:09:15 +0530

Changed in lucene2:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.