-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b41
-
b43
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8082021 | emb-9 | Erik Joelsson | P4 | Resolved | Fixed | b43 |
When using 8u25 as boot, and with a non fresh clone of jdk9/dev, it's possible to get the following build error:
>>>>>>>>>>
Compiling 23 files for BUILD_INTERIM_JIMAGE
/Users/src/jdk-dev/jdk9-dev/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java:230: error: cannot find symbol
LambdaForm form2 = mh.editor().filterArgumentForm(1+i, BasicType.basicType(newType));
^
symbol: method editor()
location: variable mh of type BoundMethodHandle
...
>>>>>>>>>>
This is caused by trying to compile a subset of java.base java source with -source/-target 8 and setting -sourcepath to /Users/src/jdk-dev/jdk9-dev/jdk/src/java.base/share/classes. Which classes to link to will depend on timestamps on the source and in the rt.jar in the boot jdk. A workaround is to touch all source files in java.base, but that will actually be incorrect as it will be linking to the jdk9 classes instead of the boot jdk classes.
We have a method for fixing these issues in the build, by setting sourcepath to something more specific, effectively excluding everything we aren't compiling. However, we also question the need for setting -sourcepath. We need to figure out why it was set in the first place and if it's still needed in any situation.
>>>>>>>>>>
Compiling 23 files for BUILD_INTERIM_JIMAGE
/Users/src/jdk-dev/jdk9-dev/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java:230: error: cannot find symbol
LambdaForm form2 = mh.editor().filterArgumentForm(1+i, BasicType.basicType(newType));
^
symbol: method editor()
location: variable mh of type BoundMethodHandle
...
>>>>>>>>>>
This is caused by trying to compile a subset of java.base java source with -source/-target 8 and setting -sourcepath to /Users/src/jdk-dev/jdk9-dev/jdk/src/java.base/share/classes. Which classes to link to will depend on timestamps on the source and in the rt.jar in the boot jdk. A workaround is to touch all source files in java.base, but that will actually be incorrect as it will be linking to the jdk9 classes instead of the boot jdk classes.
We have a method for fixing these issues in the build, by setting sourcepath to something more specific, effectively excluding everything we aren't compiling. However, we also question the need for setting -sourcepath. We need to figure out why it was set in the first place and if it's still needed in any situation.
- backported by
-
JDK-8082021 Investigate -sourcepath usage when compiling java
-
- Resolved
-
- relates to
-
JDK-8047177 JDK build should make use of the new -XXuserPathsFirst
-
- Closed
-