-
Bug
-
Resolution: Fixed
-
P4
-
25
-
b06
A race in the build can cause (at least) the jhsdb launcher to get rebuilt in an incremental build, without anything having changed. Launchers are getting the java headers dir on their include path, if that dir exists. That dir is created by the java compilation for the respective module. As the top level <module>-launchers targets do not have prerequisites declared on the top level <module>-java targets, the existence of the header dir at the time a launcher is built is timing dependent. This becomes a problem because of the vardeps feature, where we save all relevant make variables for a target to trigger a rebuild if anything has changed in any of them.
I reproduced this by running the following targets in order:
$ make jdk.hotspot.agent-launchers
...
$ make jdk.hotspot.agent-java
...
$ make jdk.hotspot.agent-launchers
Building target 'jdk.hotspot.agent-launchers' in configuration 'macosx-aarch64'
Updating support/modules_cmds/jdk.hotspot.agent/jhsdb due to makefile changes
Finished building target 'jdk.hotspot.agent-launchers' in configuration 'macosx-aarch64'
The second run of jdk.hotspot.agent-launchers shouldn't do anything, but we see here that it rebuilds jhsdb launcher.
The launchers do not need these headers. I propose to fix this by adding an option to `JAVA_HEADERS` to SetupJdkNativeCompilation, which if set false prevents adding the java headers dir to the include paths in CFLAGS, and setting this parameter in SetupBuildLauncher.
I reproduced this by running the following targets in order:
$ make jdk.hotspot.agent-launchers
...
$ make jdk.hotspot.agent-java
...
$ make jdk.hotspot.agent-launchers
Building target 'jdk.hotspot.agent-launchers' in configuration 'macosx-aarch64'
Updating support/modules_cmds/jdk.hotspot.agent/jhsdb due to makefile changes
Finished building target 'jdk.hotspot.agent-launchers' in configuration 'macosx-aarch64'
The second run of jdk.hotspot.agent-launchers shouldn't do anything, but we see here that it rebuilds jhsdb launcher.
The launchers do not need these headers. I propose to fix this by adding an option to `JAVA_HEADERS` to SetupJdkNativeCompilation, which if set false prevents adding the java headers dir to the include paths in CFLAGS, and setting this parameter in SetupBuildLauncher.
- links to
-
Commit(master) openjdk/jdk/c5c4efda
-
Review(master) openjdk/jdk/22953