Closed AswathySK closed 6 months ago
@keithc-ca any ideas?
I've seen this myself and wasn't quite sure why it didn't happen in jenkins builds. I narrowed it down to management of dependencies for .nasm
files. I'm updating my cmake version, perhaps it's fixed already.
cmake version 3.28.3 didn't fare any better.
@keithc-ca , cmake version in most of our build machines are 3.14.5. And personally when I encountered this error last time rolling down cmake to 3.20.1 did the trick.
What do you think is different in higher cmake versions that might be causing this issue?
Older versions of cmake don't automatically track dependencies for .nasm
files. It seems the new tracking doesn't play nicely with our use of fixpath.sh
.
For example, consider AMD64CompressString.nasm
; nasm
creates a .d
file which says:
runtime/compiler/CMakeFiles/j9jit.dir/x/amd64/runtime/AMD64CompressString.nasm.obj : \
c:\space\jdk21\openj9\runtime\compiler\x\amd64\runtime\AMD64CompressString.nasm \
c:\space\jdk21\build\normal\vm\runtime\oti\jilconsts.inc \
c:\space\jdk21\openj9\runtime\compiler\x\amd64\runtime\AMD64CompressString.inc
Then cmake
translates this the following rule in runtime/compiler/CMakeFiles/j9jit.dir/compiler_depend.make
:
runtime/compiler/CMakeFiles/j9jit.dir/x/amd64/runtime/AMD64CompressString.nasm.obj: /cygdrive/c/space/jdk21/openj9/runtime/compiler/x/amd64/runtime/AMD64CompressString.nasm \
runtime/compiler/c:/space/jdk21/build/normal/vm/runtime/oti/jilconsts.inc \
runtime/compiler/c:/space/jdk21/openj9/runtime/compiler/x/amd64/runtime/AMD64CompressString.inc \
runtime/compiler/c:/space/jdk21/openj9/runtime/compiler/x/amd64/runtime/AMD64CompressString.nasm
It seems that cmake
's preference for using relative paths doesn't work so well.
My plan is to just disable automatic dependency management for .nasm
files on Windows.
Java -version output
$ java -version openjdk version "11.0.22" 2024-01-16 IBM Semeru Runtime Open Edition 11.0.22.0 (build 11.0.22+7) Eclipse OpenJ9 VM 11.0.22.0 (build openj9-0.43.0, JRE 11 Windows Server 2019 amd64-64-Bit Compressed References 20240131_835 (JIT enabled, AOT enabled) OpenJ9 - 2c3d78b48 OMR - ea8124dbc
Summary of problem
While running build compile for a windows 19 machine (with VS2022 ) I am running into
multiple target patterns. Stop. make[6]: *** [CMakeFiles/Makefile2:8528: runtime/compiler/CMakeFiles/j9jit.dir/all] Error 2
error while running make all.I have faced this issue before and by rolling down version of cmake to v3.20.1 helped me avoid this error. Since cygwin installer only has recent versions of packages to be installed for the recent cygwin installer cmake v3.20.1 is unavailable, only v3.23 and higher is available at the moment.
job reference: https://hyc-runtimes-jenkins.swg-devops.com/job/Build_JDK11_x86-64_windows_Personal/1595/console
Diagnostic files
I tried uninstalling cmake from cygwin and installed v3.20.1 from source and linked cygwins /usr/bin/cmake to the installed directory. But for that the build is using Nmake instead of cmake .