Skip to content

Conversation

@CarlosAlbertoEnciso
Copy link
Member

@CarlosAlbertoEnciso CarlosAlbertoEnciso commented Nov 13, 2024

  • In the DWARF reader, for those attributes that can have an unsigned value, allow for the following cases:
    • Is an implicit constant
    • Is an optional value
  • The testing is done by creating a file with generated DWARF, using DwarfGenerator (generate DWARF debug info for unit tests).

- In the DWARF reader, for those attributes that can have an
  unsigned value, allow for the following cases:
  * Is an implicit constant
  * Is an optional value
@llvmbot
Copy link
Member

llvmbot commented Nov 13, 2024

@llvm/pr-subscribers-llvm-binary-utilities

@llvm/pr-subscribers-debuginfo

Author: Carlos Alberto Enciso (CarlosAlbertoEnciso)

Changes
  • In the DWARF reader, for those attributes that can have an unsigned value, allow for the following cases:
    • Is an implicit constant
    • Is an optional value

Full diff: https://github.com/llvm/llvm-project/pull/116027.diff

2 Files Affected:

  • (modified) llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp (+15-11)
  • (modified) llvm/test/tools/llvm-debuginfo-analyzer/DWARF/05-dwarf-incorrect-lexical-scope-variable.test (+2-2)
diff --git a/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp b/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
index ce1d5619e1fa80..b9ba3357002cab 100644
--- a/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
@@ -254,15 +254,18 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
   // We are processing .debug_info section, implicit_const attribute
   // values are not really stored here, but in .debug_abbrev section.
   auto GetAsUnsignedConstant = [&]() -> int64_t {
-    return AttrSpec.isImplicitConst() ? AttrSpec.getImplicitConstValue()
-                                      : *FormValue.getAsUnsignedConstant();
+    if (AttrSpec.isImplicitConst())
+      return AttrSpec.getImplicitConstValue();
+    if (std::optional<uint64_t> Val = FormValue.getAsUnsignedConstant())
+      return *Val;
+    return 0;
   };
 
   auto GetFlag = [](const DWARFFormValue &FormValue) -> bool {
     return FormValue.isFormClass(DWARFFormValue::FC_Flag);
   };
 
