Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922353 - sys-devel/lld-17.0.6 lld/ELF/Arch/LoongArch.cpp:57:6: error: type ‘Reg’ violates the C++ One Definition Rule [-Werror=odr]
Summary: sys-devel/lld-17.0.6 lld/ELF/Arch/LoongArch.cpp:57:6: error: type ‘Reg’ viola...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-18 09:33 UTC by Arniii
Modified: 2024-03-01 19:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (file_922353.txt,199.62 KB, text/plain)
2024-01-18 09:33 UTC, Arniii
Details
environment (file_922353.txt,149.84 KB, text/plain)
2024-01-18 09:34 UTC, Arniii
Details
make.conf (file_922353.txt,1.51 KB, text/plain)
2024-01-18 09:36 UTC, Arniii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arniii 2024-01-18 09:33:18 UTC
I haven't found something similar on the bugzilla.

FAILED: lib64/liblldELF.so.17 
: && /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -O3 -pipe -march=alderlake -mabm -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=48 --param=l2-cache-size=30720 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -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 -Wimplicit-fallthrough -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  -Wl,-O1 -Wl,--as-needed -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/var/tmp/portage/sys-devel/lld-17.0.6/work/lld_build/./lib64  -Wl,--gc-sections -shared -Wl,-soname,liblldELF.so.17 -o lib64/liblldELF.so.17 ELF/CMakeFiles/lldELF.dir/AArch64ErrataFix.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/AArch64.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/AMDGPU.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/ARM.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/AVR.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/Hexagon.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/LoongArch.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/Mips.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/MipsArchTree.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/MSP430.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/PPC.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/PPC64.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/RISCV.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/SPARCV9.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/X86.cpp.o ELF/CMakeFiles/lldELF.dir/Arch/X86_64.cpp.o ELF/CMakeFiles/lldELF.dir/ARMErrataFix.cpp.o ELF/CMakeFiles/lldELF.dir/CallGraphSort.cpp.o ELF/CMakeFiles/lldELF.dir/DWARF.cpp.o ELF/CMakeFiles/lldELF.dir/Driver.cpp.o ELF/CMakeFiles/lldELF.dir/DriverUtils.cpp.o ELF/CMakeFiles/lldELF.dir/EhFrame.cpp.o ELF/CMakeFiles/lldELF.dir/ICF.cpp.o ELF/CMakeFiles/lldELF.dir/InputFiles.cpp.o ELF/CMakeFiles/lldELF.dir/InputSection.cpp.o ELF/CMakeFiles/lldELF.dir/LTO.cpp.o ELF/CMakeFiles/lldELF.dir/LinkerScript.cpp.o ELF/CMakeFiles/lldELF.dir/MapFile.cpp.o ELF/CMakeFiles/lldELF.dir/MarkLive.cpp.o ELF/CMakeFiles/lldELF.dir/OutputSections.cpp.o ELF/CMakeFiles/lldELF.dir/Relocations.cpp.o ELF/CMakeFiles/lldELF.dir/ScriptLexer.cpp.o ELF/CMakeFiles/lldELF.dir/ScriptParser.cpp.o ELF/CMakeFiles/lldELF.dir/SymbolTable.cpp.o ELF/CMakeFiles/lldELF.dir/Symbols.cpp.o ELF/CMakeFiles/lldELF.dir/SyntheticSections.cpp.o ELF/CMakeFiles/lldELF.dir/Target.cpp.o ELF/CMakeFiles/lldELF.dir/Thunks.cpp.o ELF/CMakeFiles/lldELF.dir/Writer.cpp.o -L/usr/lib/llvm/17/lib64 -Wl,-rpath,"\$ORIGIN/../lib64:/usr/lib/llvm/17/lib64:/var/tmp/portage/sys-devel/lld-17.0.6/work/lld_build/lib64:"  lib64/liblldCommon.so.17  /usr/lib64/libz.so  /usr/lib64/libzstd.so  /usr/lib/llvm/17/lib64/libLLVM-17.so && :
/var/tmp/portage/sys-devel/lld-17.0.6/work/lld/ELF/Arch/LoongArch.cpp:57:6: error: type ‘Reg’ violates the C++ One Definition Rule [-Werror=odr]
   57 | enum Reg {
      |      ^
/var/tmp/portage/sys-devel/lld-17.0.6/work/lld/ELF/Arch/RISCV.cpp:68:6: note: an enum with different value name is defined in another translation unit
   68 | enum Reg {
      |      ^
/var/tmp/portage/sys-devel/lld-17.0.6/work/lld/ELF/Arch/LoongArch.cpp:58:3: note: name ‘R_ZERO’ differs from name ‘X_RA’ defined in another translation unit
   58 |   R_ZERO = 0,
      |   ^
/var/tmp/portage/sys-devel/lld-17.0.6/work/lld/ELF/Arch/RISCV.cpp:69:3: note: mismatching definition
   69 |   X_RA = 1,
      |   ^
lto1: some warnings being treated as errors
lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-g++ returned 1 exit status
Comment 1 Arniii 2024-01-18 09:33:45 UTC
Created attachment 882521 [details]
build.log
Comment 2 Arniii 2024-01-18 09:34:39 UTC
Created attachment 882522 [details]
environment
Comment 3 Arniii 2024-01-18 09:36:55 UTC
Created attachment 882523 [details]
make.conf

it's amd64 stable openrc desktop multilib plasma
Comment 4 Larry the Git Cow gentoo-dev 2024-03-01 07:55:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=230e670ced81a0257c62cbd6d6f8441158fdcaa5

commit 230e670ced81a0257c62cbd6d6f8441158fdcaa5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-03-01 06:26:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-01 07:54:39 +0000

    sys-devel/lld: filter LTO (ODR violations)
    
    Bug: https://github.com/llvm/llvm-project/issues/83529
    Closes: https://bugs.gentoo.org/922353
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/lld/lld-17.0.6.ebuild             | 3 +++
 sys-devel/lld/lld-18.1.0_rc3.ebuild         | 3 +++
 sys-devel/lld/lld-18.1.0_rc4.ebuild         | 3 +++
 sys-devel/lld/lld-19.0.0.9999.ebuild        | 3 +++
 sys-devel/lld/lld-19.0.0_pre20240224.ebuild | 3 +++
 5 files changed, 15 insertions(+)