ungoogled-chromium-portablelinux
ungoogled-chromium-portablelinux copied to clipboard
Docker build fails at `chrome-sandbox`
cloning the repo/submodules and running ./docker-build.sh
fails with this error:
[1649/50870] LINK ./chrome_sandbox
FAILED: chrome_sandbox
python3 "../../build/toolchain/gcc_link_wrapper.py" --output="./chrome_sandbox" -- clang++ -pie -fuse-ld=lld -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 -flto=thin -Wl,--thinlto-jobs=all -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 -Wl,-mllvm,-import-instr-limit=5 -fwhole-program-vtables -Wl,--no-call-graph-profile-sort -m64 -no-canonical-prefixes -Wl,-O2 -Wl,--gc-sections -rdynamic -nostdlib++ -Wl,--lto-O0 -Wl,-z,defs -Wl,--as-needed -fsanitize=cfi-vcall -fsanitize=cfi-icall -pie -Wl,--disable-new-dtags -o "./chrome_sandbox" -Wl,--start-group @"./chrome_sandbox.rsp" -Wl,--end-group -ldl -lpthread -lrt
clang++: error: invalid linker name in argument '-fuse-ld=lld'
clang++: error: no such file or directory: '/usr/lib/clang/13.0.1/share/cfi_ignorelist.txt'
clang++: error: invalid linker name in argument '-fuse-ld=lld'
Correct. This is related to the issues regarding clang13; the patch is not ported at the moment in this repository.
I compile with clang14, seems to work fine (https://github.com/mdedonno1337/ungoogled-chromium-portablelinux/tree/llvm14)
The linker error can be fixed by adding to build.sh
:
+export LDFLAGS+="-resource-dir=${_llvm_resource_dir} -B${LLVM_BIN}"
fixed in the meanwhile with newer clang versions