[llvm-bugs] [Bug 51425] New: Cannot build lld 13 with gcc 6.5.0
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 9 18:29:00 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51425
Bug ID: 51425
Summary: Cannot build lld 13 with gcc 6.5.0
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: romain.geissler at amadeus.com
CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com
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
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210810/fa52f1be/attachment-0001.html>
More information about the llvm-bugs
mailing list