Building Clang 8/9 in El Capitan

Christian Calderon calderonchristian73 at gmail.com
Fri Feb 12 16:11:50 UTC 2021


Hi Ken,
Thanks for the reply. I think I've miscommunicated something here so I'm
going to try explaining my goals better. Ultimately, I'm trying to install
PyCUDA. PyCUDA's build process wants to know which compilers are used to
build some of its dependencies. One of the dependencies is Numpy and
another is Boost.

I initially had my MacPorts install configured to build ports only if
needed, but I realized I didn't know which compiler was used to build the
ports I was downloading. So I figured that If I configured MacPorts to
always build every port, then I would be able to easily see which compiler
was used. I ran into a problem with Numpy though. Numpy depends on
OpenBLAS, and OpenBLAS requires gcc to build. By default OpenBLAS will try
to use gcc10 to build, and gcc10 wants to be built with clang-9.0. OpenBLAS
has variants for using other versions of gcc to build, one for gcc9, gcc8,
gcc7, gcc6, etc. The problem I am having is that it seems each of the gcc
versions that OpenBLAS can be built with ultimately have a runtime
dependency on libgcc10, which wants to be built with clang-9.0.

Building clang-9.0 fails because the clang supplied by Xcode 7.3 doesn't
support thread local storage. I could fix this by installing Xcode 8.2,
which is the last version that runs on El Capitan. Xcode 8.2 comes with a
newer version of clang which does support thread local storage, and that
should be able to build clang-9.0.

My issue with this solution is that updating Xcode from 7.3 to 8.2 will
delete the older 10.11 SDK and replace it with the 10.12 SDK. I use other
ports which will not build if the correct SDK is not found, the first one
that comes to mind is mit-scheme. Many times in the past I've had issues
building it after upgrading Xcode for this reason.

The only thing I can think of to fix this mess is to save a copy of the
10.11 SDK and then put it back after upgrading Xcode. Is that correct?

~ Christian Calderon

On Fri, Feb 12, 2021 at 7:20 AM Ken Cunningham <
ken.cunningham.webuse at gmail.com> wrote:

> Both clang-8.0 and clang-9.0 having been building properly for us on the
> buildbots and (when I last did it) locally for me, on ElCap.
>
> See <https://ports.macports.org/port/clang-9.0/summary> and the one for
> clang-8.0.
>
> But your logic is flawed about why you want it, as no clang version
> provides a macOS SDK, those come with either XCode or the Command Line
> Tools which you install separately from Apple.
>
> If you have a build error with clang 8 or 9, open a ticket and include
> your log, and we'll what might be wrong.
>
> Bes;t
>
> Ken
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20210212/5c1c50a2/attachment.htm>


More information about the macports-users mailing list