Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failure : DWARFDebugInfoTest.cpp: error: no member named 'base' in 'std::reverse_iterator<llvm::DWARFDie::iterator> #38133

Closed
llvmbot opened this issue Aug 31, 2018 · 2 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Aug 31, 2018

Bugzilla Link 38785
Resolution FIXED
Resolved on Nov 01, 2018 13:40
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

This cmake config fails to build https://github.com/matthiaskrgr/llvm_bootstrap/blob/master/build_7_0.sh#L219

[ 4%/35/6/758,106.111] Building CXX object unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugInfoTest.cpp.o
FAILED: unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugInfoTest.cpp.o
/home/matthias/LLVM/LLVM_dev/stage_2/build/bin/clang++ -DEXPENSIVE_CHECKS -DGTEST_HAS_RTTI=0 -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_LANG_CXX11=1 -D_DEBUG -D_GLIBCXX_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iunittests/DebugInfo/DWARF -I/home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/unittests/DebugInfo/DWARF -I/usr/include/libxml2 -Iinclude -I/home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/include -I/home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/utils/unittest/googletest/include -I/home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/utils/unittest/googlemock/include -O3 -D_GLIBCXX_DEBUG -g0 -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -flto=full -O3 -UNDEBUG -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -fno-rtti -MD -MT unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugInfoTest.cpp.o -MF unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugInfoTest.cpp.o.d -o unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugInfoTest.cpp.o -c /home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
In file included from /home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp:10:
In file included from /home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h:17:
In file included from /home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/include/llvm/ADT/StringRef.h:13:
In file included from /home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/include/llvm/ADT/STLExtras.h:20:
In file included from /home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/include/llvm/ADT/Optional.h:23:
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/algorithm:61:
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_algobase.h:67:
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_iterator.h:1272:
/usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/debug/stl_iterator.h:42:35: error: no member named 'base' in 'std::reverse_iteratorllvm::DWARFDie::iterator'
{ return __valid_range(__last.base(), __first.base(), __dist); }
~~~~~~ ^
/usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/debug/helper_functions.h:164:14: note: in instantiation of function template specialization '__gnu_debug::__valid_rangellvm::DWARFDie::iterator' requested here
return __valid_range(__first, __last, __dist);
^
/usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/debug/functions.h:93:7: note: in instantiation of function template specialization '__gnu_debug::__valid_range<std::reverse_iteratorllvm::DWARFDie::iterator >' requested here
__glibcxx_check_valid_range(__first, __last);
^
/usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/debug/macros.h:54:36: note: expanded from macro '__glibcxx_check_valid_range'
_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__valid_range(_First, _Last),
^
/usr/lib64/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../include/c++/8.2.0/debug/vector:185:43: note: in instantiation of function template specialization '__gnu_debug::__check_valid_range<std::reverse_iteratorllvm::DWARFDie::iterator >' requested here
: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
^
/home/matthias/LLVM/LLVM_dev/stage_3_tests/llvm-project-20170507/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp:1227:15: note: in instantiation of function template specialization 'std::__debug::vector<llvm::DWARFDie, std::allocatorllvm::DWARFDie >::vector<std::reverse_iteratorllvm::DWARFDie::iterator, void>' requested here
EXPECT_THAT(std::vector(A.rbegin(), A.rend()),
^
1 error generated.

git monorepo is at cd36334
host compiler was clang-dev (8.0)

@llvmbot
Copy link
Collaborator Author

llvmbot commented Oct 21, 2018

This bug is triggered by -D_GLIBCXX_DEBUG (which is part of LLVM_ENABLE_EXPENSIVE_CHECKS) and may have been caused by D49679 which added the specialization std::reverse_iterator<llvm::DWARFDie::iterator> that lacks base().

@llvmbot
Copy link
Collaborator Author

llvmbot commented Nov 1, 2018

Fixed in https://reviews.llvm.org/rL345621.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

1 participant