You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Brian DeWeese <br...@yahoo.com> on 2002/08/19 22:27:20 UTC

Can no longer build cvs tip

Somethings changed recently that's preventing me from building from cvs tip.  The build gets through doing the bootstrap build but then fails to build from complaining about not finding classic or modern compiler.  My JAVA_HOME is set to the correct directory.  Any ideas?

... Bootstrapping Ant Distribution
JAVA_HOME=D:\jdk131
JAVA=D:\jdk131\bin\java
JAVAC=D:\jdk131\bin\javac
CLASSPATH=D:\jdk131\lib\tools.jar;lib\optional\junit.jar;lib\xercesImpl.jar;lib\xml-apis.jar;build\
lasses;src\main;.;D:\jdk131\jre\lib\rt.jar;D:\JAVA\LIB;D:\UTILS

... Compiling Ant Classes
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.

... Copying Required Files
src\main\org\apache\tools\ant\taskdefs\defaults.properties
        1 file(s) copied.
src\main\org\apache\tools\ant\types\defaults.properties
        1 file(s) copied.

... Building Ant Distribution
Buildfile: build.xml

bootstrap:

prepare:

check_for_optional_packages:

build:
Created dir: D:\java\cvs\jakarta-ant\build\lib
Compiling 181 source files to D:\java\cvs\jakarta-ant\build\classes
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
Copying 1 file to D:\java\cvs\jakarta-ant\build\classes
Copying 2 files to D:\java\cvs\jakarta-ant\build\classes
Copying 2 files to D:\java\cvs\jakarta-ant\build\classes\org\apache\tools\ant\taskdefs\optional\jun
t\xsl

jars:
Copying 4 files to D:\java\cvs\jakarta-ant\build
Building jar: D:\java\cvs\jakarta-ant\build\lib\ant.jar
Building jar: D:\java\cvs\jakarta-ant\build\lib\optional.jar

dist-lite:
Created dir: D:\java\cvs\jakarta-ant\bootstrap
Created dir: D:\java\cvs\jakarta-ant\bootstrap\bin
Created dir: D:\java\cvs\jakarta-ant\bootstrap\lib
Copying 2 files to D:\java\cvs\jakarta-ant\bootstrap\lib
Copying 9 files to D:\java\cvs\jakarta-ant\bootstrap\bin

BUILD SUCCESSFUL
Total time: 30 seconds

... Cleaning Up Build Directories

... Done Bootstrapping Ant Distribution
Buildfile: build.xml

clean:
Deleting directory D:\java\cvs\jakarta-ant\build

prepare:

check_for_optional_packages:

build:
Created dir: D:\java\cvs\jakarta-ant\build
Created dir: D:\java\cvs\jakarta-ant\build\classes
Created dir: D:\java\cvs\jakarta-ant\build\lib
Compiling 457 source files to D:\java\cvs\jakarta-ant\build\classes
Modern compiler not found - looking for classic compiler

BUILD FAILED
file:D:/java/cvs/jakarta-ant/build.xml:581: 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: 9 seconds






---------------------------------
Do You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs

Re: [PATCH] Can no longer build cvs tip

Posted by Stephane Bailliez <sb...@apache.org>.
----- Original Message -----
From: "Brian DeWeese" <br...@yahoo.com>

> Your reference to the scripts pointed me to the solution, I should
> have looked there earlier.  The problem is in ant.bat.  It jumps off
> to "checkJikes" even though the java.exe compiler exists and
> therefore bypasses the statements that append the rt.jar and
> tools.jar to the classpath.  I'd say it's missing a NOT.  I added
> that to my version and it fixed the problem.

Oops indeed, there's a problem here.
I did not noticed since I was using jikes.

> Also, I'm not sure why it would want to reset _JAVACMD to just
> "java.exe" when the "%JAVA_HOME%\bin\java.exe" version existed.  So,

legacy logic. It's a fallback. It's only if %JAVA_HOME%\bin\java.exe does
not exist, since it already jumped to jikes before, so you got it wrong in
your patch if you move it to checkJikes, it will be resetted in all cases
and you will get java from the path rather than from java home...not that
before that there was a difference between existence of java home and
existence of java.exe, since when there were no java home the fallback was
the path but it has been lost in the previous patch.

I will give it a look later...all this batch script thing is a miracle when
it works. Perl is even easier to read than batch files.

> I've changed the logic around that a bit and fixed a problem with the
> @endlocal if statement.
>
> I've attached a patch.  I hope you find it useful.

Thanks


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] Can no longer build cvs tip

Posted by Brian DeWeese <br...@yahoo.com>.
--- Stephane Bailliez <sb...@apache.org> wrote:
> ----- Original Message -----
> From: "Brian DeWeese" <br...@yahoo.com>
> 
> 
> > Somethings changed recently that's preventing me from building
> from cvs
> tip.  The build gets through doing the bootstrap build but then
> fails to
> build from complaining about not finding classic or modern
> compiler.  My
> JAVA_HOME is set to the correct directory.
> 
> What's cvs 'tip' ?

Sorry, I'm unfortunately more accustomed to VSS and PVCS where we
refer to the most recent revision as the 'tip', or at least I always
have, not sure about the rest of the world.
> 
> The only thing that changed is the batch scripts such as lcp.bat
> for example
> that could have some sort of influence.
> It works for me, cvs HEAD, I have a modified bootstrap.bat that I
> did not
> committed but this should not have any influence.
> 
> > Any ideas?
> 
> Make sure your tools.jar is not corrupted, run bootstrap with -v,
> etc...
> 
Your reference to the scripts pointed me to the solution, I should
have looked there earlier.  The problem is in ant.bat.  It jumps off
to "checkJikes" even though the java.exe compiler exists and
therefore bypasses the statements that append the rt.jar and
tools.jar to the classpath.  I'd say it's missing a NOT.  I added
that to my version and it fixed the problem.

Also, I'm not sure why it would want to reset _JAVACMD to just
"java.exe" when the "%JAVA_HOME%\bin\java.exe" version existed.  So,
I've changed the logic around that a bit and fixed a problem with the
@endlocal if statement.

I've attached a patch.  I hope you find it useful.

Brian DeWeese




__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

Re: Can no longer build cvs tip

Posted by Stephane Bailliez <sb...@apache.org>.
----- Original Message -----
From: "Brian DeWeese" <br...@yahoo.com>


> Somethings changed recently that's preventing me from building from cvs
tip.  The build gets through doing the bootstrap build but then fails to
build from complaining about not finding classic or modern compiler.  My
JAVA_HOME is set to the correct directory.

What's cvs 'tip' ?

The only thing that changed is the batch scripts such as lcp.bat for example
that could have some sort of influence.
It works for me, cvs HEAD, I have a modified bootstrap.bat that I did not
committed but this should not have any influence.

> Any ideas?

Make sure your tools.jar is not corrupted, run bootstrap with -v, etc...




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>