-
Bug
-
Resolution: Fixed
-
P3
-
18
-
Visual Studio 2019 Developer Command Prompt v16.8.5 is used for building
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8277271 | 17.0.3-oracle | Alex Kasko | P3 | Resolved | Fixed | b01 |
JDK-8277064 | 17.0.2 | Alex Kasko | P3 | Resolved | Fixed | b05 |
On 17/06/2021 9:47 am, Vitaly Provodin wrote:
> Hi all,
>
> Building OpenJDK on Windows I am faced with the following error
>
> ---------------------------8<---------------------------
> os_windows.obj : error LNK2019: unresolved external symbol "int __cdecl convert_to_unicode(char const *,wchar_t * *)" (?convert_to_unicode@@YAHPEBDPEAPEA_W@Z) referenced in function "public: static void __cdecl os::set_native_thread_name(char const *)" (?set_native_thread_name@os@@SAXPEBD@Z)
> c:\buildagent\work\d0555747f6bd5c6\build\windows-x86_64-server-release\support\modules_libs\java.base\server\jvm.dll : fatal error LNK1120: 1 unresolved externals
This is not seen by all users.
convert_to_unicode is a static function in os_windows.cpp and was used prior to this recent change with set_native_thread_name(). The only difference is that we declared a function prototype for it, as a forward declaration, as it is defined later in the file. It seems the prototype and the definition are subtly different, leading to the linker thinking this is an external reference.
- backported by
-
JDK-8277064 Windows: link error: unresolved external symbol "int __cdecl convert_to_unicode(char const *,wchar_t * *)"
-
- Resolved
-
-
JDK-8277271 Windows: link error: unresolved external symbol "int __cdecl convert_to_unicode(char const *,wchar_t * *)"
-
- Resolved
-
- relates to
-
JDK-8238649 Call new Win32 API SetThreadDescription in os::set_native_thread_name
-
- Resolved
-
- links to
-
Commit openjdk/jdk17u/23b4496e
-
Commit openjdk/jdk/e8446107
-
Review openjdk/jdk17u/244
-
Review openjdk/jdk/4516