On Feb 12, 2021, at 10:11, Christian Calderon wrote:

> 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.

That's true. MacPorts is not designed to provide you with this information. 
Nobody's ever asked for it before and I'm not sure I see why you would need to 
know.


> 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.

Sounds like the line `compiler.thread_local_storage yes` should be added to the 
clang-9.0 portfile so that it will automatically use a MacPorts clang instead 
of an incompatible Xcode clang.


> 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?

Copying the SDK is an option.


On Fri, Feb 12, 2021 at 7:20 AM Ken Cunningham 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.

Yes but this is evidently because we are using Xcode 8.2.1 on the El Capitan 
worker, while Christian is and wants to continue using Xcode 7.x.


> 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.

Indeed.

Reply via email to