[llvm-dev] Can't build lld on BigSur (due to lack of dylibs under /usr/lib/ ) ?

Vy Nguyen via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 6 11:47:04 PDT 2021


On Tue, 6 Apr 2021 at 01:02, Shoaib Meenai <smeenai at fb.com> wrote:

> I wasn’t able to repro this on Big Sur 11.2.3 (and CMake 3.17.3). Is this
> on a clean build? Which version of Xcode (or the Command Line Tools) are
> you using? That dylib won’t exist because Big Sur moved all system dylibs
> into the shared cache, but CMake should be finding and using the tbd from
> the SDK.
>

Ah, good question! I was *not* doing a clean build. Half of the stuff was
built from Catalina, then I upgraded the OS, and tried to build again(d'oh!)
Nuking the build dir and doing a clean build resolved this. Mystery's
solved!Thanks!!!

Vy



>
> *From: *llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Vy Nguyen
> via llvm-dev <llvm-dev at lists.llvm.org>
> *Reply-To: *Vy Nguyen <vyng at google.com>
> *Date: *Monday, April 5, 2021 at 7:11 PM
> *To: *"llvm-dev at lists.llvm.org" <llvm-dev at lists.llvm.org>
> *Subject: *[llvm-dev] Can't build lld on BigSur (due to lack of dylibs
> under /usr/lib/ ) ?
>
>
>
> Hi,
>
>
>
> I'm trying to build `lld` on BigSur but it couldn't find
> /usr/lib/libxml2.dylib
>
>
>
> ```
>
> $ cd llvm-project/build
>
> $ cmake -G Ninja -DLLVM_ENABLE_PROJECTS='lld' ../llvm/
>
> $ ninja lld
>
> ninja: error: '/usr/lib/libxml2.dylib', needed by 'bin/lld', missing and
> no known rule to make it
>
> ```
>
>
>
> Any idea how to resolve this?
>
>
>
> (I've tried `brew install libxml2` but I couldn't symlink the dylib to
> /usr/lib because it's read-only and I can't change it on this machine)
>
>
>
> Thanks,
>
>
>
> Vy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210406/b496878a/attachment.html>


More information about the llvm-dev mailing list