Debug build still fail on Linux 64bit with GCC 4.7.2
Henry Jen
henry.jen at oracle.com
Tue Dec 4 18:50:52 PST 2012
Hi,
The current tip of TL/build-infra still fail debug build after fix of
8003259[1].
Attached is a full port of changeset a297b0e14605[2], which fixes the
debug build as well.
Not sure if there is other reason to go with 'this->' fix. Ignore this
patch if there was.
[1]
changeset: 3895:0400886d2613
summary: 8003259: NPG: Build with gcc 4.7.2 broken by 7045397
[2]
changeset: 3415:a297b0e14605
summary: 7172226: HotSpot fails to build with GCC 4.7 because of
stricter c++ argument dependent lookup
Cheers,
Henry
Compiling
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/blockOffsetTable.cpp
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:
In instantiation of ‘void TreeList<Chunk_t,
FreeList_t>::return_chunk_at_head(TreeChunk<Chunk_t, FreeList_t>*) [with
Chunk_t = Metablock; FreeList_t = FreeList]’:
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:1407:16:
required from here
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:317:8:
error: ‘verify_chunk_in_free_list’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:317:8:
note: declarations in dependent base ‘FreeList<Metablock>’ are not found
by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:317:8:
note: use ‘this->verify_chunk_in_free_list’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:331:3:
error: ‘increment_returned_bytes_by’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:331:3:
note: declarations in dependent base ‘FreeList<Metablock>’ are not found
by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:331:3:
note: use ‘this->increment_returned_bytes_by’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:
In instantiation of ‘void TreeList<Chunk_t,
FreeList_t>::return_chunk_at_tail(TreeChunk<Chunk_t, FreeList_t>*) [with
Chunk_t = Metablock; FreeList_t = FreeList]’:
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:1407:16:
required from here
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:293:8:
error: ‘verify_chunk_in_free_list’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:293:8:
note: declarations in dependent base ‘FreeList<Metablock>’ are not found
by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:293:8:
note: use ‘this->verify_chunk_in_free_list’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:303:3:
error: ‘increment_returned_bytes_by’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:303:3:
note: declarations in dependent base ‘FreeList<Metablock>’ are not found
by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:303:3:
note: use ‘this->increment_returned_bytes_by’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:
In instantiation of ‘void TreeList<Chunk_t,
FreeList_t>::return_chunk_at_head(TreeChunk<Chunk_t, FreeList_t>*) [with
Chunk_t = Metachunk; FreeList_t = FreeList]’:
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:1411:16:
required from here
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:317:8:
error: ‘verify_chunk_in_free_list’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:317:8:
note: declarations in dependent base ‘FreeList<Metachunk>’ are not found
by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:317:8:
note: use ‘this->verify_chunk_in_free_list’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:331:3:
error: ‘increment_returned_bytes_by’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:331:3:
note: declarations in dependent base ‘FreeList<Metachunk>’ are not found
by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:331:3:
note: use ‘this->increment_returned_bytes_by’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:
In instantiation of ‘void TreeList<Chunk_t,
FreeList_t>::return_chunk_at_tail(TreeChunk<Chunk_t, FreeList_t>*) [with
Chunk_t = Metachunk; FreeList_t = FreeList]’:
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:1411:16:
required from here
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:293:8:
error: ‘verify_chunk_in_free_list’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:293:8:
note: declarations in dependent base ‘FreeList<Metachunk>’ are not found
by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:293:8:
note: use ‘this->verify_chunk_in_free_list’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:303:3:
error: ‘increment_returned_bytes_by’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:303:3:
note: declarations in dependent base ‘FreeList<Metachunk>’ are not found
by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:303:3:
note: use ‘this->increment_returned_bytes_by’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:
In instantiation of ‘void TreeList<Chunk_t,
FreeList_t>::return_chunk_at_head(TreeChunk<Chunk_t, FreeList_t>*) [with
Chunk_t = FreeChunk; FreeList_t = AdaptiveFreeList]’:
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:1418:16:
required from here
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:317:8:
error: ‘verify_chunk_in_free_list’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:317:8:
note: declarations in dependent base ‘FreeList<FreeChunk>’ are not found
by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:317:8:
note: use ‘this->verify_chunk_in_free_list’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:331:3:
error: ‘increment_returned_bytes_by’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:331:3:
note: declarations in dependent base ‘AdaptiveFreeList<FreeChunk>’ are
not found by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:331:3:
note: use ‘this->increment_returned_bytes_by’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:
In instantiation of ‘void TreeList<Chunk_t,
FreeList_t>::return_chunk_at_tail(TreeChunk<Chunk_t, FreeList_t>*) [with
Chunk_t = FreeChunk; FreeList_t = AdaptiveFreeList]’:
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:1418:16:
required from here
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:293:8:
error: ‘verify_chunk_in_free_list’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:293:8:
note: declarations in dependent base ‘FreeList<FreeChunk>’ are not found
by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:293:8:
note: use ‘this->verify_chunk_in_free_list’ instead
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:303:3:
error: ‘increment_returned_bytes_by’ was not declared in this scope, and
no declarations were found by argument-dependent lookup at the point of
instantiation [-fpermissive]
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:303:3:
note: declarations in dependent base ‘AdaptiveFreeList<FreeChunk>’ are
not found by unqualified lookup
/home/hjen/ws/build-infra/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp:303:3:
note: use ‘this->increment_returned_bytes_by’ instead
make[7]: *** [binaryTreeDictionary.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[7]: Leaving directory
`/home/hjen/ws/build-infra/build/linux-x86_64-normal-server-fastdebug/hotspot/linux_amd64_compiler2/fastdebug'
-------------- next part --------------
# HG changeset patch
# Parent 2f6dc76eb8e50c740fbe4c66ccabba5bcb72516f
diff -r 2f6dc76eb8e5 src/share/vm/memory/binaryTreeDictionary.cpp
--- a/src/share/vm/memory/binaryTreeDictionary.cpp Thu Nov 29 11:30:04 2012 -0800
+++ b/src/share/vm/memory/binaryTreeDictionary.cpp Tue Dec 04 18:42:49 2012 -0800
@@ -299,7 +299,7 @@
this->link_tail(chunk);
assert(!tail() || size() == tail()->size(), "Wrong sized chunk in list");
- FreeList_t<Chunk_t>::increment_count();
+ increment_count();
debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));)
assert(head() == NULL || head()->prev() == NULL, "list invariant");
assert(tail() == NULL || tail()->next() == NULL, "list invariant");
@@ -327,7 +327,7 @@
}
head()->link_after(chunk);
assert(!head() || size() == head()->size(), "Wrong sized chunk in list");
- FreeList_t<Chunk_t>::increment_count();
+ increment_count();
debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));)
assert(head() == NULL || head()->prev() == NULL, "list invariant");
assert(tail() == NULL || tail()->next() == NULL, "list invariant");
@@ -936,6 +936,7 @@
template <class Chunk_t, template <class> class FreeList_t>
class AscendTreeCensusClosure : public TreeCensusClosure<Chunk_t, FreeList_t> {
+ using TreeCensusClosure<Chunk_t, FreeList_t>::do_list;
public:
void do_tree(TreeList<Chunk_t, FreeList_t>* tl) {
if (tl != NULL) {
@@ -948,6 +949,7 @@
template <class Chunk_t, template <class> class FreeList_t>
class DescendTreeCensusClosure : public TreeCensusClosure<Chunk_t, FreeList_t> {
+ using TreeCensusClosure<Chunk_t, FreeList_t>::do_list;
public:
void do_tree(TreeList<Chunk_t, FreeList_t>* tl) {
if (tl != NULL) {
@@ -1018,6 +1020,7 @@
template <class Chunk_t, template <class> class FreeList_t>
class DescendTreeSearchClosure : public TreeSearchClosure<Chunk_t, FreeList_t> {
+ using TreeSearchClosure<Chunk_t, FreeList_t>::do_list;
public:
bool do_tree(TreeList<Chunk_t, FreeList_t>* tl) {
if (tl != NULL) {
diff -r 2f6dc76eb8e5 src/share/vm/memory/binaryTreeDictionary.hpp
--- a/src/share/vm/memory/binaryTreeDictionary.hpp Thu Nov 29 11:30:04 2012 -0800
+++ b/src/share/vm/memory/binaryTreeDictionary.hpp Tue Dec 04 18:42:49 2012 -0800
@@ -61,13 +61,18 @@
TreeList<Chunk_t, FreeList_t>* left() const { return _left; }
TreeList<Chunk_t, FreeList_t>* right() const { return _right; }
- // Wrapper on call to base class, to get the template to compile.
- Chunk_t* head() const { return FreeList_t<Chunk_t>::head(); }
- Chunk_t* tail() const { return FreeList_t<Chunk_t>::tail(); }
- void set_head(Chunk_t* head) { FreeList_t<Chunk_t>::set_head(head); }
- void set_tail(Chunk_t* tail) { FreeList_t<Chunk_t>::set_tail(tail); }
+ // Explicitly import these names into our namespace to fix name lookup with templates
+ using FreeList_t<Chunk_t>::head;
+ using FreeList_t<Chunk_t>::set_head;
- size_t size() const { return FreeList_t<Chunk_t>::size(); }
+ using FreeList_t<Chunk_t>::tail;
+ using FreeList_t<Chunk_t>::set_tail;
+ using FreeList_t<Chunk_t>::link_tail;
+
+ using FreeList_t<Chunk_t>::increment_count;
+ NOT_PRODUCT(using FreeList_t<Chunk_t>::increment_returned_bytes_by;)
+ using FreeList_t<Chunk_t>::verify_chunk_in_free_list;
+ using FreeList_t<Chunk_t>::size;
// Accessors for links in tree.
More information about the build-infra-dev
mailing list