Re: javac CRASH

View: New views
13 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: javac CRASH

by Ulf Zibis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rémi (and all),

(1) My initial question was, if somebody could provide me a patch (here:
langtools.jar). As it's always difficult. to run the build on Windows, I
assumed, there is somebody out there who has ready configured his
system, to run the build for langtools.jar.

(2) Remember, there is no bash on Windows. I don't have any idea, what
"export" could be translated to, to run it on Windows.

-Ulf


Am 11.08.2009 02:25, Rémi Forax schrieb:

>
> as said, set the bootstrap location,
> with bash:
> export ALT_BOOTDIR=path_to_a_binary_jdk6or7
>
> Rémi
>
>>
>>
>> Am 04.08.2009 15:17, Rémi Forax schrieb:
>>> Le 04/08/2009 13:07, Ulf Zibis a écrit :
>>>> Maurizio,
>>>>
>>>> much thanks for the additional info.
>>>>
>>>> I like to avoid going back to b63.
>>>> If the fix will not go into b68, could you please provide a binary
>>>> patch for b67 (or b68) (Windows version)?
>>>> I can wait for release of b68, but not for b69, as I'm on vacation
>>>> until Aug. 10.
>>>>
>>>> Thanks in advance,
>>>>
>>>> -Ulf
>>>
>>> you can do it by yourself,
>>> clone the langtools repository, it can be built with ant, so just
>>> type ant
>>> in the directory "make", it will create a tools.jar.
>>> Now remplace the tools.jar of your binary build by this new one.
>>>
>>> cheers,
>>> Rémi
>>>
>>>>
>>>>
>>>> Am 04.08.2009 12:20, Maurizio Cimadamore schrieb:
>>>>> Ulf Zibis wrote:
>>>>>> Maurizio,
>>>>>>
>>>>>> much thanks for the fast info.
>>>>>>
>>>>>> Will this fix be included in next build b68 ???
>>>>>> Hopefully !
>>>>> Not sure if it will make into b68 - but certainly it will go into
>>>>> b69 (depends on the integration process). The fix is already
>>>>> available in the langtools repository used for development
>>>>> (http://hg.openjdk.java.net/jdk7/tl/langtools).
>>>>>
>>>>> Maurizio
>>>>>>
>>>>>> -Ulf
>>>>>>
>>>>>>
>>>>>> Am 04.08.2009 11:08, Maurizio Cimadamore schrieb:
>>>>>>> Ulf Zibis wrote:
>>>>>>>> See:
>>>>>>>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6868135 -->
>>>>>>>> java.lang.NullPointerException from compiler (1.7.0-ea)
>>>>>>>>
>>>>>>>> -Ulf
>>>>>>>>
>>>>>>>>
>>>>>>> Hi Ulf,
>>>>>>> this is a type annotation (JSR 308) bug that has been recently
>>>>>>> fixed - it is a duplicate of 6861837.
>>>>>>>
>>>>>>> Regards
>>>>>>> Maurizio
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
>


Parent Message unknown Re: javac CRASH

by Ulf Zibis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jonathan,

thanks for additional help.

Now I tried:
C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans
6.7.1\java2\ant\
bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0

... but this didn't make any difference.

I guess, you mean, to set or overwrite the boot.java.home property in
"build.properties".

So I set in path_to_jdk7_sources\langtools\make\build.properties:
   boot.java.home = C:/Programme/Java/jdk1.6.0_14

I started build from NetBeans
(path_to_jdk7_sources\langtools\make\netbeans\langtools\build.xml):

clean:
Deleting directory C:\Projects\OpenJDK7\langtools\build
Created dir: C:\Projects\OpenJDK7\langtools\build\toolclasses
Compiling 1 source file to C:\Projects\OpenJDK7\langtools\build\toolclasses
Building all tools
Compiling 2 source files to C:\Projects\OpenJDK7\langtools\build\toolclasses
build-bootstrap-javac:
Created dir: C:\Projects\OpenJDK7\langtools\build\bootstrap\gensrc
Created dir: C:\Projects\OpenJDK7\langtools\build\bootstrap\classes
Generating 7 resource files to
C:\Projects\OpenJDK7\langtools\build\bootstrap\gensrc
Copying 1 file to C:\Projects\OpenJDK7\langtools\build\bootstrap\gensrc
Generating 1 resource files to
C:\Projects\OpenJDK7\langtools\build\bootstrap\gensrc
Compiling 8 source files to
C:\Projects\OpenJDK7\langtools\build\bootstrap\classes
Compiling 271 source files to
C:\Projects\OpenJDK7\langtools\build\bootstrap\classes
Created dir: C:\Projects\OpenJDK7\langtools\build\bootstrap\lib
Building jar: C:\Projects\OpenJDK7\langtools\build\bootstrap\lib\javac.jar
Created dir: C:\Projects\OpenJDK7\langtools\build\bootstrap\bin
Copying 1 file to C:\Projects\OpenJDK7\langtools\build\bootstrap\bin
build-javac:
Created dir: C:\Projects\OpenJDK7\langtools\build\gensrc
Created dir: C:\Projects\OpenJDK7\langtools\build\classes
Generating 7 resource files to C:\Projects\OpenJDK7\langtools\build\gensrc
Copying 1 file to C:\Projects\OpenJDK7\langtools\build\gensrc
Generating 1 resource files to C:\Projects\OpenJDK7\langtools\build\gensrc
Compiling 8 source files to C:\Projects\OpenJDK7\langtools\build\classes
javac: invalid target release: 7
Usage: javac <options> <source files>
use -help for a list of possible options
C:\Projects\OpenJDK7\langtools\make\netbeans\langtools\build.xml:67: The
following error occurred while executing this line:
C:\Projects\OpenJDK7\langtools\make\build.xml:192: The following error
occurred while executing this line:
C:\Projects\OpenJDK7\langtools\make\build.xml:424: The following error
occurred while executing this line:
C:\Projects\OpenJDK7\langtools\make\build.xml:465: The following error
occurred while executing this line:
C:\Projects\OpenJDK7\langtools\make\build.xml:518: Compile failed; see
the compiler error output for details.
BUILD FAILED (total time: 23 seconds)


Then I tried:
    target.java.home = C:/Programme/Java/jdk1.7.0
and later:
   boot.javac.target = 7

... but nothing helped.

-Ulf


Am 11.08.2009 02:50, Jonathan Gibbons schrieb:

> Rémi , Ulf,
>
> If you're driving Ant directly, you want to set the Ant property
> boot.java.home,
> not the Makefile variable ALT_BOOTDIR.
>    ant -Dboot.java.home=path-to-jdk6or7 more-args....
>
> The path should be to the root of the installed JDK, not any of its
> subdirectories.
> For example, if you've installed JDK 1.7 in C:\opt\jdk\1.7.0 then use
>    ant -Dboot.java/home=C:/opt/jdk/1.7.0 more-args...
>
> -- Jon
>
>
>
> Rémi Forax wrote:
>> Le 11/08/2009 01:58, Ulf Zibis a écrit :
>>> Rémi, thanks.
>>>
>>> I just tried it, but got errors:
>>>
>>> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans
>>> 6.7.1\java2\ant\bin\ant"
>>> Buildfile: build.xml
>>>
>>> -def-check:
>>>
>>> -check-boot.java.home:
>>>
>>> BUILD FAILED
>>> C:\Projects\OpenJDK7\langtools\make\build.xml:370: The following
>>> error occurred
>>> while executing this line:
>>> C:\Projects\OpenJDK7\langtools\make\build.xml:737: Cannot locate
>>> bootstrap java:
>>> please set boot.java.home to its location
>>>
>>> Total time: 1 second
>>>
>>>
>>> -Ulf
>>
>> as said, set the bootstrap location,
>> with bash:
>> export ALT_BOOTDIR=path_to_a_binary_jdk6or7
>>
>> Rémi
>>
>>>
>>>
>>> Am 04.08.2009 15:17, Rémi Forax schrieb:
>>>> Le 04/08/2009 13:07, Ulf Zibis a écrit :
>>>>> Maurizio,
>>>>>
>>>>> much thanks for the additional info.
>>>>>
>>>>> I like to avoid going back to b63.
>>>>> If the fix will not go into b68, could you please provide a binary
>>>>> patch for b67 (or b68) (Windows version)?
>>>>> I can wait for release of b68, but not for b69, as I'm on vacation
>>>>> until Aug. 10.
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> -Ulf
>>>>
>>>> you can do it by yourself,
>>>> clone the langtools repository, it can be built with ant, so just
>>>> type ant
>>>> in the directory "make", it will create a tools.jar.
>>>> Now remplace the tools.jar of your binary build by this new one.
>>>>
>>>> cheers,
>>>> Rémi
>>>>
>>>>>
>>>>>
>>>>> Am 04.08.2009 12:20, Maurizio Cimadamore schrieb:
>>>>>> Ulf Zibis wrote:
>>>>>>> Maurizio,
>>>>>>>
>>>>>>> much thanks for the fast info.
>>>>>>>
>>>>>>> Will this fix be included in next build b68 ???
>>>>>>> Hopefully !
>>>>>> Not sure if it will make into b68 - but certainly it will go into
>>>>>> b69 (depends on the integration process). The fix is already
>>>>>> available in the langtools repository used for development
>>>>>> (http://hg.openjdk.java.net/jdk7/tl/langtools).
>>>>>>
>>>>>> Maurizio
>>>>>>>
>>>>>>> -Ulf
>>>>>>>
>>>>>>>
>>>>>>> Am 04.08.2009 11:08, Maurizio Cimadamore schrieb:
>>>>>>>> Ulf Zibis wrote:
>>>>>>>>> See:
>>>>>>>>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6868135 -->
>>>>>>>>> java.lang.NullPointerException from compiler (1.7.0-ea)
>>>>>>>>>
>>>>>>>>> -Ulf
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Hi Ulf,
>>>>>>>> this is a type annotation (JSR 308) bug that has been recently
>>>>>>>> fixed - it is a duplicate of 6861837.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> Maurizio
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>
>


Re: javac CRASH

by Remi Forax :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le 11/08/2009 11:06, Ulf Zibis a écrit :
> Jonathan,
>
> thanks for additional help.
>
> Now I tried:
> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans
> 6.7.1\java2\ant\
> bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0

I've noticed that.
You have to run ant with jdk7.

JAVA_HOME=C:/Programme/Java/jdk1.7.0
ant -Dboot.java/home=C:/Programme/Java/jdk1.7.0

Jon, it seems the ant build script need be updated because
we are not able to compile with jdk6 anymore.
The bootstrap javac/javap/etc should be built with -source 1.6 -target 1.6.

Rémi

Re: javac CRASH

by jonathan.gibbons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rémi,

Thanks for the heads up. I'll check this out.  It is still the case  
that you should only need 1.6 to build langtools.

-- Jon



On Aug 11, 2009, at 2:46 AM, Rémi Forax wrote:

> Le 11/08/2009 11:06, Ulf Zibis a écrit :
>> Jonathan,
>>
>> thanks for additional help.
>>
>> Now I tried:
>> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans  
>> 6.7.1\java2\ant\
>> bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>
> I've noticed that.
> You have to run ant with jdk7.
>
> JAVA_HOME=C:/Programme/Java/jdk1.7.0
> ant -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>
> Jon, it seems the ant build script need be updated because
> we are not able to compile with jdk6 anymore.
> The bootstrap javac/javap/etc should be built with -source 1.6 -
> target 1.6.
>
> Rémi


Re: javac CRASH

by Ulf Zibis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jon,

that would be great.

I've found out a solution, but I'm not sure, if this is as designed. In
path_to_jdk7_sources\langtools\make\build.properties I set:
boot.java.home = C:/Programme/Java/jdk1.6.0_14
target.java.home = C:/Programme/Java/jdk1.7.0
javac.source = 6
javac.target = 6

I'm wondering, that there is no ...\make\build.properties file in tl/jdk
tree.

Maybe you like to have a look on ...\make\netbeans\charset\* in my patch
for https://bugs.openjdk.java.net/show_bug.cgi?id=100098 ?

-Ulf



Am 11.08.2009 16:49, Jonathan Gibbons schrieb:

> Rémi,
>
> Thanks for the heads up. I'll check this out.  It is still the case
> that you should only need 1.6 to build langtools.
>
> -- Jon
>
>
>
> On Aug 11, 2009, at 2:46 AM, Rémi Forax wrote:
>
>> Le 11/08/2009 11:06, Ulf Zibis a écrit :
>>> Jonathan,
>>>
>>> thanks for additional help.
>>>
>>> Now I tried:
>>> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans
>>> 6.7.1\java2\ant\
>>> bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>
>> I've noticed that.
>> You have to run ant with jdk7.
>>
>> JAVA_HOME=C:/Programme/Java/jdk1.7.0
>> ant -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>
>> Jon, it seems the ant build script need be updated because
>> we are not able to compile with jdk6 anymore.
>> The bootstrap javac/javap/etc should be built with -source 1.6
>> -target 1.6.
>>
>> Rémi
>
>


Re: javac CRASH

by jonathan.gibbons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ulf,

Your settings for boot.java.home and target.java.home look OK.

The intent of the build is that while building the bootstrap compiler,  
the settings for boot.javac.source and boot.javac.target should be  
active and these are correctly set to 6 in langtools/make/
build.properties.  I will investigate why these might not be in use  
later today, when I have easy access to a Windows machine.

Separately, I also note that the intent is that you should not *need*  
to edit langtools/make/build.properties, although it is not incorrect  
to do so. But, it can lead to accidents if you might be committing and  
pushing changes.   To minimize that risk, you can provide/override  
values in a number of ways:
-- on the Ant command line (if you invoke Ant directly)
-- in NetBeans, in the Properties box under Tools> Options>  
Miscellaneous> Ant
-- in a new unmanaged file langtools/build.properties (note no make/  
component)
-- in ${user.home}/.openjdk/langtools-build.properties
-- in ${user.home}/.openjdk/build.properties
The last two choices allow you to set values to be shared by multiple  
repositories.

There is no make/build.properties in the jdk/ repository because that  
repository uses "make" instead of "ant" for building.   To build the  
jdk repository, you will need either MKS or Cygwin installed on your  
system. For more info, see the notes on the OpenJDK web pages. There  
are NetBeans projects for selected parts of the jdk/ to make it easy  
to work on small subsystems. However, I don't believe those (NetBeans)  
projects are being actively maintained at this point. [This does not  
apply to the langtools/ files. ]

-- Jon





On Aug 11, 2009, at 8:31 AM, Ulf Zibis wrote:

> Jon,
>
> that would be great.
>
> I've found out a solution, but I'm not sure, if this is as designed.  
> In path_to_jdk7_sources\langtools\make\build.properties I set:
> boot.java.home = C:/Programme/Java/jdk1.6.0_14
> target.java.home = C:/Programme/Java/jdk1.7.0
> javac.source = 6
> javac.target = 6
>
> I'm wondering, that there is no ...\make\build.properties file in tl/
> jdk tree.
>
> Maybe you like to have a look on ...\make\netbeans\charset\* in my  
> patch for https://bugs.openjdk.java.net/show_bug.cgi?id=100098 ?
>
> -Ulf
>
>
>
> Am 11.08.2009 16:49, Jonathan Gibbons schrieb:
>> Rémi,
>>
>> Thanks for the heads up. I'll check this out.  It is still the case  
>> that you should only need 1.6 to build langtools.
>>
>> -- Jon
>>
>>
>>
>> On Aug 11, 2009, at 2:46 AM, Rémi Forax wrote:
>>
>>> Le 11/08/2009 11:06, Ulf Zibis a écrit :
>>>> Jonathan,
>>>>
>>>> thanks for additional help.
>>>>
>>>> Now I tried:
>>>> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans  
>>>> 6.7.1\java2\ant\
>>>> bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>
>>> I've noticed that.
>>> You have to run ant with jdk7.
>>>
>>> JAVA_HOME=C:/Programme/Java/jdk1.7.0
>>> ant -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>
>>> Jon, it seems the ant build script need be updated because
>>> we are not able to compile with jdk6 anymore.
>>> The bootstrap javac/javap/etc should be built with -source 1.6 -
>>> target 1.6.
>>>
>>> Rémi
>>
>>
>


Re: javac CRASH

by jonathan.gibbons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ulf, Rémi,

I have found an issue in the langtools/make/build.xml file that is
likely the cause of the problems you are having.
There are references to @{javac.java.home}/bin/javac which look suspect.
I suspect they should be javac.exe
on Windows.

I will post a fix once I have one and have verified it for plain
invocation from the Windows command shell and
from Cygwin.

-- Jon


Ulf Zibis wrote:

> Jon,
>
> that would be great.
>
> I've found out a solution, but I'm not sure, if this is as designed.
> In path_to_jdk7_sources\langtools\make\build.properties I set:
> boot.java.home = C:/Programme/Java/jdk1.6.0_14
> target.java.home = C:/Programme/Java/jdk1.7.0
> javac.source = 6
> javac.target = 6
>
> I'm wondering, that there is no ...\make\build.properties file in
> tl/jdk tree.
>
> Maybe you like to have a look on ...\make\netbeans\charset\* in my
> patch for https://bugs.openjdk.java.net/show_bug.cgi?id=100098 ?
>
> -Ulf
>
>
>
> Am 11.08.2009 16:49, Jonathan Gibbons schrieb:
>> Rémi,
>>
>> Thanks for the heads up. I'll check this out.  It is still the case
>> that you should only need 1.6 to build langtools.
>>
>> -- Jon
>>
>>
>>
>> On Aug 11, 2009, at 2:46 AM, Rémi Forax wrote:
>>
>>> Le 11/08/2009 11:06, Ulf Zibis a écrit :
>>>> Jonathan,
>>>>
>>>> thanks for additional help.
>>>>
>>>> Now I tried:
>>>> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans
>>>> 6.7.1\java2\ant\
>>>> bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>
>>> I've noticed that.
>>> You have to run ant with jdk7.
>>>
>>> JAVA_HOME=C:/Programme/Java/jdk1.7.0
>>> ant -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>
>>> Jon, it seems the ant build script need be updated because
>>> we are not able to compile with jdk6 anymore.
>>> The bootstrap javac/javap/etc should be built with -source 1.6
>>> -target 1.6.
>>>
>>> Rémi
>>
>>
>


Re: javac CRASH

by jonathan.gibbons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Removed core-libs-dev.

The issue is that in a couple of places a default value for
javac.bootclasspath is set that includes -J-Xbootclasspath.
When the value is finally used, -J-Xbootclasspath is again included.  
The fix is to remove the use of -J-Xbootclasspath/p:
from the default settings for javac.bootclasspath.

-- Jon

Jonathan Gibbons wrote:

> Ulf, Rémi,
>
> I have found an issue in the langtools/make/build.xml file that is
> likely the cause of the problems you are having.
> There are references to @{javac.java.home}/bin/javac which look
> suspect. I suspect they should be javac.exe
> on Windows.
>
> I will post a fix once I have one and have verified it for plain
> invocation from the Windows command shell and
> from Cygwin.
>
> -- Jon
>
>
> Ulf Zibis wrote:
>> Jon,
>>
>> that would be great.
>>
>> I've found out a solution, but I'm not sure, if this is as designed.
>> In path_to_jdk7_sources\langtools\make\build.properties I set:
>> boot.java.home = C:/Programme/Java/jdk1.6.0_14
>> target.java.home = C:/Programme/Java/jdk1.7.0
>> javac.source = 6
>> javac.target = 6
>>
>> I'm wondering, that there is no ...\make\build.properties file in
>> tl/jdk tree.
>>
>> Maybe you like to have a look on ...\make\netbeans\charset\* in my
>> patch for https://bugs.openjdk.java.net/show_bug.cgi?id=100098 ?
>>
>> -Ulf
>>
>>
>>
>> Am 11.08.2009 16:49, Jonathan Gibbons schrieb:
>>> Rémi,
>>>
>>> Thanks for the heads up. I'll check this out.  It is still the case
>>> that you should only need 1.6 to build langtools.
>>>
>>> -- Jon
>>>
>>>
>>>
>>> On Aug 11, 2009, at 2:46 AM, Rémi Forax wrote:
>>>
>>>> Le 11/08/2009 11:06, Ulf Zibis a écrit :
>>>>> Jonathan,
>>>>>
>>>>> thanks for additional help.
>>>>>
>>>>> Now I tried:
>>>>> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans
>>>>> 6.7.1\java2\ant\
>>>>> bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>>
>>>> I've noticed that.
>>>> You have to run ant with jdk7.
>>>>
>>>> JAVA_HOME=C:/Programme/Java/jdk1.7.0
>>>> ant -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>>
>>>> Jon, it seems the ant build script need be updated because
>>>> we are not able to compile with jdk6 anymore.
>>>> The bootstrap javac/javap/etc should be built with -source 1.6
>>>> -target 1.6.
>>>>
>>>> Rémi
>>>
>>>
>>
>


Re: javac CRASH

by Ulf Zibis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jon,

thanks for 1st clarification.

I have
    bootstrap.jdk=C:/Programme/Java/jdk1.7.0
in ${user.home}/.openjdk/build.properties instead of boot.javac.target.
Why 2 different names for the same thing?
So I guess, settings for boot.javac.source and boot.javac.target should
be better located in ${user.home}/.openjdk/langtools-build.properties,
than in
${user.home}/.openjdk/build.properties ?

For NetBeans "Clean and Build" settings for boot.javac.source and
boot.javac.target in ${user.home}/.openjdk/*build.properties don't seem
to be necessary, and regrettably settings for:
    javac.source = 6
    javac.target = 6
don't work, either in
make/netbeans/langtools/nbproject/private/langtools.properties. I had to
set them in build.properties.


I'm not happy to use NetBeans Properties box under Tools> Options>
Miscellaneous> Ant, because those settings are for ALL NetBeans projects.
IMO best location would be:
make/netbeans/langtools/nbproject/private/langtools.properties. In
make/netbeans/langtools/build.xml they should be loaded before:
    <import file="../../build.xml"/>
Please add NetBeans project specific hints in make/build.properties.
...

Am 11.08.2009 17:59, Jonathan Gibbons schrieb:

> Ulf,
>
> Your settings for boot.java.home and target.java.home look OK.
>
> The intent of the build is that while building the bootstrap compiler,
> the settings for boot.javac.source and boot.javac.target should be
> active and these are correctly set to 6 in
> langtools/make/build.properties.  I will investigate why these might
> not be in use later today, when I have easy access to a Windows machine.
>
> Separately, I also note that the intent is that you should not *need*
> to edit langtools/make/build.properties, although it is not incorrect
> to do so. But, it can lead to accidents if you might be committing and
> pushing changes.   To minimize that risk, you can provide/override
> values in a number of ways:
> -- on the Ant command line (if you invoke Ant directly)
> -- in NetBeans, in the Properties box under Tools> Options>
> Miscellaneous> Ant
> -- in a new unmanaged file langtools/build.properties (note no make/
> component)
> -- in ${user.home}/.openjdk/langtools-build.properties
> -- in ${user.home}/.openjdk/build.properties
> The last two choices allow you to set values to be shared by multiple
> repositories.

Thanks for those valuable hints.
I would like to see those explicitly in make/build.properties.


-Ulf
 

>
> There is no make/build.properties in the jdk/ repository because that
> repository uses "make" instead of "ant" for building.   To build the
> jdk repository, you will need either MKS or Cygwin installed on your
> system. For more info, see the notes on the OpenJDK web pages. There
> are NetBeans projects for selected parts of the jdk/ to make it easy
> to work on small subsystems. However, I don't believe those (NetBeans)
> projects are being actively maintained at this point. [This does not
> apply to the langtools/ files. ]
>
> -- Jon
>
>
>
>
>
> On Aug 11, 2009, at 8:31 AM, Ulf Zibis wrote:
>
>> Jon,
>>
>> that would be great.
>>
>> I've found out a solution, but I'm not sure, if this is as designed.
>> In path_to_jdk7_sources\langtools\make\build.properties I set:
>> boot.java.home = C:/Programme/Java/jdk1.6.0_14
>> target.java.home = C:/Programme/Java/jdk1.7.0
>> javac.source = 6
>> javac.target = 6
>>
>> I'm wondering, that there is no ...\make\build.properties file in
>> tl/jdk tree.
>>
>> Maybe you like to have a look on ...\make\netbeans\charset\* in my
>> patch for https://bugs.openjdk.java.net/show_bug.cgi?id=100098 ?
>>
>> -Ulf
>>
>>
>>
>> Am 11.08.2009 16:49, Jonathan Gibbons schrieb:
>>> Rémi,
>>>
>>> Thanks for the heads up. I'll check this out.  It is still the case
>>> that you should only need 1.6 to build langtools.
>>>
>>> -- Jon
>>>
>>>
>>>
>>> On Aug 11, 2009, at 2:46 AM, Rémi Forax wrote:
>>>
>>>> Le 11/08/2009 11:06, Ulf Zibis a écrit :
>>>>> Jonathan,
>>>>>
>>>>> thanks for additional help.
>>>>>
>>>>> Now I tried:
>>>>> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans
>>>>> 6.7.1\java2\ant\
>>>>> bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>>
>>>> I've noticed that.
>>>> You have to run ant with jdk7.
>>>>
>>>> JAVA_HOME=C:/Programme/Java/jdk1.7.0
>>>> ant -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>>
>>>> Jon, it seems the ant build script need be updated because
>>>> we are not able to compile with jdk6 anymore.
>>>> The bootstrap javac/javap/etc should be built with -source 1.6
>>>> -target 1.6.
>>>>
>>>> Rémi
>>>
>>>
>>
>
>


Re: javac CRASH

by Ulf Zibis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry for cross-posting.

Am 11.08.2009 20:51, Jonathan Gibbons schrieb:
> Removed core-libs-dev.
>
> The issue is that in a couple of places a default value for
> javac.bootclasspath is set that includes -J-Xbootclasspath.
> When the value is finally used, -J-Xbootclasspath is again included.  
> The fix is to remove the use of -J-Xbootclasspath/p:
> from the default settings for javac.bootclasspath.

Will you do that, and commit to langtools forest soon?
Otherwise, what should I exactly change in which file ?

-Ulf


>
> -- Jon
>
> Jonathan Gibbons wrote:
>> Ulf, Rémi,
>>
>> I have found an issue in the langtools/make/build.xml file that is
>> likely the cause of the problems you are having.
>> There are references to @{javac.java.home}/bin/javac which look
>> suspect. I suspect they should be javac.exe
>> on Windows.
>>
>> I will post a fix once I have one and have verified it for plain
>> invocation from the Windows command shell and
>> from Cygwin.
>>
>> -- Jon
>>
>>
>> Ulf Zibis wrote:
>>> Jon,
>>>
>>> that would be great.
>>>
>>> I've found out a solution, but I'm not sure, if this is as designed.
>>> In path_to_jdk7_sources\langtools\make\build.properties I set:
>>> boot.java.home = C:/Programme/Java/jdk1.6.0_14
>>> target.java.home = C:/Programme/Java/jdk1.7.0
>>> javac.source = 6
>>> javac.target = 6
>>>
>>> I'm wondering, that there is no ...\make\build.properties file in
>>> tl/jdk tree.
>>>
>>> Maybe you like to have a look on ...\make\netbeans\charset\* in my
>>> patch for https://bugs.openjdk.java.net/show_bug.cgi?id=100098 ?
>>>
>>> -Ulf
>>>
>>>
>>>
>>> Am 11.08.2009 16:49, Jonathan Gibbons schrieb:
>>>> Rémi,
>>>>
>>>> Thanks for the heads up. I'll check this out.  It is still the case
>>>> that you should only need 1.6 to build langtools.
>>>>
>>>> -- Jon
>>>>
>>>>
>>>>
>>>> On Aug 11, 2009, at 2:46 AM, Rémi Forax wrote:
>>>>
>>>>> Le 11/08/2009 11:06, Ulf Zibis a écrit :
>>>>>> Jonathan,
>>>>>>
>>>>>> thanks for additional help.
>>>>>>
>>>>>> Now I tried:
>>>>>> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans
>>>>>> 6.7.1\java2\ant\
>>>>>> bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>>>
>>>>> I've noticed that.
>>>>> You have to run ant with jdk7.
>>>>>
>>>>> JAVA_HOME=C:/Programme/Java/jdk1.7.0
>>>>> ant -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>>>
>>>>> Jon, it seems the ant build script need be updated because
>>>>> we are not able to compile with jdk6 anymore.
>>>>> The bootstrap javac/javap/etc should be built with -source 1.6
>>>>> -target 1.6.
>>>>>
>>>>> Rémi
>>>>
>>>>
>>>
>>
>
>


Re: javac CRASH

by jonathan.gibbons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ulf Zibis wrote:
> Jon,
>
> thanks for 1st clarification.
>
> I have
>    bootstrap.jdk=C:/Programme/Java/jdk1.7.0
> in ${user.home}/.openjdk/build.properties instead of
> boot.javac.target. Why 2 different names for the same thing?

The NetBeans projects in the jdk/ repository were written by a different
person who has since left Sun.  As far as I know, no-one is looking
after those projects at this point.  I cannot speak to their contents.


> So I guess, settings for boot.javac.source and boot.javac.target
> should be better located in
> ${user.home}/.openjdk/langtools-build.properties, than in
> ${user.home}/.openjdk/build.properties ?
Yes, that would seem best.

>
> For NetBeans "Clean and Build" settings for boot.javac.source and
> boot.javac.target in ${user.home}/.openjdk/*build.properties don't
> seem to be necessary, and regrettably settings for:
>    javac.source = 6
>    javac.target = 6
> don't work, either in
> make/netbeans/langtools/nbproject/private/langtools.properties. I had
> to set them in build.properties.

This morning, we identified and fixed an issue with the setting of
javac.bootclasspath in the langtools/make/build.xml file.   A fix has
been pushed to the TL/ family of repositories. This should fix being
able to build langtools with JDK 6, so no additional changes to
javac.source and javac.target should be necessary.

>
>
> I'm not happy to use NetBeans Properties box under Tools> Options>
> Miscellaneous> Ant, because those settings are for ALL NetBeans projects.
Noted.  I mostly work on copies of the langtools repository so setting
values there works OK for me.  I accept this may not work for everyone.

> IMO best location would be:
> make/netbeans/langtools/nbproject/private/langtools.properties. In
> make/netbeans/langtools/build.xml they should be loaded before:
>    <import file="../../build.xml"/>

This would only work if you are using NetBeans all the time.

> Please add NetBeans project specific hints in make/build.properties.
> ...
There should not need to be any NetBeans project specific hints, because
you can configure and use make/build.xml and make/build.properties with
Ant directly, without using NetBeans.

Please bear in mind that some of this issues you have been fighting have
been caused by a mistake in make/build.xml, for which I apologise.   For
the most part, you should just have to set boot.java.home to build
langtools, and target.java.home and jtreg.home if you want to run the tests.

-- Jon


Re: javac CRASH

by jonathan.gibbons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ulf,

I have pushed changes into http://hg.openjdk.java.net/jdk7/tl/langtools 
(for JDK7)
and into http://hg.openjdk.java.net/jdk6/jdk6/langtools (for JDK6.)

With these fixes, I can build langtools on Windows using either the
attached build.bat
(for Windows shell) for build.sh (for Cygwin.)   In both cases I can
build with just JDK 6.

-- Jon


Ulf Zibis wrote:

> Sorry for cross-posting.
>
> Am 11.08.2009 20:51, Jonathan Gibbons schrieb:
>> Removed core-libs-dev.
>>
>> The issue is that in a couple of places a default value for
>> javac.bootclasspath is set that includes -J-Xbootclasspath.
>> When the value is finally used, -J-Xbootclasspath is again
>> included.   The fix is to remove the use of -J-Xbootclasspath/p:
>> from the default settings for javac.bootclasspath.
>
> Will you do that, and commit to langtools forest soon?
> Otherwise, what should I exactly change in which file ?
>
> -Ulf
>
>
>>
>> -- Jon
>>
>> Jonathan Gibbons wrote:
>>> Ulf, Rémi,
>>>
>>> I have found an issue in the langtools/make/build.xml file that is
>>> likely the cause of the problems you are having.
>>> There are references to @{javac.java.home}/bin/javac which look
>>> suspect. I suspect they should be javac.exe
>>> on Windows.
>>>
>>> I will post a fix once I have one and have verified it for plain
>>> invocation from the Windows command shell and
>>> from Cygwin.
>>>
>>> -- Jon
>>>
>>>
>>> Ulf Zibis wrote:
>>>> Jon,
>>>>
>>>> that would be great.
>>>>
>>>> I've found out a solution, but I'm not sure, if this is as
>>>> designed. In path_to_jdk7_sources\langtools\make\build.properties I
>>>> set:
>>>> boot.java.home = C:/Programme/Java/jdk1.6.0_14
>>>> target.java.home = C:/Programme/Java/jdk1.7.0
>>>> javac.source = 6
>>>> javac.target = 6
>>>>
>>>> I'm wondering, that there is no ...\make\build.properties file in
>>>> tl/jdk tree.
>>>>
>>>> Maybe you like to have a look on ...\make\netbeans\charset\* in my
>>>> patch for https://bugs.openjdk.java.net/show_bug.cgi?id=100098 ?
>>>>
>>>> -Ulf
>>>>
>>>>
>>>>
>>>> Am 11.08.2009 16:49, Jonathan Gibbons schrieb:
>>>>> Rémi,
>>>>>
>>>>> Thanks for the heads up. I'll check this out.  It is still the
>>>>> case that you should only need 1.6 to build langtools.
>>>>>
>>>>> -- Jon
>>>>>
>>>>>
>>>>>
>>>>> On Aug 11, 2009, at 2:46 AM, Rémi Forax wrote:
>>>>>
>>>>>> Le 11/08/2009 11:06, Ulf Zibis a écrit :
>>>>>>> Jonathan,
>>>>>>>
>>>>>>> thanks for additional help.
>>>>>>>
>>>>>>> Now I tried:
>>>>>>> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans
>>>>>>> 6.7.1\java2\ant\
>>>>>>> bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>>>>
>>>>>> I've noticed that.
>>>>>> You have to run ant with jdk7.
>>>>>>
>>>>>> JAVA_HOME=C:/Programme/Java/jdk1.7.0
>>>>>> ant -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>>>>>>
>>>>>> Jon, it seems the ant build script need be updated because
>>>>>> we are not able to compile with jdk6 anymore.
>>>>>> The bootstrap javac/javap/etc should be built with -source 1.6
>>>>>> -target 1.6.
>>>>>>
>>>>>> Rémi
>>>>>
>>>>>
>>>>
>>>
>>
>>
>

   The original attachment - build.bat - has been removed from this
   message, as it is a type of file which has recently been used
   to carry viruses and other malicious software.

   The following extensions are no longer supported as valid
   email attachments and will be removed since they are primarily
   used to carry viruses and other malicious software:

      asp bas bat chm cmd com exe hlp hta inf isp js jse lnk msi mst
      pcd pif reg scr url vbe vbs ws wsh sun.com.zip



build.sh (160 bytes) Download Attachment

Re: javac CRASH

by jonathan.gibbons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This thread continued on a subset of the to: list, but to summarize  
the net result here,
we identified and fixed a problem with the langtools make/build.xml  
file that was causing
bootclasspath problems on WIndows.  This problem has been fixed, and  
changesets
have been pushed to jdk6/jdk6 and jdk7/tl.

Thanks , Rémi and Ulf, for helping to point out the problem.

-- Jon


On Aug 11, 2009, at 2:46 AM, Rémi Forax wrote:

> Le 11/08/2009 11:06, Ulf Zibis a écrit :
>> Jonathan,
>>
>> thanks for additional help.
>>
>> Now I tried:
>> C:\Projects\OpenJDK7\langtools\make>"C:\Programme\Java\NetBeans  
>> 6.7.1\java2\ant\
>> bin\ant" -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>
> I've noticed that.
> You have to run ant with jdk7.
>
> JAVA_HOME=C:/Programme/Java/jdk1.7.0
> ant -Dboot.java/home=C:/Programme/Java/jdk1.7.0
>
> Jon, it seems the ant build script need be updated because
> we are not able to compile with jdk6 anymore.
> The bootstrap javac/javap/etc should be built with -source 1.6 -
> target 1.6.
>
> Rémi