curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: c-ares linking problem on Apple, cross-compiling for ARM.

From: Ryan Schmidt via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 30 Jan 2023 21:31:10 -0600

On Jan 25, 2023, at 08:37, Ben Greear wrote:

> Even after my hack yesterday I found another problem though, and that is the libraries
> like 'openssl' that I was getting from 'mac ports' project
> are of course built for the host CPU so won't link into the m1 compiled code.
>
> Do you know if there is an easy way to install ports for a non-native CPU? I'm guessing not, and that
> my best way forward is just to buy another m1 macos machine and build directly on it.
> But, if you know a way, please let me know.

You can instruct MacPorts to install ports for multiple architectures. For example, to have MacPorts install curl and all of its dependencies for both x86_64 and arm64 on macOS 11 or later, you can run:

sudo port install curl +universal

To include c-ares support:

sudo port install curl +ares +universal

Since this is not the default it is much less well tested than building for just a single architecture so you may run into problems. If you do, please file bug reports with MacPorts.

-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-01-31