Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832675 - >=sys-devel/lld-13.0.1 - DebugTypes.cpp.o: in function `lld::coff::TypeMerger::mergeTypesWithGHash()::{lambda(unsigned int)#3}::operator()(unsigned int) const': DebugTypes.cpp: undefined reference to `__atomic_load_8'
Summary: >=sys-devel/lld-13.0.1 - DebugTypes.cpp.o: in function `lld::coff::TypeMerger...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libatomic-linking
  Show dependency tree
 
Reported: 2022-02-04 01:19 UTC by ernsteiswuerfel
Modified: 2022-11-18 08:02 UTC (History)
1 user (show)

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


Attachments
build.log (lld-13.0.1:20220204-001014.log,200.69 KB, text/plain)
2022-02-04 01:19 UTC, ernsteiswuerfel
Details
emerge --info (file_832675.txt,6.72 KB, text/plain)
2022-02-04 01:19 UTC, ernsteiswuerfel
Details
build.log (ppc, 13.0.1, glibc) (lld-13.0.1:20220215-155758.log,99.67 KB, text/plain)
2022-02-15 16:46 UTC, ernsteiswuerfel
Details
build.log (ppc, 15.0.1) (lld-15.0.2:20221005-094634.log,51.85 KB, text/plain)
2022-10-05 10:51 UTC, ernsteiswuerfel
Details
llvm-15.0.2-cmake_mold_linker_detection.patch (llvm-15.0.2-cmake_mold_linker_detection.patch,399 bytes, patch)
2022-10-05 15:52 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
llvm-15.0.2-cmake_libatomic_variable.patch (llvm-15.0.2-cmake_libatomic_variable.patch,874 bytes, patch)
2022-10-05 15:52 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
lld-15.0.2-linking.patch (lld-15.0.2-linking.patch,656 bytes, patch)
2022-10-05 15:53 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
build.log (ppc, 15.0.2 + llvm-patches applied to llvm + lld patch) (lld-15.0.2:20221005-172153.log,163.12 KB, text/plain)
2022-10-05 17:39 UTC, ernsteiswuerfel
Details
llvm-15.0.2-cmake_mold_linker_detection.patch (llvm-15.0.2-cmake_mold_linker_detection.patch,608 bytes, patch)
2022-10-09 16:53 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
llvm-15.0.2-cmake_libatomic.patch (llvm-15.0.2-cmake_libatomic.patch,1.94 KB, patch)
2022-10-09 16:55 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
lld-15.0.2-linking.patch (lld-15.0.2-linking.patch,817 bytes, patch)
2022-10-09 17:05 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2022-02-04 01:19:06 UTC
Created attachment 764309 [details]
build.log

[...]
[159/167] : && /usr/bin/powerpc-gentoo-linux-musl-g++ -fPIC -O2 -mcpu=7450 -mtune=7450 -pipe -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections  -Wl,-O1 -Wl,--as-needed -Wl,-z,stack-size=2097152 -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/var/tmp/portage/sys-devel/lld-13.0.1/work/lld-13.0.1_build/./lib  -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,liblldCOFF.so.13 -o lib/liblldCOFF.so.13 COFF/CMakeFiles/lldCOFF.dir/CallGraphSort.cpp.o COFF/CMakeFiles/lldCOFF.dir/Chunks.cpp.o COFF/CMakeFiles/lldCOFF.dir/DebugTypes.cpp.o COFF/CMakeFiles/lldCOFF.dir/DLL.cpp.o COFF/CMakeFiles/lldCOFF.dir/Driver.cpp.o COFF/CMakeFiles/lldCOFF.dir/DriverUtils.cpp.o COFF/CMakeFiles/lldCOFF.dir/ICF.cpp.o COFF/CMakeFiles/lldCOFF.dir/InputFiles.cpp.o COFF/CMakeFiles/lldCOFF.dir/LLDMapFile.cpp.o COFF/CMakeFiles/lldCOFF.dir/LTO.cpp.o COFF/CMakeFiles/lldCOFF.dir/MapFile.cpp.o COFF/CMakeFiles/lldCOFF.dir/MarkLive.cpp.o COFF/CMakeFiles/lldCOFF.dir/MinGW.cpp.o COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o COFF/CMakeFiles/lldCOFF.dir/SymbolTable.cpp.o COFF/CMakeFiles/lldCOFF.dir/Symbols.cpp.o COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o -L/usr/lib/llvm/13/lib -Wl,-rpath,"\$ORIGIN/../lib:/usr/lib/llvm/13/lib"  lib/liblldCommon.so.13  /usr/lib/llvm/13/lib/libLLVM-13.so && :
FAILED: lib/liblldCOFF.so.13 
: && /usr/bin/powerpc-gentoo-linux-musl-g++ -fPIC -O2 -mcpu=7450 -mtune=7450 -pipe -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections  -Wl,-O1 -Wl,--as-needed -Wl,-z,stack-size=2097152 -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/var/tmp/portage/sys-devel/lld-13.0.1/work/lld-13.0.1_build/./lib  -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,liblldCOFF.so.13 -o lib/liblldCOFF.so.13 COFF/CMakeFiles/lldCOFF.dir/CallGraphSort.cpp.o COFF/CMakeFiles/lldCOFF.dir/Chunks.cpp.o COFF/CMakeFiles/lldCOFF.dir/DebugTypes.cpp.o COFF/CMakeFiles/lldCOFF.dir/DLL.cpp.o COFF/CMakeFiles/lldCOFF.dir/Driver.cpp.o COFF/CMakeFiles/lldCOFF.dir/DriverUtils.cpp.o COFF/CMakeFiles/lldCOFF.dir/ICF.cpp.o COFF/CMakeFiles/lldCOFF.dir/InputFiles.cpp.o COFF/CMakeFiles/lldCOFF.dir/LLDMapFile.cpp.o COFF/CMakeFiles/lldCOFF.dir/LTO.cpp.o COFF/CMakeFiles/lldCOFF.dir/MapFile.cpp.o COFF/CMakeFiles/lldCOFF.dir/MarkLive.cpp.o COFF/CMakeFiles/lldCOFF.dir/MinGW.cpp.o COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o COFF/CMakeFiles/lldCOFF.dir/SymbolTable.cpp.o COFF/CMakeFiles/lldCOFF.dir/Symbols.cpp.o COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o -L/usr/lib/llvm/13/lib -Wl,-rpath,"\$ORIGIN/../lib:/usr/lib/llvm/13/lib"  lib/liblldCommon.so.13  /usr/lib/llvm/13/lib/libLLVM-13.so && :
/usr/lib/gcc/powerpc-gentoo-linux-musl/11.2.0/../../../../powerpc-gentoo-linux-musl/bin/ld: COFF/CMakeFiles/lldCOFF.dir/DebugTypes.cpp.o: in function `lld::coff::TypeMerger::mergeTypesWithGHash()::{lambda(unsigned int)#3}::operator()(unsigned int) const':
DebugTypes.cpp:(.text._ZZN3lld4coff10TypeMerger19mergeTypesWithGHashEvENKUljE1_clEj+0x1b0): undefined reference to `__atomic_load_8'
/usr/lib/gcc/powerpc-gentoo-linux-musl/11.2.0/../../../../powerpc-gentoo-linux-musl/bin/ld: DebugTypes.cpp:(.text._ZZN3lld4coff10TypeMerger19mergeTypesWithGHashEvENKUljE1_clEj+0x1e4): undefined reference to `__atomic_compare_exchange_8'
/usr/lib/gcc/powerpc-gentoo-linux-musl/11.2.0/../../../../powerpc-gentoo-linux-musl/bin/ld: DebugTypes.cpp:(.text._ZZN3lld4coff10TypeMerger19mergeTypesWithGHashEvENKUljE1_clEj+0x2c4): undefined reference to `__atomic_compare_exchange_8'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
 * ERROR: sys-devel/lld-13.0.1::gentoo failed (compile phase):
Comment 1 ernsteiswuerfel archtester 2022-02-04 01:19:46 UTC
Created attachment 764310 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2022-02-15 16:46:32 UTC
Created attachment 765201 [details]
build.log (ppc, 13.0.1, glibc)

Turns out this build failure is not musl specific but happens in glibc builds too.

[...]
FAILED: lib/liblldCOFF.so.13 
: && /usr/bin/powerpc-unknown-linux-gnu-g++ -fPIC -O2 -mcpu=7450 -pipe -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections  -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/var/tmp/portage/sys-devel/lld-13.0.1/work/lld-13.0.1_build/./lib  -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,liblldCOFF.so.13 -o lib/liblldCOFF.so.13 COFF/CMakeFiles/lldCOFF.dir/CallGraphSort.cpp.o COFF/CMakeFiles/lldCOFF.dir/Chunks.cpp.o COFF/CMakeFiles/lldCOFF.dir/DebugTypes.cpp.o COFF/CMakeFiles/lldCOFF.dir/DLL.cpp.o COFF/CMakeFiles/lldCOFF.dir/Driver.cpp.o COFF/CMakeFiles/lldCOFF.dir/DriverUtils.cpp.o COFF/CMakeFiles/lldCOFF.dir/ICF.cpp.o COFF/CMakeFiles/lldCOFF.dir/InputFiles.cpp.o COFF/CMakeFiles/lldCOFF.dir/LLDMapFile.cpp.o COFF/CMakeFiles/lldCOFF.dir/LTO.cpp.o COFF/CMakeFiles/lldCOFF.dir/MapFile.cpp.o COFF/CMakeFiles/lldCOFF.dir/MarkLive.cpp.o COFF/CMakeFiles/lldCOFF.dir/MinGW.cpp.o COFF/CMakeFiles/lldCOFF.dir/PDB.cpp.o COFF/CMakeFiles/lldCOFF.dir/SymbolTable.cpp.o COFF/CMakeFiles/lldCOFF.dir/Symbols.cpp.o COFF/CMakeFiles/lldCOFF.dir/Writer.cpp.o -L/usr/lib/llvm/13/lib -Wl,-rpath,"\$ORIGIN/../lib:/usr/lib/llvm/13/lib"  lib/liblldCommon.so.13  -lpthread  /usr/lib/llvm/13/lib/libLLVM-13.so && :
/usr/lib/gcc/powerpc-unknown-linux-gnu/11.2.0/../../../../powerpc-unknown-linux-gnu/bin/ld: COFF/CMakeFiles/lldCOFF.dir/DebugTypes.cpp.o: in function `lld::coff::TypeMerger::mergeTypesWithGHash()::{lambda(unsigned int)#3}::operator()(unsigned int) const':
DebugTypes.cpp:(.text._ZZN3lld4coff10TypeMerger19mergeTypesWithGHashEvENKUljE1_clEj+0x1b0): undefined reference to `__atomic_load_8'
/usr/lib/gcc/powerpc-unknown-linux-gnu/11.2.0/../../../../powerpc-unknown-linux-gnu/bin/ld: DebugTypes.cpp:(.text._ZZN3lld4coff10TypeMerger19mergeTypesWithGHashEvENKUljE1_clEj+0x1e4): undefined reference to `__atomic_compare_exchange_8'
/usr/lib/gcc/powerpc-unknown-linux-gnu/11.2.0/../../../../powerpc-unknown-linux-gnu/bin/ld: DebugTypes.cpp:(.text._ZZN3lld4coff10TypeMerger19mergeTypesWithGHashEvENKUljE1_clEj+0x2c4): undefined reference to `__atomic_compare_exchange_8'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Comment 3 ernsteiswuerfel archtester 2022-10-05 10:51:58 UTC
Created attachment 820792 [details]
build.log (ppc, 15.0.1)
Comment 4 Arfrever Frehtes Taifersar Arahesis 2022-10-05 15:52:03 UTC
Created attachment 820807 [details, diff]
llvm-15.0.2-cmake_mold_linker_detection.patch
Comment 5 Arfrever Frehtes Taifersar Arahesis 2022-10-05 15:52:46 UTC
Created attachment 820810 [details, diff]
llvm-15.0.2-cmake_libatomic_variable.patch
Comment 6 Arfrever Frehtes Taifersar Arahesis 2022-10-05 15:53:45 UTC
Created attachment 820813 [details, diff]
lld-15.0.2-linking.patch
Comment 7 ernsteiswuerfel archtester 2022-10-05 17:39:13 UTC
Created attachment 820825 [details]
build.log (ppc, 15.0.2 + llvm-patches applied to llvm + lld patch)

Builds fine now. Thanks!
Comment 8 Arfrever Frehtes Taifersar Arahesis 2022-10-09 16:53:55 UTC
Created attachment 822934 [details, diff]
llvm-15.0.2-cmake_mold_linker_detection.patch
Comment 9 Arfrever Frehtes Taifersar Arahesis 2022-10-09 16:55:47 UTC
Created attachment 822940 [details, diff]
llvm-15.0.2-cmake_libatomic.patch
Comment 10 Arfrever Frehtes Taifersar Arahesis 2022-10-09 17:05:40 UTC
Created attachment 822946 [details, diff]
lld-15.0.2-linking.patch
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-18 08:02:00 UTC
Fixed in 15.0.5.