HotSpot build failure with GCC 7.1.1
Yasumasa Suenaga
yasuenag at gmail.com
Thu Aug 3 13:16:33 UTC 2017
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.
Thanks,
Yasumasa
More information about the hotspot-dev
mailing list