| View previous topic :: View next topic |
| Author |
Message |
StifflerStealth Retired Dev


Joined: 03 Jul 2002 Posts: 968
|
Posted: Thu Mar 18, 2010 12:09 pm Post subject: [solved] Errors with Java while trying to install lucene. |
|
|
Hey all,
I have several issues with Java while trying to install dev-java/lucene-2.4.1
I know what causes the error, but I don't know how to fix it. The output is here:
| Quote: | * Disabling all optional ANT_TASKS
Buildfile: /var/tmp/portage/work/portage/dev-java/lucene-2.4.1/work/lucene-2.4.1/build.xml
javacc-uptodate-check:
javacc-notice:
jflex-uptodate-check:
jflex-notice:
init:
clover.setup:
clover.info:
[echo]
[echo] Clover not found. Code coverage reports disabled.
[echo]
clover:
common.compile-core:
[mkdir] Created dir: /var/tmp/portage/work/portage/dev-java/lucene-2.4.1/work/lucene-2.4.1/build/classes/java
[javac] Compiling 330 source files to /var/tmp/portage/work/portage/dev-java/lucene-2.4.1/work/lucene-2.4.1/build/classes/java
[javac] /var/tmp/portage/work/portage/dev-java/lucene-2.4.1/work/lucene-2.4.1/src/java/org/apache/lucene/queryParser/CharStream.java:30: annotations are not supported in -source 1.4
[javac] (use -source 5 or higher to enable annotations)
[javac] @Deprecated
[javac] ^
[javac] /var/tmp/portage/work/portage/dev-java/lucene-2.4.1/work/lucene-2.4.1/src/java/org/apache/lucene/queryParser/QueryParser.java:1659: generics are not supported in -source 1.4
[javac] (use -source 5 or higher to enable generics)
[javac] private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
[javac] ^
[javac] 2 errors
BUILD FAILED
/var/tmp/portage/work/portage/dev-java/lucene-2.4.1/work/lucene-2.4.1/common-build.xml:183: The following error occurred while executing this line:
/var/tmp/portage/work/portage/dev-java/lucene-2.4.1/work/lucene-2.4.1/common-build.xml:409: Compile failed; see the compiler error output for details.
Total time: 3 seconds
* ERROR: dev-java/lucene-2.4.1 failed:
* eant failed
*
* Call stack:
* ebuild.sh, line 48: Called src_compile
* environment, line 4369: Called eant '-Dversion=2.4.1' 'jar-core' 'jar-demo'
* environment, line 945: Called die
* The specific snippet of code:
* ant ${antflags} "${@}" || die "eant failed"
*
* If you need support, post the output of 'emerge --info =dev-java/lucene-2.4.1',
* the complete build log and the output of 'emerge -pqv =dev-java/lucene-2.4.1'.
!!! When you file a bug report, please include the following information:
GENTOO_VM=icedtea6-bin CLASSPATH="" JAVA_HOME="/opt/icedtea6-bin-1.7.1"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="javac"
and of course, the output of emerge --info
* The complete build log is located at '/var/tmp/portage/work/portage/dev-java/lucene-2.4.1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/work/portage/dev-java/lucene-2.4.1/temp/environment'.
* S: '/var/tmp/portage/work/portage/dev-java/lucene-2.4.1/work/lucene-2.4.1'
>>> Failed to emerge dev-java/lucene-2.4.1, Log file: |
The first half of the build succeeds, but the second one fails. I bolded some things for you. First, it's trying to use 1.4 source when it needs 1.5. There is nothing in the ebuild to set that option, so it must be set on the system somewhere.
Second, notice how it says that my vm is icedtea-6? After it failed the first time I switched my vm to sun-jdk whatever the latest is, and did the usual env-update && source /etc/profile thing, but it still uses icedtea. Java-config reports that sun-jdk is in fact selected.
I recompiled javacc and ant but as you can see, I still get this error. How do I fix this?
Thanks.
EDIT: Forgot to mention, that I do have python 2.6.x installed:
[ebuild R ] dev-lang/python-2.6.4-r1
So no Python 3 related messes. _________________ Nothing to read in this sig. Move along.
Last edited by StifflerStealth on Fri Mar 19, 2010 3:02 pm; edited 1 time in total |
|
| Back to top |
|
 |
geki Advocate


Joined: 13 May 2004 Posts: 2387 Location: Germania
|
|
| Back to top |
|
 |
maevil n00b

Joined: 24 Aug 2007 Posts: 64 Location: venezia
|
Posted: Thu Mar 18, 2010 7:00 pm Post subject: |
|
|
I had the same issue, changing those lines solved it
Thanks for tip! |
|
| Back to top |
|
 |
StifflerStealth Retired Dev


Joined: 03 Jul 2002 Posts: 968
|
Posted: Fri Mar 19, 2010 3:03 pm Post subject: |
|
|
Thanks geki. That worked perfectly. Now the ebuild in portage needs to be changed. _________________ Nothing to read in this sig. Move along. |
|
| Back to top |
|
 |
alistair Retired Dev


Joined: 15 Jul 2005 Posts: 869
|
Posted: Sun Mar 21, 2010 9:18 am Post subject: |
|
|
| StifflerStealth wrote: | | Thanks geki. That worked perfectly. Now the ebuild in portage needs to be changed. |
No not perfectly, it has covered the symptom without fixing the cause (being javacc). it could even lead to worse issues. _________________ ______________
Help the gentoo-java project. Visit Gentoo Java Project
what good are admin powers if you don't abuse them for personal gain - mark_alec |
|
| Back to top |
|
 |
geki Advocate


Joined: 13 May 2004 Posts: 2387 Location: Germania
|
Posted: Sun Mar 21, 2010 10:02 am Post subject: |
|
|
so, how to fix the cause?
where does the generics code come from?
I see javacc depends on 1.4. hmm ... _________________ hear hear |
|
| Back to top |
|
 |
alistair Retired Dev


Joined: 15 Jul 2005 Posts: 869
|
Posted: Sun Mar 21, 2010 10:16 am Post subject: |
|
|
| geki wrote: | so, how to fix the cause?
where does the generics code come from?
I see javacc depends on 1.4. hmm ... |
javacc has a JDK_VERSION (or similar) property that influences code compatibility ( aka its like the -source option to javac, but is really the target of javacc).
javacc-5.0 is the first version (I believe) to have set this to default to 5/1.5.
So the real solution is to patch the build.xml file to pass this property. _________________ ______________
Help the gentoo-java project. Visit Gentoo Java Project
what good are admin powers if you don't abuse them for personal gain - mark_alec |
|
| Back to top |
|
 |
StifflerStealth Retired Dev


Joined: 03 Jul 2002 Posts: 968
|
Posted: Sun Mar 21, 2010 11:18 am Post subject: |
|
|
I'll leave that to the Java herd to fix then. I'm just beginning in Java, so I don't know how to fix it by patching the build.xml file.
Thanks for your quick replies everyone. _________________ Nothing to read in this sig. Move along. |
|
| Back to top |
|
 |
|