-  auto GetBoundValue = [](const DWARFFormValue &FormValue) -> int64_t {
+  auto GetBoundValue = [&AttrSpec](const DWARFFormValue &FormValue) -> int64_t {
     switch (FormValue.getForm()) {
     case dwarf::DW_FORM_ref_addr:
     case dwarf::DW_FORM_ref1:
@@ -283,6 +286,8 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
       return *FormValue.getAsUnsignedConstant();
     case dwarf::DW_FORM_sdata:
       return *FormValue.getAsSignedConstant();
+    case dwarf::DW_FORM_implicit_const:
+      return AttrSpec.getImplicitConstValue();
     default:
       return 0;
     }
@@ -295,13 +300,13 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
 
   switch (AttrSpec.Attr) {
   case dwarf::DW_AT_accessibility:
-    CurrentElement->setAccessibilityCode(*FormValue.getAsUnsignedConstant());
+    CurrentElement->setAccessibilityCode(GetAsUnsignedConstant());
     break;
   case dwarf::DW_AT_artificial:
     CurrentElement->setIsArtificial();
     break;
   case dwarf::DW_AT_bit_size:
-    CurrentElement->setBitSize(*FormValue.getAsUnsignedConstant());
+    CurrentElement->setBitSize(GetAsUnsignedConstant());
     break;
   case dwarf::DW_AT_call_file:
     CurrentElement->setCallFilenameIndex(IncrementFileIndex
@@ -333,13 +338,12 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
         Stream << hexString(Value, 2);
         CurrentElement->setValue(Stream.str());
       } else
-        CurrentElement->setValue(
-            hexString(*FormValue.getAsUnsignedConstant(), 2));
+        CurrentElement->setValue(hexString(GetAsUnsignedConstant(), 2));
     } else
       CurrentElement->setValue(dwarf::toStringRef(FormValue));
     break;
   case dwarf::DW_AT_count:
-    CurrentElement->setCount(*FormValue.getAsUnsignedConstant());
+    CurrentElement->setCount(GetAsUnsignedConstant());
     break;
   case dwarf::DW_AT_decl_line:
     CurrentElement->setLineNumber(GetAsUnsignedConstant());
@@ -358,10 +362,10 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
       CurrentElement->setIsExternal();
     break;
   case dwarf::DW_AT_GNU_discriminator:
-    CurrentElement->setDiscriminator(*FormValue.getAsUnsignedConstant());
+    CurrentElement->setDiscriminator(GetAsUnsignedConstant());
     break;
   case dwarf::DW_AT_inline:
-    CurrentElement->setInlineCode(*FormValue.getAsUnsignedConstant());
+    CurrentElement->setInlineCode(GetAsUnsignedConstant());
     break;
   case dwarf::DW_AT_lower_bound:
     CurrentElement->setLowerBound(GetBoundValue(FormValue));
@@ -381,7 +385,7 @@ void LVDWARFReader::processOneAttribute(const DWARFDie &Die,
     CurrentElement->setUpperBound(GetBoundValue(FormValue));
     break;
   case dwarf::DW_AT_virtuality:
-    CurrentElement->setVirtualityCode(*FormValue.getAsUnsignedConstant());
+    CurrentElement->setVirtualityCode(GetAsUnsignedConstant());
     break;
 
   case dwarf::DW_AT_abstract_origin:
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/05-dwarf-incorrect-lexical-scope-variable.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/05-dwarf-incorrect-lexical-scope-variable.test
index e1ac7588f1d8c4..3c3c5dcbda520b 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/05-dwarf-incorrect-lexical-scope-variable.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/05-dwarf-incorrect-lexical-scope-variable.test
@@ -43,14 +43,14 @@
 ; ONE-EMPTY:
 ; ONE-NEXT: [001]             {CompileUnit} 'pr-43860.cpp'
 ; ONE-NEXT: [002]               {Producer} 'clang version 15.0.0 {{.*}}'
-; ONE-NEXT: [002]     2         {Function} extern not_inlined 'InlineFunction' -> 'int'
+; ONE-NEXT: [002]     2         {Function} extern inlined 'InlineFunction' -> 'int'
 ; ONE-NEXT: [003]                 {Block}
 ; ONE-NEXT: [004]     5             {Variable} 'Var_2' -> 'int'
 ; ONE-NEXT: [003]     2           {Parameter} 'Param' -> 'int'
 ; ONE-NEXT: [003]     3           {Variable} 'Var_1' -> 'int'
 ; ONE-NEXT: [002]    11         {Function} extern not_inlined 'test' -> 'int'
 ; ONE-NEXT: [003]    12           {Variable} 'A' -> 'int'
-; ONE-NEXT: [003]    13           {InlinedFunction} not_inlined 'InlineFunction' -> 'int'
+; ONE-NEXT: [003]    13           {InlinedFunction} inlined 'InlineFunction' -> 'int'
 ; ONE-NEXT: [004]                   {Block}
 ; ONE-NEXT: [005]                     {Variable} 'Var_2' -> 'int'
 ; ONE-NEXT: [004]                   {Parameter} 'Param' -> 'int'

Copy link
Collaborator

@pogo59 pogo59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test makes it pretty clear this is functionally the correct thing to do. But it covers only the inline attribute; are we missing tests for the other affected attributes? (I can't remember whether there is a unittest for the reader, but if there is, that would seem like a good place to cover all these cases.)

@CarlosAlbertoEnciso
Copy link
Member Author

CarlosAlbertoEnciso commented Nov 19, 2024

We have unittest for the reader: llvm/unittests/DebugInfo/LogicalView. But we don't have the ability to create logical elements with specific DWARF tags/attributes.
I will look at the possibility of adding some generic basic support using llvm/unittests/DebugInfo/DWARF and create a valid ELF that can be loaded by the reader.

- In the DWARF reader, for those attributes that can have an
  unsigned value, allow for the following cases:
  * Is an implicit constant
  * Is an optional value
- The testing is done by creating a file with generated DWARF,
  using 'DwarfGenerator' (generate DWARF debug info for unit tests).
@CarlosAlbertoEnciso
Copy link
Member Author

@pogo59 Using the existing llvm/unittests/DebugInfo/DWARF/DwarfGenerator module, added a unittest to include the affected attributes.

- In the DWARF reader, for those attributes that can have an
  unsigned value, allow for the following cases:
  * Is an implicit constant
  * Is an optional value
- The testing is done by creating a file with generated DWARF,
  using 'DwarfGenerator' (generate DWARF debug info for unit tests).
- Remove not needed include header file.

// Helper function to get the first compile unit.
LVScopeCompileUnit *getFirstCompileUnit(LVScopeRoot *Root) {
EXPECT_NE(Root, nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EXPECT_NE(Root, nullptr);
ASSERT_NE(Root, nullptr);

Use the ASSERT_* macros when the test will later crash if the condition is not true. This is especially the case when verifying a pointer is non-null and will be dereferenced.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed all EXPECT_NE to ASSERT_NE.

Note: There is a restriction on using EXPECT_NE inside a non-void function
https://chromium.googlesource.com/external/github.com/google/googletest/+/HEAD/docs/advanced.md#assertion-placement

For the non-void functions: getFirstCompileUnit and createReader, I used standard if checks and the caller will use ASSERT_NE on the returned value.

// Check the logical elements basic properties.
void checkElementAttributes(LVReader *Reader) {
LVScopeRoot *Root = Reader->getScopesRoot();
EXPECT_NE(Root, nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant with a check inside getFirstCompileUnit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check has been removed from getFirstCompileUnit. See previous comment about assertion-placement.

LVScopeCompileUnit *getFirstCompileUnit(LVScopeRoot *Root) {
EXPECT_NE(Root, nullptr);
const LVScopes *CompileUnits = Root->getScopes();
EXPECT_NE(CompileUnits, nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EXPECT_NE(CompileUnits, nullptr);
ASSERT_NE(CompileUnits, nullptr);

Copy link
Member Author

@CarlosAlbertoEnciso CarlosAlbertoEnciso Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check has been removed from getFirstCompileUnit. See previous comment about assertion-placement.

LVScopes::const_iterator ScopeIter = Scopes->begin();
EXPECT_NE(ScopeIter, nullptr);
LVScope *Scope = static_cast<LVScope *>(*ScopeIter);
EXPECT_NE(Scope, nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EXPECT_NE(Scope, nullptr);
ASSERT_NE(Scope, nullptr);

EXPECT_EQ(Scope->getDiscriminator(), 8); // ScopeFunctionInlined

// Check no-values.
EXPECT_NE(++ScopeIter, nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another iteration check

EXPECT_EQ(Scope->getDiscriminator(), 0); // ScopeFunctionInlined

// Check implicit values.
EXPECT_NE(++ScopeIter, nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another iterator check


// Check values.
LVSymbols::const_iterator SymbolIter = Symbols->begin();
EXPECT_NE(SymbolIter, nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EXPECT_NE(SymbolIter, nullptr);
ASSERT_NE(SymbolIter, nullptr);

LVSymbols::const_iterator SymbolIter = Symbols->begin();
EXPECT_NE(SymbolIter, nullptr);
LVSymbol *Symbol = static_cast<LVSymbol *>(*SymbolIter);
EXPECT_NE(Symbol, nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EXPECT_NE(Symbol, nullptr);
ASSERT_NE(Symbol, nullptr);

EXPECT_EQ(Symbol->getBitSize(), 1); // Symbol

// Check no-values.
EXPECT_NE(++SymbolIter, nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pattern continues, I won't add comments on all of them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the repeated comments.


add_llvm_unittest_with_input_files(DebugInfoLogicalViewTests
../DWARF/DwarfGenerator.cpp
../DWARF/DwarfUtils.cpp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is okay for now, but really these components should be moved into their own library so they can be shared between unittests.

Copy link
Member Author

@CarlosAlbertoEnciso CarlosAlbertoEnciso Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good point. I created a PR to record that request. #117864

- In the DWARF reader, for those attributes that can have an
  unsigned value, allow for the following cases:
  * Is an implicit constant
  * Is an optional value
- The testing is done by creating a file with generated DWARF,
  using 'DwarfGenerator' (generate DWARF debug info for unit tests).

- Address reviewer comments:
  * Changed 'EXPECT_NE' to 'ASSERT_NE'
  * Test iterators against 'end()'
  * Remove redundant comments
  * As the 'ASSERT_NE' can not be used inside a non-void function,
    use normal logic and move the checks outside the function.
    The caller will use 'ASSERT_NE' on the returned value.
Copy link
Collaborator

@pogo59 pogo59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CarlosAlbertoEnciso CarlosAlbertoEnciso merged commit fb37659 into llvm:main Nov 28, 2024
6 of 8 checks passed
@CarlosAlbertoEnciso
Copy link
Member Author

@pogo59 Thanks very much for your valuable review.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 28, 2024

LLVM Buildbot has detected a new failure on builder llvm-nvptx-nvidia-ubuntu running on as-builder-7 while building llvm at step 6 "test-build-unified-tree-check-llvm".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/180/builds/9182

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure)
...
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1398:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = unsigned int; T2 = int; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:231:3:   required from here
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: warning: comparison of integer expressions of different signedness: ‘const unsigned int’ and ‘const int’ [-Wsign-compare]
 1379 |   if (lhs == rhs) {
      |       ~~~~^~~~~~
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1398:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:234:3:   required from here
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: warning: comparison of integer expressions of different signedness: ‘const long unsigned int’ and ‘const int’ [-Wsign-compare]
9.301 [1/1/688] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
FAILED: unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fuse-ld=gold     -Wl,--gc-sections unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfUtils.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/CodeViewReaderTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/CommandLineOptionsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/CompareElementsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFReaderTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/SelectElementsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/LocationRangesTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/LogicalElementsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/StringPoolTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/WarningInternalTest.cpp.o -o unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests  -Wl,-rpath,/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/lib  lib/libLLVMX86CodeGen.so.20.0git  lib/libLLVMX86AsmParser.so.20.0git  lib/libLLVMNVPTXCodeGen.so.20.0git  lib/libLLVMX86Desc.so.20.0git  lib/libLLVMNVPTXDesc.so.20.0git  lib/libLLVMX86Disassembler.so.20.0git  lib/libLLVMX86Info.so.20.0git  lib/libLLVMNVPTXInfo.so.20.0git  lib/libLLVMAsmPrinter.so.20.0git  lib/libLLVMDebugInfoLogicalView.so.20.0git  lib/libLLVMMCDisassembler.so.20.0git  lib/libllvm_gtest_main.so.20.0git  lib/libLLVMTestingSupport.so.20.0git  lib/libLLVMMC.so.20.0git  lib/libLLVMTargetParser.so.20.0git  lib/libllvm_gtest.so.20.0git  lib/libLLVMSupport.so.20.0git  -Wl,-rpath-link,/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/lib && :
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function writeV5IncludeAndFileTable(llvm::DWARFDebugLine::Prologue const&, llvm::AsmPrinter&): error: undefined reference to 'llvm::DWARFFormValue::getAsCString() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function writeV5IncludeAndFileTable(llvm::DWARFDebugLine::Prologue const&, llvm::AsmPrinter&): error: undefined reference to 'llvm::DWARFFormValue::getAsCString() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function writeV2IncludeAndFileTable(llvm::DWARFDebugLine::Prologue const&, llvm::AsmPrinter&): error: undefined reference to 'llvm::DWARFFormValue::getAsCString() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function writeV2IncludeAndFileTable(llvm::DWARFDebugLine::Prologue const&, llvm::AsmPrinter&): error: undefined reference to 'llvm::DWARFFormValue::getAsCString() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function llvm::dwarfgen::LineTable::createBasicPrologue() const [clone .localalias]: error: undefined reference to 'llvm::DWARFDebugLine::Prologue::Prologue()'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function llvm::dwarfgen::LineTable::createBasicPrologue() const [clone .localalias]: error: undefined reference to 'llvm::DWARFFormValue::createFromPValue(llvm::dwarf::Form, char const*)'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function llvm::dwarfgen::LineTable::createBasicPrologue() const [clone .localalias]: error: undefined reference to 'llvm::DWARFFormValue::createFromPValue(llvm::dwarf::Form, char const*)'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::object::ObjectFile::createObjectFile(llvm::MemoryBufferRef, llvm::file_magic, bool)'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFContext::create(llvm::object::ObjectFile const&, llvm::DWARFContext::ProcessDebugRelocations, llvm::LoadedObjectInfo const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::function<void (llvm::Error)>, std::function<void (llvm::Error)>, bool)'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFUnit::extractDIEsIfNeeded(bool)'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFDie::getFirstChild() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFDie::getSibling() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFDie::getSibling() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFDie::getSibling() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFDie::getSibling() const'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 28, 2024

LLVM Buildbot has detected a new failure on builder llvm-nvptx64-nvidia-ubuntu running on as-builder-7 while building llvm at step 6 "test-build-unified-tree-check-llvm".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/160/builds/9184

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure)
...
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1398:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = unsigned int; T2 = int; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:231:3:   required from here
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: warning: comparison of integer expressions of different signedness: ‘const unsigned int’ and ‘const int’ [-Wsign-compare]
 1379 |   if (lhs == rhs) {
      |       ~~~~^~~~~~
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1398:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:234:3:   required from here
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: warning: comparison of integer expressions of different signedness: ‘const long unsigned int’ and ‘const int’ [-Wsign-compare]
8.891 [1/1/688] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
FAILED: unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fuse-ld=gold     -Wl,--gc-sections unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfUtils.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/CodeViewReaderTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/CommandLineOptionsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/CompareElementsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFReaderTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/SelectElementsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/LocationRangesTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/LogicalElementsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/StringPoolTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/WarningInternalTest.cpp.o -o unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests  -Wl,-rpath,/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/lib  lib/libLLVMX86CodeGen.so.20.0git  lib/libLLVMX86AsmParser.so.20.0git  lib/libLLVMNVPTXCodeGen.so.20.0git  lib/libLLVMX86Desc.so.20.0git  lib/libLLVMNVPTXDesc.so.20.0git  lib/libLLVMX86Disassembler.so.20.0git  lib/libLLVMX86Info.so.20.0git  lib/libLLVMNVPTXInfo.so.20.0git  lib/libLLVMAsmPrinter.so.20.0git  lib/libLLVMDebugInfoLogicalView.so.20.0git  lib/libLLVMMCDisassembler.so.20.0git  lib/libllvm_gtest_main.so.20.0git  lib/libLLVMTestingSupport.so.20.0git  lib/libLLVMMC.so.20.0git  lib/libLLVMTargetParser.so.20.0git  lib/libllvm_gtest.so.20.0git  lib/libLLVMSupport.so.20.0git  -Wl,-rpath-link,/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/lib && :
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function writeV5IncludeAndFileTable(llvm::DWARFDebugLine::Prologue const&, llvm::AsmPrinter&): error: undefined reference to 'llvm::DWARFFormValue::getAsCString() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function writeV5IncludeAndFileTable(llvm::DWARFDebugLine::Prologue const&, llvm::AsmPrinter&): error: undefined reference to 'llvm::DWARFFormValue::getAsCString() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function writeV2IncludeAndFileTable(llvm::DWARFDebugLine::Prologue const&, llvm::AsmPrinter&): error: undefined reference to 'llvm::DWARFFormValue::getAsCString() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function writeV2IncludeAndFileTable(llvm::DWARFDebugLine::Prologue const&, llvm::AsmPrinter&): error: undefined reference to 'llvm::DWARFFormValue::getAsCString() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function llvm::dwarfgen::LineTable::createBasicPrologue() const [clone .localalias]: error: undefined reference to 'llvm::DWARFDebugLine::Prologue::Prologue()'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function llvm::dwarfgen::LineTable::createBasicPrologue() const [clone .localalias]: error: undefined reference to 'llvm::DWARFFormValue::createFromPValue(llvm::dwarf::Form, char const*)'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o:DwarfGenerator.cpp:function llvm::dwarfgen::LineTable::createBasicPrologue() const [clone .localalias]: error: undefined reference to 'llvm::DWARFFormValue::createFromPValue(llvm::dwarf::Form, char const*)'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::object::ObjectFile::createObjectFile(llvm::MemoryBufferRef, llvm::file_magic, bool)'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFContext::create(llvm::object::ObjectFile const&, llvm::DWARFContext::ProcessDebugRelocations, llvm::LoadedObjectInfo const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::function<void (llvm::Error)>, std::function<void (llvm::Error)>, bool)'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFUnit::extractDIEsIfNeeded(bool)'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFDie::getFirstChild() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFDie::getSibling() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFDie::getSibling() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFDie::getSibling() const'
unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o:DWARFGeneratedTest.cpp:function (anonymous namespace)::generateDebugInfo(llvm::StringRef, llvm::Triple&): error: undefined reference to 'llvm::DWARFDie::getSibling() const'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 28, 2024

LLVM Buildbot has detected a new failure on builder ppc64le-lld-multistage-test running on ppc64le-lld-multistage-test while building llvm at step 12 "build-stage2-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/5999

Here is the relevant piece of the build log for the reference
Step 12 (build-stage2-unified-tree) failure: build (failure)
...
430.533 [150/461/5736] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO.dir/Symbols.cpp.o
430.585 [150/460/5737] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SIAnnotateControlFlow.cpp.o
430.587 [150/459/5738] Building CXX object unittests/ExecutionEngine/JITLink/CMakeFiles/JITLinkTests.dir/LinkGraphTests.cpp.o
430.624 [150/458/5739] Building CXX object tools/llvm-reduce/CMakeFiles/llvm-reduce.dir/deltas/ReduceInstructions.cpp.o
430.679 [150/457/5740] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexer.cpp.o
430.692 [150/456/5741] Building CXX object tools/clang/unittests/Driver/CMakeFiles/ClangDriverTests.dir/DistroTest.cpp.o
430.718 [150/455/5742] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO.dir/Arch/X86_64.cpp.o
430.767 [150/454/5743] Building CXX object tools/lld/COFF/CMakeFiles/lldCOFF.dir/Symbols.cpp.o
430.769 [150/453/5744] Building CXX object tools/llvm-dwarfdump/CMakeFiles/llvm-dwarfdump.dir/llvm-dwarfdump.cpp.o
430.777 [150/452/5745] Building CXX object unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o
FAILED: unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o 
ccache /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/install/stage1/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/unittests/DebugInfo/LogicalView -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/unittests/DebugInfo/LogicalView -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o -MF unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o.d -o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:24:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/Testing/Support/Error.h:13:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/Testing/Support/SupportHelpers.h:17:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googlemock/include/gmock/gmock-matchers.h:274:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h:50:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
 1379 |   if (lhs == rhs) {
      |       ~~~ ^  ~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1398:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
 1398 |     return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
      |            ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:231:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
  231 |   EXPECT_EQ(Scope->getAccessibilityCode(), 1); // Element
      |   ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1869:54: note: expanded from macro 'EXPECT_EQ'
 1869 |   EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
      |                                                      ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: error: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare]
 1379 |   if (lhs == rhs) {
      |       ~~~ ^  ~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1398:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here
 1398 |     return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
      |            ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:234:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, int, nullptr>' requested here
  234 |   EXPECT_EQ(Scope->getCallFilenameIndex(), 5); // ScopeFunctionInlined
      |   ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1869:54: note: expanded from macro 'EXPECT_EQ'
 1869 |   EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
      |                                                      ^
2 errors generated.
430.791 [150/451/5746] Building CXX object unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/SelectElementsTest.cpp.o
430.909 [150/450/5747] Building CXX object tools/llvm-objdump/CMakeFiles/llvm-objdump.dir/OffloadDump.cpp.o
431.006 [150/449/5748] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/AMDGPUUnifyDivergentExitNodes.cpp.o
431.263 [150/448/5749] Building CXX object tools/llvm-reduce/CMakeFiles/llvm-reduce.dir/TestRunner.cpp.o
431.449 [150/447/5750] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/AMDGPUExportClustering.cpp.o
431.696 [150/446/5751] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/R600TargetTransformInfo.cpp.o
431.746 [150/445/5752] Building CXX object lib/Target/AMDGPU/MCTargetDesc/CMakeFiles/LLVMAMDGPUDesc.dir/AMDGPUELFObjectWriter.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 28, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-multistage running on ppc64le-clang-multistage-test while building llvm at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/4875

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest.h:1398:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = unsigned int; T2 = int; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:231:3:   required from here
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: warning: comparison of integer expressions of different signedness: ‘const unsigned int’ and ‘const int’ [-Wsign-compare]
   if (lhs == rhs) {
       ~~~~^~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest.h:1398:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:234:3:   required from here
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: warning: comparison of integer expressions of different signedness: ‘const long unsigned int’ and ‘const int’ [-Wsign-compare]
[1186/1192] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
FAILED: unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests 
: && /usr/lib64/ccache/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-lo
bler.so.20.0git  lib/libLLVMSystemZDisassembler.so.20.0git  lib/libLLVMVEDisassembler.so.20.0git  lib/libLLVMWebAssemblyDisassembler.so.20.0git  lib/libLLVMX86Disassembler.so.20.0git  lib/libLLVMXCoreDisassembler.so.20.0git  lib/libLLVMAVRInfo.so.20.0git  lib/libLLVMBPFInfo.so.20.0git  lib/libLLVMMipsInfo.so.20.0git  lib/libLLVMMSP430Info.so.20.0git  lib/libLLVMNVPTXInfo.so.20.0git  lib/libLLVMPowerPCInfo.so.20.0git  lib/libLLVMSparcInfo.so.20.0git  lib/libLLVMVEInfo.so.20.0git  lib/libLLVMX86Info.so.20.0git  lib/libLLVMXCoreInfo.so.20.0git  lib/libLLVMAsmPrinter.so.20.0git  lib/libLLVMDebugInfoLogicalView.so.20.0git  -lpthread  lib/libllvm_gtest_main.so.20.0git  -lpthread  lib/libLLVMTestingSupport.so.20.0git  lib/libLLVMAArch64Desc.so.20.0git  lib/libLLVMAArch64Info.so.20.0git  lib/libLLVMAArch64Utils.so.20.0git  lib/libLLVMAMDGPUDesc.so.20.0git  lib/libLLVMAMDGPUInfo.so.20.0git  lib/libLLVMAMDGPUUtils.so.20.0git  lib/libLLVMARMDesc.so.20.0git  lib/libLLVMARMInfo.so.20.0git  lib/libLLVMARMUtils.so.20.0git  lib/libLLVMHexagonDesc.so.20.0git  lib/libLLVMHexagonInfo.so.20.0git  lib/libLLVMLanaiDesc.so.20.0git  lib/libLLVMLanaiInfo.so.20.0git  lib/libLLVMLoongArchDesc.so.20.0git  lib/libLLVMLoongArchInfo.so.20.0git  lib/libLLVMRISCVDesc.so.20.0git  lib/libLLVMRISCVInfo.so.20.0git  lib/libLLVMSystemZDesc.so.20.0git  lib/libLLVMSystemZInfo.so.20.0git  lib/libLLVMWebAssemblyDesc.so.20.0git  lib/libLLVMWebAssemblyInfo.so.20.0git  lib/libLLVMMCDisassembler.so.20.0git  lib/libLLVMMC.so.20.0git  lib/libLLVMTargetParser.so.20.0git  lib/libllvm_gtest.so.20.0git  lib/libLLVMSupport.so.20.0git  -Wl,-rpath-link,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib && :
/usr/bin/ld: unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o: undefined reference to symbol '_ZN4llvm14DWARFDebugLine8PrologueC1Ev'
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib/libLLVMDebugInfoDWARF.so.20.0git: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[1187/1192] Linking CXX executable tools/clang/tools/extra/clangd/unittests/ClangdTests
ninja: build stopped: subcommand failed.
Step 11 (ninja check 2) failure: stage 2 checked (failure)
...
 1398 |     return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
      |            ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:234:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, int, nullptr>' requested here
  234 |   EXPECT_EQ(Scope->getCallFilenameIndex(), 5); // ScopeFunctionInlined
      |   ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/third-party/unittest/googletest/include/gtest/gtest.h:1869:54: note: expanded from macro 'EXPECT_EQ'
 1869 |   EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
      |                                                      ^
2 warnings generated.
[654/1192] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
FAILED: unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests 
: && /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--gc-sections unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfUtils.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/CodeViewReaderTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/CommandLineOptionsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/CompareElementsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFReaderTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/SelectElementsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/LocationRangesTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/LogicalElementsTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/StringPoolTest.cpp.o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/WarningInternalTest.cpp.o -o unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests  -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib  lib/libLLVMAArch64CodeGen.so.20.0git  lib/libLLVMAArch64AsmParser.so.20.0git  lib/libLLVMAMDGPUCodeGen.so.20.0git  lib/libLLVMAMDGPUAsmParser.so.20.0git  lib/libLLVMARMCodeGen.so.20.0git  lib/libLLVMARMAsmParser.so.20.0git  lib/libLLVMAVRCodeGen.so.20.0git  lib/libLLVMAVRAsmParser.so.20.0git  lib/libLLVMBPFCodeGen.so.20.0git  lib/libLLVMBPFAsmParser.so.20.0git  lib/libLLVMHexagonCodeGen.so.20.0git  lib/libLLVMHexagonAsmParser.so.20.0git  lib/libLLVMLanaiCodeGen.so.20.0git  lib/libLLVMLanaiAsmParser.so.20.0git  lib/libLLVMLoongArchCodeGen.so.20.0git  lib/libLLVMLoongArchAsmParser.so.20.0git  lib/libLLVMMipsCodeGen.so.20.0git  lib/libLLVMMipsAsmParser.so.20.0git  lib/libLLVMMSP430CodeGen.so.20.0git  lib/libLLVMMSP430AsmParser.so.20.0git  lib/libLLVMNVPTXCodeGen.so.20.0git  lib/libLLVMPowerPCCodeGen.so.20.0git  lib/libLLVMPowerPCAsmParser.so.20.0git  lib/libLLVMRISCVCodeGen.so.20.0git  lib/libLLVMRISCVAsmParser.so.20.0git  lib/libLLVMSparcCodeGen.so.20.0git  lib/libLLVMSparcAsmParser.so.20.0git  lib/libLLVMSystemZCodeGen.so.20.0git  lib/libLLVMSystemZAsmParser.so.20.0git  lib/libLLVMVECodeGen.so.20.0git  lib/libLLVMVEAsmParser.so.20.0git  lib/libLLVMWebAssemblyCodeGen.so.20.0git  lib/libLLVMWebAssemblyAsmParser.so.20.0git  lib/libLLVMWebAssemblyUtils.so.20.0git  lib/libLLVMX86CodeGen.so.20.0git  lib/libLLVMX86AsmParser.so.20.0git  lib/libLLVMXCoreCodeGen.so.20.0git  lib/libLLVMAVRDesc.so.20.0git  lib/libLLVMBPFDesc.so.20.0git  lib/libLLVMMipsDesc.so.20.0git  lib/libLLVMMSP430Desc.so.20.0git  lib/libLLVMNVPTXDesc.so.20.0git  lib/libLLVMPowerPCDesc.so.20.0git  lib/libLLVMSparcDesc.so.20.0git  lib/libLLVMVEDesc.so.20.0git  lib/libLLVMX86Desc.so.20.0git  lib/libLLVMXCoreDesc.so.20.0git  lib/libLLVMAArch64Disassembler.so.20.0git  lib/libLLVMAMDGPUDisassembler.so.20.0git  lib/libLLVMARMDisassembler.so.20.0git  lib/libLLVMAVRDisassembler.so.20.0git  lib/libLLVMBPFDisassembler.so.20.0git  lib/libLLVMHexagonDisassembler.so.20.0git  lib/libLLVMLanaiDisassembler.so.20.0git  lib/libLLVMLoongArchDisassembler.so.20.0git  lib
libLLVMMipsDisassembler.so.20.0git  lib/libLLVMMSP430Disassembler.so.20.0git  lib/libLLVMPowerPCDisassembler.so.20.0git  lib/libLLVMRISCVDisassembler.so.20.0git  lib/libLLVMSparcDisassembler.so.20.0git  lib/libLLVMSystemZDisassembler.so.20.0git  lib/libLLVMVEDisassembler.so.20.0git  lib/libLLVMWebAssemblyDisassembler.so.20.0git  lib/libLLVMX86Disassembler.so.20.0git  lib/libLLVMXCoreDisassembler.so.20.0git  lib/libLLVMAVRInfo.so.20.0git  lib/libLLVMBPFInfo.so.20.0git  lib/libLLVMMipsInfo.so.20.0git  lib/libLLVMMSP430Info.so.20.0git  lib/libLLVMNVPTXInfo.so.20.0git  lib/libLLVMPowerPCInfo.so.20.0git  lib/libLLVMSparcInfo.so.20.0git  lib/libLLVMVEInfo.so.20.0git  lib/libLLVMX86Info.so.20.0git  lib/libLLVMXCoreInfo.so.20.0git  lib/libLLVMAsmPrinter.so.20.0git  lib/libLLVMDebugInfoLogicalView.so.20.0git  -lpthread  lib/libllvm_gtest_main.so.20.0git  -lpthread  lib/libLLVMTestingSupport.so.20.0git  lib/libLLVMAArch64Desc.so.20.0git  lib/libLLVMAArch64Info.so.20.0git  lib/libLLVMAArch64Utils.so.20.0git  lib/libLLVMAMDGPUDesc.so.20.0git  lib/libLLVMAMDGPUInfo.so.20.0git  lib/libLLVMAMDGPUUtils.so.20.0git  lib/libLLVMARMDesc.so.20.0git  lib/libLLVMARMInfo.so.20.0git  lib/libLLVMARMUtils.so.20.0git  lib/libLLVMHexagonDesc.so.20.0git  lib/libLLVMHexagonInfo.so.20.0git  lib/libLLVMLanaiDesc.so.20.0git  lib/libLLVMLanaiInfo.so.20.0git  lib/libLLVMLoongArchDesc.so.20.0git  lib/libLLVMLoongArchInfo.so.20.0git  lib/libLLVMRISCVDesc.so.20.0git  lib/libLLVMRISCVInfo.so.20.0git  lib/libLLVMSystemZDesc.so.20.0git  lib/libLLVMSystemZInfo.so.20.0git  lib/libLLVMWebAssemblyDesc.so.20.0git  lib/libLLVMWebAssemblyInfo.so.20.0git  lib/libLLVMMCDisassembler.so.20.0git  lib/libLLVMMC.so.20.0git  lib/libLLVMTargetParser.so.20.0git  lib/libllvm_gtest.so.20.0git  lib/libLLVMSupport.so.20.0git  -Wl,-rpath-link,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib && :
/usr/bin/ld: unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o: undefined reference to symbol '_ZN4llvm14DWARFDebugLine8PrologueC1Ev'
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib/libLLVMDebugInfoDWARF.so.20.0git: error adding symbols: DSO missing from command line
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[752/1192] Building CXX object unittests/Transforms/Vectorize/CMakeFiles/VectorizeTests.dir/VPlanHCFGTest.cpp.o
[754/1192] Building CXX object tools/clang/unittests/Lex/CMakeFiles/LexTests.dir/LexerTest.cpp.o
[755/1192] Building CXX object unittests/Transforms/Vectorize/CMakeFiles/VectorizeTests.dir/VPlanSlpTest.cpp.o
[756/1192] Building CXX object unittests/ADT/CMakeFiles/ADTTests.dir/DenseSetTest.cpp.o
[757/1192] Building CXX object unittests/tools/llvm-profgen/CMakeFiles/LLVMProfgenTests.dir/ContextCompressionTest.cpp.o
[758/1192] Building CXX object tools/clang/tools/extra/unittests/clang-tidy/CMakeFiles/ClangTidyTests.dir/TransformerClangTidyCheckTest.cpp.o
[759/1192] Building CXX object tools/clang/unittests/Support/CMakeFiles/ClangSupportTests.dir/TimeProfilerTest.cpp.o
[760/1192] Building CXX object tools/clang/unittests/Driver/CMakeFiles/ClangDriverTests.dir/DXCModeTest.cpp.o
[761/1192] Building CXX object tools/clang/unittests/Sema/CMakeFiles/SemaTests.dir/SemaLookupTest.cpp.o
[762/1192] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/DeclTest.cpp.o
[763/1192] Building CXX object tools/clang/unittests/Analysis/FlowSensitive/CMakeFiles/ClangAnalysisFlowSensitiveTests.dir/RecordOpsTest.cpp.o
[764/1192] Building CXX object unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/BenchmarkRunnerTest.cpp.o
[765/1192] Building CXX object unittests/Transforms/Coroutines/CMakeFiles/CoroTests.dir/ExtraRematTest.cpp.o
[766/1192] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/MemTransferLowering.cpp.o
[767/1192] Building CXX object tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/StandardLibraryTest.cpp.o
[768/1192] Building CXX object unittests/TargetParser/CMakeFiles/TargetParserTests.dir/RISCVISAInfoTest.cpp.o
[769/1192] Building CXX object tools/clang/unittests/Sema/CMakeFiles/SemaTests.dir/ExternalSemaSourceTest.cpp.o
[770/1192] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/CoverageMappingTest.cpp.o
[771/1192] Building CXX object unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/BenchmarkResultTest.cpp.o
[772/1192] Building CXX object unittests/Transforms/Vectorize/SandboxVectorizer/CMakeFiles/SandboxVectorizerTests.dir/SeedCollectorTest.cpp.o
[773/1192] Building CXX object unittests/CodeGen/CMakeFiles/CodeGenTests.dir/MachineBasicBlockTest.cpp.o
[774/1192] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/CloningTest.cpp.o
[775/1192] Building CXX object tools/clang/unittests/Frontend/CMakeFiles/FrontendTests.dir/FrontendActionTest.cpp.o
[776/1192] Building CXX object unittests/Transforms/Utils/CMakeFiles/UtilsTests.dir/ScalarEvolutionExpanderTest.cpp.o
[777/1192] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/InstructionsTest.cpp.o
[778/1192] Building CXX object unittests/Option/CMakeFiles/OptionTests.dir/OptionParsingTest.cpp.o
[779/1192] Building CXX object tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/RecursiveASTVisitorTests/NestedNameSpecifiers.cpp.o
[780/1192] Building CXX object unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/PowerPC/TargetTest.cpp.o
[781/1192] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/CommentLexer.cpp.o
[782/1192] Building CXX object unittests/DebugInfo/GSYM/CMakeFiles/DebugInfoGSYMTests.dir/GSYMTest.cpp.o
[783/1192] Building CXX object tools/clang/unittests/AST/CMakeFiles/ASTTests.dir/SizelessTypesTest.cpp.o
[784/1192] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/PassManagerTest.cpp.o
[785/1192] Building CXX object tools/clang/unittests/AST/ByteCode/CMakeFiles/InterpTests.dir/Descriptor.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 28, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-rhel running on ppc64le-clang-rhel-test while building llvm at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/3474

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
...
0.214 [1/3/2] Building CXX object compiler-rt/lib/ubsan/CMakeFiles/RTUbsan_dynamic_version_script_dummy.powerpc64le.dir/dummy.cpp.o
0.414 [0/3/3] Linking CXX shared library /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/20/lib/powerpc64le-unknown-linux-gnu/libclang_rt.asan.so
0.415 [0/2/4] Linking CXX shared library /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/clang/20/lib/powerpc64le-unknown-linux-gnu/libclang_rt.ubsan_standalone.so
1.226 [0/1/5] Generating /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/compile_commands.json
22.896 [5/3/1189] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
23.807 [4/2/1190] cd /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/runtimes/runtimes-bins && /home/buildbots/llvm-external-buildbots/cmake-3.28.2/bin/cmake --build /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/runtimes/runtimes-bins/ --target runtimes-test-depends --config Release
ninja: no work to do.
23.874 [3/2/1191] No install step for 'runtimes'
23.896 [2/2/1193] Completed 'runtimes'
28.566 [2/1/1194] Building CXX object unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o
FAILED: unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o 
ccache /home/docker/llvm-external-buildbots/clang.17.0.6/bin/clang++ --gcc-toolchain=/gcc-toolchain/usr -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/unittests/DebugInfo/LogicalView -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/unittests/DebugInfo/LogicalView -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/third-party/unittest/googletest/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o -MF unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o.d -o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:24:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/include/llvm/Testing/Support/Error.h:13:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/include/llvm/Testing/Support/SupportHelpers.h:17:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/third-party/unittest/googlemock/include/gmock/gmock-matchers.h:274:
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/third-party/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h:50:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
 1379 |   if (lhs == rhs) {
      |       ~~~ ^  ~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1398:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
 1398 |     return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
      |            ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:231:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
  231 |   EXPECT_EQ(Scope->getAccessibilityCode(), 1); // Element
      |   ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1869:54: note: expanded from macro 'EXPECT_EQ'
 1869 |   EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
      |                                                      ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: error: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare]
 1379 |   if (lhs == rhs) {
      |       ~~~ ^  ~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1398:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here
 1398 |     return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
      |            ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:234:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, int, nullptr>' requested here
  234 |   EXPECT_EQ(Scope->getCallFilenameIndex(), 5); // ScopeFunctionInlined
      |   ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1869:54: note: expanded from macro 'EXPECT_EQ'
 1869 |   EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
      |                                                      ^
2 errors generated.
ninja: build stopped: subcommand failed.

@CarlosAlbertoEnciso
Copy link
Member Author

CarlosAlbertoEnciso commented Nov 28, 2024

Looking at the reported failures on those specific builders.

Link errors

  • Missing explicitly references to DebugInfoDWARF and Object in the CMakeList.txt

Compile errors: error: comparison of integers of different signs:

  • For the EXPECT_EQ add 'u' to the constants used.

PR that fixes the issues: #117971

@CarlosAlbertoEnciso CarlosAlbertoEnciso deleted the common-get-unsigned-constant branch November 28, 2024 08:11
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 28, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64-aix running on aix-ppc64 while building llvm at step 3 "clean-build-dir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/1565

Here is the relevant piece of the build log for the reference
Step 3 (clean-build-dir) failure: Delete failed. (failure) (timed out)
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
622.796 [480/50/503] Building CXX object unittests/DebugInfo/PDB/CMakeFiles/DebugInfoPDBTests.dir/NativeSessionTest.cpp.o
624.011 [479/50/504] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/IRSimilarityIdentifierTest.cpp.o
624.246 [478/50/505] Building CXX object unittests/Demangle/CMakeFiles/DemangleTests.dir/PartialDemangleTest.cpp.o
624.426 [477/50/506] Building CXX object unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/CommandLineOptionsTest.cpp.o
625.502 [476/50/507] Building CXX object unittests/DebugInfo/MSF/CMakeFiles/DebugInfoMSFTests.dir/MSFCommonTest.cpp.o
625.903 [475/50/508] Building CXX object unittests/Demangle/CMakeFiles/DemangleTests.dir/OutputBufferTest.cpp.o
626.029 [474/50/509] Building CXX object unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFExpressionCopyBytesTest.cpp.o
626.203 [473/50/510] Building CXX object unittests/DebugInfo/PDB/CMakeFiles/DebugInfoPDBTests.dir/PDBApiTest.cpp.o
626.552 [472/50/511] Building CXX object unittests/DWARFLinkerParallel/CMakeFiles/DWARFLinkerParallelTests.dir/DWARFLinkerTest.cpp.o
626.981 [471/50/512] Building CXX object unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o
FAILED: unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o 
/usr/local/clang-17.0.2/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LARGE_FILE_API -D_XOPEN_SOURCE=700 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/unittests/DebugInfo/LogicalView -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/DebugInfo/LogicalView -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/include -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/include -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include -I/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googlemock/include -mcmodel=large -fPIC -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o -MF unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o.d -o unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/DWARFGeneratedTest.cpp.o -c /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp
In file included from /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:24:
In file included from /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/include/llvm/Testing/Support/Error.h:13:
In file included from /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/include/llvm/Testing/Support/SupportHelpers.h:17:
In file included from /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googlemock/include/gmock/gmock-matchers.h:274:
In file included from /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h:50:
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
 1379 |   if (lhs == rhs) {
      |       ~~~ ^  ~~~
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1398:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
 1398 |     return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
      |            ^
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:231:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
  231 |   EXPECT_EQ(Scope->getAccessibilityCode(), 1); // Element
      |   ^
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1869:54: note: expanded from macro 'EXPECT_EQ'
 1869 |   EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
      |                                                      ^
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1379:11: error: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare]
 1379 |   if (lhs == rhs) {
      |       ~~~ ^  ~~~
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1398:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here
 1398 |     return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
      |            ^
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFGeneratedTest.cpp:234:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, int, nullptr>' requested here
  234 |   EXPECT_EQ(Scope->getCallFilenameIndex(), 5); // ScopeFunctionInlined
      |   ^
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1869:54: note: expanded from macro 'EXPECT_EQ'
 1869 |   EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
      |                                                      ^
2 errors generated.
627.017 [471/49/513] Building CXX object unittests/Debuginfod/CMakeFiles/DebuginfodTests.dir/DebuginfodTests.cpp.o
627.023 [471/48/514] Building CXX object unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugFrameTest.cpp.o
627.035 [471/47/515] Building CXX object unittests/DebugInfo/LogicalView/CMakeFiles/DebugInfoLogicalViewTests.dir/__/DWARF/DwarfGenerator.cpp.o
627.215 [471/46/516] Building CXX object unittests/Demangle/CMakeFiles/DemangleTests.dir/RustDemangleTest.cpp.o
628.077 [471/45/517] Building CXX object unittests/Debuginfod/CMakeFiles/DebuginfodTests.dir/HTTPServerTests.cpp.o
628.652 [471/44/518] Building CXX object unittests/DebugInfo/PDB/CMakeFiles/DebugInfoPDBTests.dir/StringTableBuilderTest.cpp.o
628.748 [471/43/519] Building CXX object unittests/DWARFLinkerParallel/CMakeFiles/DWARFLinkerParallelTests.dir/StringPoolTest.cpp.o

@@ -1,17 +1,22 @@
set(LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this make the next 3 lines superfluous?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nico That is a good point. With your suggested change, all pre-commit test pass.
Opened #118052

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants