On Wed, 11 Mar 2026 15:04:33 GMT, Matthias Baesken <[email protected]> wrote:
>> When building with configure flag --enable-headless-only on windows x86_64,
>> we run into this linker error :
>>
>>
>> For target support_native_java.desktop_libawt_BUILD_LIBAWT_run_ld:
>> Creating library
>> C:\build_headless\support\native\java.desktop\libawt\awt.lib and object
>> C:\build_headless\support\native\java.desktop\libawt\awt.exp
>> WGLGraphicsConfig.obj : error LNK2019: unresolved external symbol
>> OGLFuncs_OpenLibrary referenced in function
>> Java_sun_java2d_opengl_WGLGraphicsConfig_initWGL
>> WGLGraphicsConfig.obj : error LNK2019: unresolved external symbol
>> OGLFuncs_CloseLibrary referenced in function
>> Java_sun_java2d_opengl_WGLGraphicsConfig_initWGL
>> WGLGraphicsConfig.obj : error LNK2019: unresolved external symbol
>> OGLFuncs_InitPlatformFuncs referenced in function
>> Java_sun_java2d_opengl_WGLGraphicsConfig_initWGL
>> WGLGraphicsConfig.obj : error LNK2019: unresolved external symbol
>> OGLFuncs_InitBaseFuncs referenced in function
>> Java_sun_java2d_opengl_WGLGraphicsConfig_initWGL
>> WGLGraphicsConfig.obj : error LNK2019: unresolved external symbol
>> OGLFuncs_InitExtFuncs referenced in function WGLGC_InitExtFuncs
>> WGLGraphicsConfig.obj : error LNK2019: unresolved external symbol
>> OGLContext_DestroyContextResources referenced in function
>> WGLGC_DestroyOGLContext
>> WGLGraphicsConfig.obj : error LNK2019: unresolved external symbol
>> OGLContext_IsExtensionAvailable referenced in function
>> Java_sun_java2d_opengl_WGLGraphicsConfig_getWGLConfigInfo
>> WGLGraphicsConfig.obj : error LNK2019: unresolved external symbol
>> OGLContext_GetExtensionInfo referenced in function
>> Java_sun_java2d_opengl_WGLGraphicsConfig_getWGLConfigInfo
>> WGLGraphicsConfig.obj : error LNK2019: unresolved external symbol
>> OGLContext_IsVersionSupported referenced in function
>> Java_sun_java2d_opengl_WGLGraphicsConfig_getWGLConfigInfo
>> WGLGraphicsConfig.obj : error LNK2001: unresolved external symbol
>> j2d_glGetString
>> WGLGraphicsConfig.obj : error LNK2001: unresolved external symbol
>> j2d_wglCreateContext
>> WGLGraphicsConfig.obj : error LNK2001: unresolved external symbol
>> j2d_wglDeleteContext
>> WGLGraphicsConfig.obj : error LNK2001: unresolved external symbol
>> j2d_wglMakeCurrent
>> WGLSurfaceData.obj : error LNK2001: unresolved external symbol
>> j2d_wglMakeCurrent
>> ... (rest of output omitted)
>
> Matthias Baesken has updated the pull request incrementally with one
> additional commit since the last revision:
>
> enable headless only is not supported on windows and macos
Other than a minor comment with spelling, it looks good to me.
make/autoconf/jdk-options.m4 line 108:
> 106: if test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
> 107: if test "x$OPENJDK_TARGET_OS" = xwindows || test
> "x$OPENJDK_TARGET_OS" = xmacosx; then
> 108: AC_MSG_ERROR([headless-only is not supported on macos and windows])
Suggestion:
AC_MSG_ERROR([headless-only is not supported on macOS and Windows])
I'd rather use the standard OS names, you used the usual spellings in the
comment above, yet in the error message everything's in lower case.
-------------
Marked as reviewed by aivanov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/30148#pullrequestreview-3968059064
PR Review Comment: https://git.openjdk.org/jdk/pull/30148#discussion_r2953645406