HotSpot build failure with GCC 7.1.1
Kim Barrett
kim.barrett at oracle.com
Thu Aug 3 17:12:55 UTC 2017
> On Aug 3, 2017, at 9:16 AM, Yasumasa Suenaga <yasuenag at gmail.com> wrote:
>
> Hi all,
>
> I tried to jdk10/hs on Fedora 26 x86_64 with GCC 7.1.1, however it was failed as below:
> -------------------
> /home/ysuenaga/OpenJDK/jdk10-hs/hotspot/src/share/vm/oops/array.hpp: In static member function 'static int Array<T>::size(int, int)':
> /home/ysuenaga/OpenJDK/jdk10-hs/hotspot/src/share/vm/oops/array.hpp:138:12: error: there are no arguments to 'align_size_up' that depend on a template parameter, so a declaration of 'align_size_up' must be available [-fpermissive]
> return align_size_up(byte_sizeof(length, elm_byte_size), BytesPerWord) / BytesPerWord; // FIXME
> ^~~~~~~~~~~~~
> /home/ysuenaga/OpenJDK/jdk10-hs/hotspot/src/share/vm/oops/array.hpp:138:12: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
> In file included from /home/ysuenaga/OpenJDK/jdk10-hs/hotspot/src/share/vm/runtime/os.inline.hpp:30:0,
> from /home/ysuenaga/OpenJDK/jdk10-hs/hotspot/src/share/vm/runtime/thread.inline.hpp:31,
> ... (rest of output omitted)
> -------------------
>
> I think this failure is since JDK-8072061:
> http://hg.openjdk.java.net/jdk10/hs/hotspot/rev/731370f39fcd#l42.35
>
> IMHO we can fix this error as below:
> -------------------
> diff -r 731370f39fcd src/share/vm/oops/array.hpp
> --- a/src/share/vm/oops/array.hpp Wed Aug 02 18:06:38 2017 -0700
> +++ b/src/share/vm/oops/array.hpp Thu Aug 03 22:14:46 2017 +0900
> @@ -135,7 +135,7 @@
> return (int)words;
> }
> static int size(int length, int elm_byte_size) {
> - return align_size_up(byte_sizeof(length, elm_byte_size), BytesPerWord) / BytesPerWord; // FIXME
> + return align_up(byte_sizeof(length, elm_byte_size), BytesPerWord) / BytesPerWord;
> }
>
> int size() {
> -------------------
>
> Someone is working for this issue?
> If not, I will file it to JBS and will send review request.
I don’t know of a bug for this. Yes, please fix.
I’m surprised this made it through JPRT. There is value dependency on T (in byte_sizeof),
but it doesn’t seem like something that ought to make the lookup of align_size_up dependent.
I guess I need to go re-read about two-phase lookup.
More information about the hotspot-dev
mailing list