Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
195 views
in Technique[技术] by (71.8m points)

java - Build OpenJDK for Windows 10 reports an error

Compiler Environment:

  1. Cygwin64
  2. Visual Studio 2017
  3. Build Source: OpenJDK17
  4. Boot the JDK:

openjdk version "15" 2020-09-15

OpenJDK Runtime Environment (build 15+36-1562)

OpenJDK 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)

Excuting an order:

  1. bash configure
  2. make images

The error message is as follows:

$ make images
Building target 'images' in configuration 'windows-x86_64-server-release'
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): error C2220: warning treated as error - no 'object' file generated
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): warning C4778: 'sscanf' : unterminated format string '%255[*x01x02x03x04x05x06a
vf
x0ex0fx10x11x12x13x14x15x16x17x18x19x1ax1bx1cx1dx1ex1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~xe2x82xacxe4xbax97xe5x84x8exe5x8ex97%n'
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): warning C4474: 'sscanf' : too many arguments passed for format string
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): note: placeholders and their parameters expect 1 variadic arguments, but 3 were provided
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(318): warning C4778: 'sscanf' : unterminated format string '%1022[[);/x01x02x03x04x05x06a
vf
x0ex0fx10x11x12x13x14x15make[3]: *** [lib/CompileJvm.gmk:143: /cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objs/methodMatcher.obj] Error 1
x16x17x18x19x1ax1bx1cx1dx1ex1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~xe2x82xacxe4xbax97xe5x84x8exe5x8e%n'
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(318): warning C4474: 'sscanf' : too many arguments passed for format string
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(318): note: placeholders and their parameters expect 0 variadic arguments, but 2 were provided
make[2]: *** [make/Main.gmk:252: hotspot-server-libs] Error 2
make[2]: *** Waiting for unfinished jobs....

ERROR: Build failed for target 'images' in configuration 'windows-x86_64-server-release' (exit code 2)

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_methodMatcher.obj:
methodMatcher.cpp
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): error C2220: warning treated as error - no 'object' file generated
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): warning C4778: 'sscanf' : unterminated format string '%255[*x01x02x03x04x05x06a
vf
x0ex0fx10x11x12x13x14x15x16x17x18x19x1ax1bx1cx1dx1ex1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~xe2x82xacxe4xbax97xe5x84x8exe5x8ex97%n'
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): warning C4474: 'sscanf' : too many arguments passed for format string
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): note: placeholders and their parameters expect 1 variadic arguments, but 3 were provided
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(318): warning C4778: 'sscanf' : unterminated format string '%1022[[);/x01x02x03x04x05x06a
vf
x0ex0fx10x11x12x13x14x15x16x17x18x19x1ax1bx1cx1dx1ex1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~xe2x82xacxe4xbax97xe5x84x8exe5x8e%n'
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(318): warning C4474: 'sscanf' : too many arguments passed for format string
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(318): note: placeholders and their parameters expect 0 variadic arguments, but 2 were provided

* All command lines available in /cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/make-support/failure-logs.
=== End of repeated output ===

No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See doc/building.html#troubleshooting for assistance.

make[1]: *** [/cygdrive/g/buildJDK/openjdk/make/Init.gmk:315: main] Error 2
make: *** [/cygdrive/g/buildJDK/openjdk/make/Init.gmk:186: images] Error 2

hotspot_variant-server_libjvm_objs_methodMatcher.obj.cmdline

/cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/fixpath exec /cygdrive/c/progra~2/micros~2/2017/profes~1/vc/tools/msvc/1416~1.270/bin/hostx86/x64/cl.exe -showIncludes -Fp/cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objs/BUILD_LIBJVM.pch -Yuprecompiled.hpp -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNOMINMAX -DWIN32_LEAN_AND_MEAN -nologo -MD -MP -std:c++14 -DLIBC=default -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_ -W3 -pathmap:g:uildjdkopenjdk=s -pathmap:g:uildjdkopenjdk=s -experimental:deterministic -wd5048 -DVM_LITTLE_ENDIAN -D_LP64=1 -DPRODUCT -DTARGET_ARCH_x86 -DINCLUDE_SUFFIX_OS=_windows -DINCLUDE_SUFFIX_CPU=_x86 -DINCLUDE_SUFFIX_COMPILER=_visCPP -DTARGET_COMPILER_visCPP -DAMD64 -DHOTSPOT_LIB_ARCH='"amd64"' -DCOMPILER1 -DCOMPILER2 -I/cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/hotspot/variant-server/gensrc/adfiles -I/cygdrive/g/buildjdk/openjdk/src/hotspot/share -I/cygdrive/g/buildjdk/openjdk/src/hotspot/os/windows -I/cygdrive/g/buildjdk/openjdk/src/hotspot/cpu/x86 -I/cygdrive/g/buildjdk/openjdk/src/hotspot/os_cpu/windows_x86 -I/cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/hotspot/variant-server/gensrc -I/cygdrive/g/buildjdk/openjdk/src/hotspot/share/precompiled -I/cygdrive/g/buildjdk/openjdk/src/hotspot/share/include -I/cygdrive/g/buildjdk/openjdk/src/hotspot/os/windows/include -I/cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/support/modules_include/java.base -I/cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/support/modules_include/java.base/win32 -I/cygdrive/g/buildjdk/openjdk/src/java.base/share/native/libjimage -I/cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/hotspot/variant-server/gensrc/adfiles -I/cygdrive/g/buildjdk/openjdk/src/hotspot/share -I/cygdrive/g/buildjdk/openjdk/src/hotspot/os/windows -I/cygdrive/g/buildjdk/openjdk/src/hotspot/cpu/x86 -I/cygdrive/g/buildjdk/openjdk/src/hotspot/os_cpu/windows_x86 -I/cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/hotspot/variant-server/gensrc -Z7 -wd4800 -wd4307 -wd4100 -wd4127 -wd4146 -wd4201 -wd4244 -wd4291 -wd4351 -wd4511 -wd4512 -wd4514 -wd4624 -wd4996 -WX -I/cygdrive/c/progra~2/micros~2/2017/profes~1/vc/tools/msvc/1416~1.270/atlmfc/include -I/cygdrive/c/progra~2/micros~2/2017/profes~1/vc/tools/msvc/1416~1.270/include -I/cygdrive/c/progra~2/wi3cf2~1/10/include/100177~1.0/ucrt -I/cygdrive/c/progra~2/wi3cf2~1/10/include/100177~1.0/shared -I/cygdrive/c/progra~2/wi3cf2~1/10/include/100177~1.0/um -I/cygdrive/c/progra~2/wi3cf2~1/10/include/100177~1.0/winrt -I/cygdrive/c/progra~2/wi3cf2~1/10/include/100177~1.0/cppwinrt -O2 -Oy- -c -Fo/cygdrive/g/buildjdk/openjdk/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objs/methodMatcher.obj /cygdrive/g/buildjdk/openjdk/src/hotspot/share/compiler/methodMatcher.cpp

hotspot_variant-server_libjvm_objs_methodMatcher.obj.log

methodMatcher.cpp
Note: including file: g:uildjdkopenjdksrchotspotshareclassfile/symbolTable.hpp
Note: including file:  g:uildjdkopenjdksrchotspotshareutilities/tableStatistics.hpp
Note: including file: g:uildjdkopenjdksrchotspotsharecompiler/methodMatcher.hpp
Note: including file: g:uildjdkopenjdksrchotspotsharememory/oopFactory.hpp
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): error C2220: warning treated as error - no 'object' file generated
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): warning C4778: 'sscanf' : unterminated format string '%255[*x01x02x03x04x05x06a
vf
x0ex0fx10x11x12x13x14x15x16x17x18x19x1ax1bx1cx1dx1ex1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~xe2x82xacxe4xbax97xe5x84x8exe5x8ex97%n'
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): warning C4474: 'sscanf' : too many arguments passed for format string
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(268): note: placeholders and their parameters expect 1 variadic arguments, but 3 were provided
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(318): warning C4778: 'sscanf' : unterminated format string '%1022[[);/x01x02x03x04x05x06a
vf
x0ex0fx10x11x12x13x14x15x16x17x18x19x1ax1bx1cx1dx1ex1f!"#$%&'*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz{|}~xe2x82xacxe4xbax97xe5x84x8exe5x8e%n'
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(318): warning C4474: 'sscanf' : too many arguments passed for format string
g:uildjdkopenjdksrchotspotsharecompilermethodMatcher.cpp(318): note: placeholders and their parameters expect 0 variadic arguments, but 2 were provided

How do I handle the error message, thank you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...