Fwd: Re: Lambda does not compile against JDK8 binary snapshot as boot JDK

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue Nov 27 13:49:23 PST 2012


Looks good to me. This is being tracked as 8004068.

-- Jon

On 11/27/2012 12:32 PM, Eric Caspole wrote:
> Hi everyone,
> I made a webrev to fix some use of "import java.util.*;" in javac code 
> which had been causing JDK 8 build problems. That problem is no longer 
> occurring, but here is the fix anyway:
>
>  http://cr.openjdk.java.net/~ecaspole/javac_imports/webrev.00/
>
> The back story is shown below.
> Thanks,
> Eric
>
>
> -------- Original Message --------
> Subject: Re: Lambda does not compile against JDK8 binary snapshot as 
> boot JDK
> Date: Tue, 27 Nov 2012 10:56:41 -0800
> From: Jonathan Gibbons <jonathan.gibbons at oracle.com>
> To: <lambda-dev at openjdk.java.net>
>
> Eric,
>
> Please post a request for review for your patch on
> compiler-dev at openjdk.java.net.
>
> -- Jon
>
> On 11/27/2012 09:51 AM, Eric Caspole wrote:
>> Hi everybody,
>> As Remi said, this problem does not happen anymore, but I fixed the
>> javac imports anyway which seemed worthwhile. I am not sure if this is
>> the right list for javac mods but maybe you can suggest how to proceed.
>>
>>    http://cr.openjdk.java.net/~ecaspole/javac_imports/webrev.00/
>>
>> Thanks,
>> Eric
>>
>>
>>
>> On 11/15/2012 11:05 AM, Remi Forax wrote:
>>> On 11/15/2012 04:55 PM, Caspole, Eric wrote:
>>>> Hi lambda people,
>>>> I seem to have found a problem when using the last week's lamdba 
>>>> binary snapshot as the boot JDK for the build. The build works fine 
>>>> if the boot JDK is 7u9. I don't think I ever tried this combination 
>>>> before.
>>>>
>>>> Looks like there is a new java.util.Mapping in 8. So I think the 
>>>> guilty thing is use of java.util.* in 
>>>> src/share/classes/com/sun/tools/javac/code/Types.java?
>>>>
>>>>      26 package com.sun.tools.javac.code;
>>>>      27
>>>>      28 import java.lang.ref.SoftReference;
>>>>      29 import java.util.*;
>>>>      30
>>>>
>>>> Regards,
>>>> Eric
>>> Classical import * bug.
>>> BTW, java.util.Mapping was removed very recently, so it should work 
>>> again.
>>>
>>> Rémi
>>>
>>>> Here is my build output:
>>>>
>>>> ecaspole at ecaspole-desktop:~/Documents/121115/lambda/common/makefiles$ 
>>>> java -version
>>>> openjdk version "1.8.0-ea"
>>>> OpenJDK Runtime Environment (build 
>>>> 1.8.0-ea-lambda-nightly-h1745-20121105-b64-b00)
>>>> OpenJDK 64-Bit Server VM (build 25.0-b05, mixed mode)
>>>>
>>>> ====================================================
>>>> A new configuration has been successfully created in
>>>> /home/ecaspole/Documents/121115/lambda/build/linux-x86_64-normal-server-release 
>>>>
>>>> using default settings.
>>>>
>>>> Configuration summary:
>>>> * Debug level:    release
>>>> * JDK variant:    normal
>>>> * JVM variants:   server
>>>> * OpenJDK target: OS: linux, CPU architecture: x86, address length: 64
>>>> * Boot JDK:       /opt/jdk1.8.0
>>>>
>>>> Build performance summary:
>>>> * Cores to use:   4
>>>> * Memory limit:   7986 MB
>>>> * ccache status:  not installed (consider installing)
>>>>
>>>> ...
>>>>
>>>> ecaspole at ecaspole-desktop:~/Documents/121115/lambda/common/makefiles$ 
>>>> make images
>>>> Building OpenJDK for target 'images' in configuration 
>>>> 'linux-x86_64-normal-server-release'
>>>>
>>>>
>>>> ######################################################################## 
>>>>
>>>> ######################################################################## 
>>>>
>>>> ##### Entering langtools for target(s) all                         
>>>> #####
>>>> ######################################################################## 
>>>>
>>>>
>>>> Compiling 2 files for BUILD_TOOLS
>>>> /home/ecaspole/Documents/121115/lambda/langtools/src/share/classes/com/sun/tools/javac/code/Types.java:1519: 
>>>> error: reference to Mapping is ambiguous
>>>>        private final Mapping lowerBoundMapping = new 
>>>> Mapping("lowerBound") {
>>>>                      ^
>>>>      both class com.sun.tools.javac.code.Type.Mapping in Type and 
>>>> interface java.util.Mapping in java.util match
>>>> /home/ecaspole/Documents/121115/lambda/langtools/src/share/classes/com/sun/tools/javac/code/Types.java:1633: 
>>>> error: reference to Mapping is ambiguous
>>>>        private Mapping elemTypeFun = new Mapping ("elemTypeFun") {
>>>>                ^
>>>>      both class com.sun.tools.javac.code.Type.Mapping in Type and 
>>>> interface java.util.Mapping in java.util match
>>>> /home/ecaspole/Documents/121115/lambda/langtools/src/share/classes/com/sun/tools/javac/code/Types.java:1943: 
>>>> error: reference to Mapping is ambiguous
>>>>        private Mapping erasureFun = new Mapping ("erasure") {
>>>>                ^
>>>>      both class com.sun.tools.javac.code.Type.Mapping in Type and 
>>>> interface java.util.Mapping in java.util match
>>>> /home/ecaspole/Documents/121115/lambda/langtools/src/share/classes/com/sun/tools/javac/code/Types.java:1947: 
>>>> error: reference to Mapping is ambiguous
>>>>        private Mapping erasureRecFun = new Mapping 
>>>> ("erasureRecursive") {
>>>>                ^
>>>>      both class com.sun.tools.javac.code.Type.Mapping in Type and 
>>>> interface java.util.Mapping in java.util match
>>>> /home/ecaspole/Documents/121115/lambda/langtools/src/share/classes/com/sun/tools/javac/code/Types.java:2802: 
>>>> error: reference to Mapping is ambiguous
>>>>        static private Mapping newInstanceFun = new 
>>>> Mapping("newInstanceFun") {
>>>>                       ^
>>>>      both class com.sun.tools.javac.code.Type.Mapping in Type and 
>>>> interface java.util.Mapping in java.util match
>>>> /home/ecaspole/Documents/121115/lambda/langtools/src/share/classes/com/sun/tools/javac/code/Types.java:1519: 
>>>> error: reference to Mapping is ambiguous
>>>>        private final Mapping lowerBoundMapping = new 
>>>> Mapping("lowerBound") {
>>>>                                                      ^
>>>>      both class com.sun.tools.javac.code.Type.Mapping in Type and 
>>>> interface java.util.Mapping in java.util match
>>>> /home/ecaspole/Documents/121115/lambda/langtools/src/share/classes/com/sun/tools/javac/code/Types.java:1633: 
>>>> error: reference to Mapping is ambiguous
>>>>        private Mapping elemTypeFun = new Mapping ("elemTypeFun") {
>>>>                                          ^
>>>>      both class com.sun.tools.javac.code.Type.Mapping in Type and 
>>>> interface java.util.Mapping in java.util match
>>>> /home/ecaspole/Documents/121115/lambda/langtools/src/share/classes/com/sun/tools/javac/code/Types.java:1943: 
>>>> error: reference to Mapping is ambiguous
>>>>        private Mapping erasureFun = new Mapping ("erasure") {
>>>>                                         ^
>>>>      both class com.sun.tools.javac.code.Type.Mapping in Type and 
>>>> interface java.util.Mapping in java.util match
>>>> /home/ecaspole/Documents/121115/lambda/langtools/src/share/classes/com/sun/tools/javac/code/Types.java:1947: 
>>>> error: reference to Mapping is ambiguous
>>>>        private Mapping erasureRecFun = new Mapping 
>>>> ("erasureRecursive") {
>>>>                                            ^
>>>>      both class com.sun.tools.javac.code.Type.Mapping in Type and 
>>>> interface java.util.Mapping in java.util match
>>>> /home/ecaspole/Documents/121115/lambda/langtools/src/share/classes/com/sun/tools/javac/code/Types.java:2802: 
>>>> error: reference to Mapping is ambiguous
>>>>        static private Mapping newInstanceFun = new 
>>>> Mapping("newInstanceFun") {
>>>>                                                    ^
>>>>      both class com.sun.tools.javac.code.Type.Mapping in Type and 
>>>> interface java.util.Mapping in java.util match
>>>> 10 errors
>>>> make[1]: *** No rule to make target `all', needed by `default'.  Stop.
>>>> make: *** [langtools-only] Error 2
>>>>
>>>>
>>>
>>>
>>
>
>
>
>
>
>




More information about the compiler-dev mailing list