<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Cannot build lld 13 with gcc 6.5.0"
   href="https://bugs.llvm.org/show_bug.cgi?id=51425">51425</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Cannot build lld 13 with gcc 6.5.0
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>romain.geissler@amadeus.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi,

I am trying to build llvm from branch release/13.x, including lld. It fails
with this error:

[2881/2906] Building CXX object
tools/lld/wasm/CMakeFiles/lldWasm.dir/Writer.cpp.o

FAILED: tools/lld/wasm/CMakeFiles/lldWasm.dir/Writer.cpp.o 

/opt/1A/toolchain/x86_64-2.6.32-v3.0.108/bin/g++ -DGTEST_HAS_RTTI=0
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -Itools/lld/wasm -I/workdir/src/llvm-13.0.0/lld/wasm
-I/workdir/src/llvm-13.0.0/lld/include -Itools/lld/include -Iinclude
-I/workdir/src/llvm-13.0.0/llvm/include -O2 -msse -msse2 -msse3
-I/workdir/build/final-system/llvm-temporary-static-dependencies/install/include
-I/workdir/build/final-system/llvm-temporary-static-dependencies/install/include/ncursesw
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long
-Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
-Wmisleading-indentation -fdiagnostics-color -ffunction-sections
-fdata-sections -O3 -DNDEBUG  -fno-exceptions -fno-rtti -std=c++14 -MD -MT
tools/lld/wasm/CMakeFiles/lldWasm.dir/Writer.cpp.o -MF
tools/lld/wasm/CMakeFiles/lldWasm.dir/Writer.cpp.o.d -o
tools/lld/wasm/CMakeFiles/lldWasm.dir/Writer.cpp.o -c
/workdir/src/llvm-13.0.0/lld/wasm/Writer.cpp

In file included from /workdir/src/llvm-13.0.0/lld/wasm/Writer.cpp:18:0:

/workdir/src/llvm-13.0.0/lld/wasm/SyntheticSections.h:134:36: error:
specialization of 'template<class T> struct llvm::DenseMapInfo' in different
namespace [-fpermissive]

 template <typename T> struct llvm::DenseMapInfo<lld::wasm::ImportKey<T>> {

                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /workdir/src/llvm-13.0.0/lld/wasm/Config.h:12:0,

                 from /workdir/src/llvm-13.0.0/lld/wasm/Writer.cpp:10:

/workdir/src/llvm-13.0.0/llvm/include/llvm/ADT/StringRef.h:38:32: error:   from
definition of 'template<class T> struct llvm::DenseMapInfo' [-fpermissive]

   template <typename T> struct DenseMapInfo;

                                ^~~~~~~~~~~~


while it works with gcc 8, 9 and 11. I suspect that this is because the
specialization is defined with llvm::DenseMapInfo while gcc 6 might expect it
to have it like:

namespace llvm {
    template <typename T> struct DenseMapInfo<lld::wasm::ImportKey<T>> {
        // ...
    }
}

Is it possible to update lld/wasm/SyntheticSections.h in this way ?

Cheers,
Romain</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>