Hi Levi Zim,
I am currently attempting to build Chromium for RISC-V64 using the Clang toolchain. While the build progresses significantly, I am encountering a consistent linker failure when building libvk_swiftshader.so.
I have configured the build with the following
args.gn:
riscv_march = "rv64gc"
riscv_mcpu = "generic-rv64"
target_os = "linux"
target_cpu = "riscv64"
is_clang = true
clang_base_path = "//third_party/llvm-build/Release+Asserts"
clang_use_chrome_plugins = false
is_debug = false
is_component_build = false
use_ozone = true
ozone_platform_wayland = true
ozone_platform_x11 = false
v8_target_cpu = "riscv64"
treat_warnings_as_errors = false
is_official_build = true
chrome_pgo_phase=0
and build the chromium by the command autoninja -C out/riscv64 chrome,
The build fails with the following error:
[24033/112669] 29m29.46s F SOLINK ./libvk_swiftshader.so
FAILED: 33dee98b-8f57-439b-b29b-c8f7defb14c9 "./libvk_swiftshader.so" SOLINK ./libvk_swiftshader.so
err: exit=1
"python3" "../../build/toolchain/gcc_solink_wrapper.py" --readelf="../../third_party/llvm-build/Release+Asserts/bin/llvm-readelf" --nm="../../third_party/llvm-build/Release+Asserts/bin/llvm-nm" --sofile="./libvk_swiftshader.so" --tocfile="./libvk_swiftshader.so.TOC" --output="./libvk_swiftshader.so" -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-soname="libvk_swiftshader.so" -Wl,-Bsymbolic -Wl,--version-script=../../third_party/swiftshader/src/Vulkan/vk_swiftshader.lds -fuse-ld=lld -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--icf=all -Wl,--color-diagnostics -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -Wl,-mllvm,-split-threshold-for-reg-with-hint=0 -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 -flto=thin -Wl,--thinlto-jobs=all -Wl,-mllvm,-import-instr-limit=30 -Wl,-mllvm,-disable-auto-upgrade-debug-info -Wl,-mllvm,-inlinehint-threshold=360 -fwhole-program-vtables -Wl,--undefined-version -Wl,--no-call-graph-profile-sort --target=riscv64-linux-gnu -no-canonical-prefixes -Wl,-O2 -Wl,--gc-sections -gsplit-dwarf -Wl,--gdb-index -Wl,-z,defs -Wl,--as-needed -nostdlib++ --sysroot=../../build/linux/debian_trixie_riscv64-sysroot -Wl,--lto-O0 -o "./libvk_swiftshader.so" @"./libvk_swiftshader.so.rsp"
build step: solink "./libvk_swiftshader.so"
siso_rule: clang/solink
stderr:
Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: <unknown>:0: A dwo section may not contain relocations
ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
build failed
local:24249 remote:0 cache:0 cache-write:0(err:0) fallback:0 retry:0 skip:16373
fs: ops: 759928(err:274279) / r:187181(err:0) 12.56GiB / w:2729(err:0) 59.32MiB
resource/capa used(err) wait-avg | s m | serv-avg | s m |
localexec/12 17105(0) 6m01.64s |▂▂▂▂▃█▄| 1.19s |▂▃█▅▂▂ |
pool=action/12 5855(0) 2m03.70s |▃▃▃▂▃█ | 0.79s | ▅█▃▂▂ |
31m37.67s Build Failure: 24249 done, 1 failed, 88351 remaining - 12.78/s
1 steps failed: exit=1
see ./out/riscv64/siso_output for full command line and output
or ./out/riscv64/siso.INFO
use ./out/riscv64/siso_failed_commands.sh to re-run failed commands
Can you help me to solve this issue?
Regards,
Sharath.K