OpenJDK 16 (ee1d592a9f53+ tip) - compilation error in "sharedRuntime.cpp:2849"

daniel.daugherty at oracle.com daniel.daugherty at oracle.com
Tue Feb 23 16:57:58 UTC 2021


That looks like this bug:

     JDK-8253375 OSX build fails with Xcode 12.0 (12A7209)
     https://bugs.openjdk.java.net/browse/JDK-8253375

which is fixed in JDK16-b16 (integrated on 2020.09.22).

Dan


On 2/23/21 11:04 AM, Roger Riggs wrote:
> Hi,
>
> Likely this is new checking in XCode 12.
>
> You are more likely to get an informed response on hotspot-runtime.dev.
>
> Moving build-dev to Bcc.
>
> Roger
>
>
> On 2/23/21 8:37 AM, Chris W. Johnson wrote:
>> I'm experiencing an OpenJDK build failure on macOS 10.15.7 with 
>> OpenJDK 15.0.2 (15.0.2+7-27) and Xcode 12.4 installed. Specifically, 
>> a compilation error on line 2849 of 
>> "src/hotspot/share/runtime/sharedRuntime.cpp" (see below).
>>
>> I'm finishing-up a (would-be) OpenJDK contribution, and need to 
>> expose it to the full test suite before submission. In the past, I've 
>> had no trouble either building OpenJDK 13 through 15 in various 
>> states of their development, or passing the test suite. However, this 
>> build issue has me stuck. Some aspects of my system configuration 
>> have changed since my previous OpenJDK build and test, but a C++ 
>> compilation error is not how I'd expect a configuration change to 
>> break the build, for whatever my expectations are worth.
>>
>> Any insights? Is this a symptom of a problem on my side, or is the 
>> issue really as straightforward as a compilation problem in the 
>> "sharedRuntime.cpp" source?
>>
>> Thanks in advance,
>>
>> ----Chris
>>
>> Chris W. Johnson              \ "Workers: Remember, there is no
>> --                             \ 'help me, I'm bleeding internally and
>> http://www.panojohnson.com/     \  need to see a doctor' in 'team'."
>>
>>
>>
>>
>>
>>
>> Compiling 944 files for jdk.hotspot.agent
>> /Users/chrisj/Documents/IdeaProjectsSSD/jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2849:85: 
>> error: expression does not compute the number of elements in this 
>> array; element type is 'double', not 'relocInfo' 
>> [-Werror,-Wsizeof-array-div]
>> buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, 
>> sizeof(locs_buf) / sizeof(relocInfo));
>> ~~~~~~~~  ^
>> /Users/chrisj/Documents/IdeaProjectsSSD/jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2848:14: 
>> note: array 'locs_buf' declared here
>>        double locs_buf[20];
>>               ^
>> /Users/chrisj/Documents/IdeaProjectsSSD/jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2849:85: 
>> note: place parentheses around the 'sizeof(relocInfo)' expression to 
>> silence this warning
>> buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, 
>> sizeof(locs_buf) / sizeof(relocInfo));
>> ^
>> 1 error generated.
>> make[3]: *** 
>> [/Users/chrisj/Documents/IdeaProjectsSSD/jdk/build/macosx-x86_64-server-release/hotspot/variant-server/libjvm/objs/sharedRuntime.o] 
>> Error 1
>> make[3]: *** Waiting for unfinished jobs....
>> make[2]: *** [hotspot-server-libs] Error 2
>>
>> ERROR: Build failed for target 'images' in configuration 
>> 'macosx-x86_64-server-release' (exit code 2)
>> Stopping sjavac server
>>
>> === Output from failing command(s) repeated here ===
>> * For target hotspot_variant-server_libjvm_objs_sharedRuntime.o:
>> /Users/chrisj/Documents/IdeaProjectsSSD/jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2849:85: 
>> error: expression does not compute the number of elements in this 
>> array; element type is 'double', not 'relocInfo' 
>> [-Werror,-Wsizeof-array-div]
>> buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, 
>> sizeof(locs_buf) / sizeof(relocInfo));
>> ~~~~~~~~  ^
>> /Users/chrisj/Documents/IdeaProjectsSSD/jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2848:14: 
>> note: array 'locs_buf' declared here
>>        double locs_buf[20];
>>               ^
>> /Users/chrisj/Documents/IdeaProjectsSSD/jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2849:85: 
>> note: place parentheses around the 'sizeof(relocInfo)' expression to 
>> silence this warning
>> buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, 
>> sizeof(locs_buf) / sizeof(relocInfo));
>> ^
>> 1 error generated.
>>
>> * All command lines available in 
>> /Users/chrisj/Documents/IdeaProjectsSSD/jdk/build/macosx-x86_64-server-release/make-support/failure-logs.
>> === End of repeated output ===
>>
>>
>>
>>
>>
>>
>>
>>
>



More information about the hotspot-runtime-dev mailing list