[llvm-dev] Ld64.lld cannot find Foundation framework

mayuyu.io via llvm-dev llvm-dev at lists.llvm.org
Fri May 8 02:51:31 PDT 2020


That’s because it requires Apple Internal SDK.

Zhang

> 在 2020年5月8日,15:58,Edmund Furse via llvm-dev <llvm-dev at lists.llvm.org> 写道:
> 
> Thank you for your ideas.I have tried both of your suggestions.
> 
> 1).  Apple’s ld64 downloads ok and the xcodeproj launches ok.  However a build gives six errors including:
> Unable to find sdk ‘Macosx.internal’
> tapi/tapi.h file not found
> macho-/dyld+priv_h file not found
> llvm-c/lto.h file not found
> Why cannot Apple provide code that works?  Has anyone managed to overcome these problems?
> 
> 2). lzd stores some metadata in /tmp/zld-… and hence will not be allowed in a Sandboxed app.
> 
> 
> 
>> On 7 May 2020, at 20:38, Shoaib Meenai <smeenai at fb.com> wrote:
>> 
>> You can always download source tarballs of ld64 from https://opensource.apple.com/tarballs/ld64/ and build it yourself. (https://github.com/michaeleisel/zld might also be interesting to you, depending on what all you plan to use the linker for.)
>>  
>> From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Edmund Furse via llvm-dev <llvm-dev at lists.llvm.org>
>> Reply-To: Edmund Furse <edmund.furse at imitation.uk.com>
>> Date: Thursday, May 7, 2020 at 12:16 PM
>> To: James Y Knight <jyknight at google.com>
>> Cc: "llvm-dev at lists.llvm.org" <llvm-dev at lists.llvm.org>
>> Subject: Re: [llvm-dev] Ld64.lld cannot find Foundation framework
>>  
>> James, many thanks.
>>  
>> Is there any linker available for Macs that has a freely available binary version?
>> I thought maybe that GNU’s linker might fit the bill?
>>  
>> I cannot use Apple’s linker from /usr/bin/ as it is not allowed to make external calls from a sandboxed app.
>> Hence my interest in the LLVM lld.
>> 
>> 
>> On 7 May 2020, at 19:21, James Y Knight <jyknight at google.com> wrote:
>>  
>> On Thu, May 7, 2020 at 1:54 PM Edmund Furse <edmund.furse at imitation.uk.com> wrote:
>> Thanks for your reply.  Two questions:
>> 1). Will ld64.lld be fixed in LLVM v11.0 and when is this likely to be?
>>  
>> Likely won't be fixed that soon.
>>  
>> 2). You mention Apple’s linker, by which I assume you mean GNU’s ld.
>> Is it possible to get a binary version of ld (preferably that does not use other things from /usr/bin)?
>>  
>> No, Apple does not use GNU ld, they have their own linker, "ld64". That's what you ran as /usr/bin/ld on your mac.
> 
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200508/6c909f2c/attachment.html>


More information about the llvm-dev mailing list