Closed Mikotochan closed 5 years ago
I've never seen this error before, and Portable Linux seems to be compiling fine from what I've seen. What is your LLVM setup and how did you install it?
He says:
The llvm tools are installed using repo referenced in the readme and they dont create any symbolic link by default. In the distro I used the original default package for lld just create a symbolic link to the lld-6, the default in repos. Ofc this should be thought and a "llvm-xx" like path should be added to set up the lld version to use 8 and not the default symbolic link hardcoded by now to this old one.
In addition, this is a default installation with Ubuntu 18.04
I had to replace default symbolic link into the system to point to lld-8.
So if I'm understanding this correctly, you're trying to use LLVM's build of LLVM with Ubuntu's build of LLVM (specifically, Ubuntu's LLD with LLVM's Clang)?
Ideally they shouldn't conflict, but we don't really have control over that. Chromium uses the CXX command for linking: https://chromium.googlesource.com/chromium/src/build/+/master/toolchain/linux/unbundle/BUILD.gn
Hi, sorry for the delay in answer. I was who send the report to @Mikotochan.
I think you got confused with my monolithic explanation.
Clarification:
Ideally they shouldn't conflict, but we don't really have control over that. Chromium uses the CXX command for linking: https://chromium.googlesource.com/chromium/src/build/+/master/toolchain/linux/unbundle/BUILD.gn
This may be wrong in some way, following official steps you can see my log in a post before. it points by default to /usr/bin/ld.lld which is the symbolic link to the lld in the default llvm version.
I got full compilation just replacing the symbolic link, so, for me, that configuration is not working in the way that should be.
This may be wrong in some way, following official steps you can see my log in a post before. it points by default to /usr/bin/ld.lld which is the symbolic link to the lld in the default llvm version.
Sure, but see the messages above and below it:
Before (this invokes the linker):
clang++-8 -pie -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-z,defs -Wl,--no-as-needed -fuse-ld=lld -Wl,--icf=all -Wl,--color-diagnostics -flto=thin -Wl,--thinlto-jobs=8 -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy,cache_size=10%:cache_size_bytes=10g:cache_size_files=100000 -Wl,--lto-O0 -fwhole-program-vtables -m64 -Wl,-O2 -Wl,--gc-sections -rdynamic -nostdlib++ -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
You can tell this is a linker command because of -o "./chrome_sandbox"
Also, this is further confirmation after the error messages:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
So clang
invoked the linker, which makes sense if the above command invoked the linker.
So clang++-8
is from LLVM's LLVM build, which tries to use the symbolic link setup from Ubuntu's LLVM build. This should not happen, but I don't really see what option we have here other than remove either Ubuntu's build or LLVM's build.
I think it could be added to the README. Not install LLVM default version from Ubuntu 18.04 repositories (or earlier) and create a symbolic link to /usr/bin/ld.lld without replace that created by the default version. Or just replace it temporarily.
Posting this for a friend, I am quoting them verbatim