Mailing List Archive

Problem building Lucene
I just checked out everything from the jakarta-lucene CVS and tried to
build it. I'm running on Win 2K and using Sun JDK 1.3.

The first problem was that the lib directory includes ant-1.3.jar but
does not include the optional.jar file. I had it in a separate ant 1.3
install and after I copied it into the lib directory that problem went
away (I also tried setting ANT_HOME as the error message suggested but
that didn't seem to help).

After that problem went away, this is the problem I'm running into:
==================================================
K:\projects\opensource\jakarta-lucene\jakarta-cvs>build
CLASSPATH=".\lib\jakarta-ant-1.3-optional.jar;.\lib\velocity-1.2-dev.jar;.\lib\junit_35.jar;.\lib\jdom-b7.jar;.\lib\ant-1.3.ja
r;.\lib\xerces-1.3.0.jar;"
Buildfile: build.xml

init:

javacc_check:

compile:
[delete] Could not find file
K:\projects\opensource\jakarta-lucene\jakarta-cvs\bin\src\org\apache\lucene\analysis\standard\
ParseException.java to delete.
[javac] Warning:
org\apache\lucene\analysis\standard\StandardTokenizer.java modified in
the future.
[javac] Warning:
org\apache\lucene\analysis\standard\StandardTokenizerTokenManager.java
modified in the future.
[javac] Warning:
org\apache\lucene\analysis\standard\TokenMgrError.java modified in the
future.
[javac] Warning: org\apache\lucene\analysis\standard\Token.java
modified in the future.
[javac] Warning: org\apache\lucene\analysis\standard\CharStream.java
modified in the future.
[javac] Warning:
org\apache\lucene\analysis\standard\StandardTokenizerConstants.java
modified in the future.
[javac] Warning: org\apache\lucene\queryParser\QueryParser.java
modified in the future.
[javac] Warning:
org\apache\lucene\queryParser\QueryParserTokenManager.java modified in
the future.
[javac] Warning: org\apache\lucene\queryParser\TokenMgrError.java
modified in the future.
[javac] Warning: org\apache\lucene\queryParser\ParseException.java
modified in the future.
[javac] Warning: org\apache\lucene\queryParser\Token.java modified
in the future.
[javac] Warning: org\apache\lucene\queryParser\ASCII_CharStream.java
modified in the future.
[javac] Warning:
org\apache\lucene\queryParser\QueryParserConstants.java modified in the
future.
[javac] Modern compiler is not available - using classic compiler
[javac] Compiling 102 source files to
K:\projects\opensource\jakarta-lucene\jakarta-cvs\bin\classes

BUILD FAILED

K:\projects\opensource\jakarta-lucene\jakarta-cvs\build.xml:100: Cannot
use classic compiler, as it is not available A common
solution is to set the environment variable JAVA_HOME to your jdk directory.

Total time: 3 seconds
================================================

I set the JAVA_HOME to where JDK is installed but that didn't have any
effect. Running javac on command line works fine, meaning that I can
compile java files without problems.

Does anyone have any suggestions?

Thanks.
Dmitry.
RE: Problem building Lucene [ In reply to ]
I too have had problems using the build.sh and build.bat scripts. The way I
develop Lucene (and other projects) is to set JAVA_HOME and ANT_HOME to the
location of my Java and Ant installations, never set CLASSPATH, and use
'ant' from the command line. That works for me on Win32 and Linux.

That said, if we're going to include these scripts and libraries in Lucene's
CVS repository, then we should make sure they work.

Sam, Jason, as the folks who added these scripts & libs, can you try to sort
this out? We at least need ant's optional jar file, but even with that I
also get the "cannot use classic compiler" failure.

Thanks,

Doug

> -----Original Message-----
> From: Dmitry Serebrennikov [mailto:dmitrys@earthlink.net]
> Sent: Saturday, October 06, 2001 4:34 PM
> To: lucene-dev@jakarta.apache.org
> Subject: Problem building Lucene
>
>
> I just checked out everything from the jakarta-lucene CVS and
> tried to
> build it. I'm running on Win 2K and using Sun JDK 1.3.
>
> The first problem was that the lib directory includes ant-1.3.jar but
> does not include the optional.jar file. I had it in a
> separate ant 1.3
> install and after I copied it into the lib directory that
> problem went
> away (I also tried setting ANT_HOME as the error message
> suggested but
> that didn't seem to help).
>
> After that problem went away, this is the problem I'm running into:
> ==================================================
> K:\projects\opensource\jakarta-lucene\jakarta-cvs>build
> CLASSPATH=".\lib\jakarta-ant-1.3-optional.jar;.\lib\velocity-1
> .2-dev.jar;.\lib\junit_35.jar;.\lib\jdom-b7.jar;.\lib\ant-1.3.ja
> r;.\lib\xerces-1.3.0.jar;"
> Buildfile: build.xml
>
> init:
>
> javacc_check:
>
> compile:
> [delete] Could not find file
> K:\projects\opensource\jakarta-lucene\jakarta-cvs\bin\src\org\
> apache\lucene\analysis\standard\
> ParseException.java to delete.
> [javac] Warning:
> org\apache\lucene\analysis\standard\StandardTokenizer.java
> modified in
> the future.
> [javac] Warning:
> org\apache\lucene\analysis\standard\StandardTokenizerTokenMana
> ger.java
> modified in the future.
> [javac] Warning:
> org\apache\lucene\analysis\standard\TokenMgrError.java
> modified in the
> future.
> [javac] Warning: org\apache\lucene\analysis\standard\Token.java
> modified in the future.
> [javac] Warning:
> org\apache\lucene\analysis\standard\CharStream.java
> modified in the future.
> [javac] Warning:
> org\apache\lucene\analysis\standard\StandardTokenizerConstants.java
> modified in the future.
> [javac] Warning: org\apache\lucene\queryParser\QueryParser.java
> modified in the future.
> [javac] Warning:
> org\apache\lucene\queryParser\QueryParserTokenManager.java
> modified in
> the future.
> [javac] Warning: org\apache\lucene\queryParser\TokenMgrError.java
> modified in the future.
> [javac] Warning:
> org\apache\lucene\queryParser\ParseException.java
> modified in the future.
> [javac] Warning: org\apache\lucene\queryParser\Token.java
> modified
> in the future.
> [javac] Warning:
> org\apache\lucene\queryParser\ASCII_CharStream.java
> modified in the future.
> [javac] Warning:
> org\apache\lucene\queryParser\QueryParserConstants.java
> modified in the
> future.
> [javac] Modern compiler is not available - using classic compiler
> [javac] Compiling 102 source files to
> K:\projects\opensource\jakarta-lucene\jakarta-cvs\bin\classes
>
> BUILD FAILED
>
> K:\projects\opensource\jakarta-lucene\jakarta-cvs\build.xml:10
> 0: Cannot
> use classic compiler, as it is not available A common
> solution is to set the environment variable JAVA_HOME to your
> jdk directory.
>
> Total time: 3 seconds
> ================================================
>
> I set the JAVA_HOME to where JDK is installed but that didn't
> have any
> effect. Running javac on command line works fine, meaning that I can
> compile java files without problems.
>
> Does anyone have any suggestions?
>
> Thanks.
> Dmitry.
>
>
>
Re: Problem building Lucene [ In reply to ]
On 10/8/01 12:01 PM, "Doug Cutting" <DCutting@grandcentral.com> wrote:

> I too have had problems using the build.sh and build.bat scripts. The way I
> develop Lucene (and other projects) is to set JAVA_HOME and ANT_HOME to the
> location of my Java and Ant installations, never set CLASSPATH, and use
> 'ant' from the command line. That works for me on Win32 and Linux.
>
> That said, if we're going to include these scripts and libraries in Lucene's
> CVS repository, then we should make sure they work.
>
> Sam, Jason, as the folks who added these scripts & libs, can you try to sort
> this out?

It is my preference to actually remove the scripts all together. That's what
I've done in the projects that I'm involved with. As a developer I don't
think it is that complicated an endeavor to install Ant and the optional
JAR. I would actually prefer if no JAR files are kept in CVS but I just left
them in there to make the transition as easy as possible.

I am +1 on removing the scripts completely.

> We at least need ant's optional jar file, but even with that I
> also get the "cannot use classic compiler" failure.
>


--

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
RE: Problem building Lucene [ In reply to ]
> From: Jason van Zyl [mailto:jvanzyl@apache.org]
>
> I am +1 on removing the scripts completely.

I also am +1 on removing the scripts and all jar files except JavaCC.zip.

The velocity jar file is only used for Anakia, the website generator. Since
building the website requires that you have ../jakarta-site2 checked out of
CVS, we should change the classpath for the Anakia task to include
../jakarta-site2/lib.

I think that all of the other jar files in lib/ are ant-related.

Doug