[MacPorts] #54766: Does port:clang*'s libstdcxx have to be default?

Jeremy Huddleston Sequoia jeremyhu at macports.org
Sat Sep 9 04:06:35 UTC 2017



> On Sep 7, 2017, at 00:27, René J.V. Bertin <rjvbertin at gmail.com> wrote:
> 
> On Wednesday September 06 2017 22:05:16 Jeremy Huddleston Sequoia wrote:
> 
> Hi,
> 
> Sorry, I didn't notice any such changes to base - I update that only when I have a very good reason, and probably would gloss over changes that are irrelevant. Not even having the DevSDK installed ... what good is a computer for in that case? ;)

Well, the DevSDK has been deprecated for around 5 years now (I think some time around 10.8 or 10.9).  It's been kept around because there certainly has been value for it (MacPorts' usage is one such example).  I took it upon myself to figure out how far we could go with MacPorts without it installed and to push for fixes from Apple's releases to address any such shortcomings.

With Xcode 9, we get pretty far.  The one major exception is when the SDK's version doesn't match the host OS (eg: Using the 10.13 SDK from Xcode 9 for Fuji).  The reason for this is that many OSS projects based on autoconf, cmake, etc have an assumption baked into the build system that the SDK matches the minimum level of support.  Apple's SDKs follow a different paradigm and instead indicate the newest functionality available with annotation to indicate what version of the OS new functionality was added.  Apple-centric projects tend to work well with this model, but the vast majority of projects don't.  MacPorts base will looking for a matching macOS SDK in /Library/Developer/SDKs if Xcode doesn't provide one, but there are some issues with that which I am still working through.

>> the DevSDK (the part of the Command Line Tools package that installs /usr/include) is not installed. 
> 
> OK, wondered what that was.
> This is one side-effect of upgrading as little as possible (and using Linux systems in parallel): you forget the hoops you have to go through to get things to work. (Also like how to prune Xcode back down to a justifiable disk footprint by removing crud I'll never use ....)
> 
>> This allows our clang ports to "just work" for users that install them without installing the DevSDK.
> 
> And it changes nothing for the others?

If the DevSDK is installed, then SDKROOT is unset/unmodified by the xcrun wrapper.

>> Removing proxying through xcrun has nothing to do with making it possible to use other compilers.
> 
> Well, Qt does `xcrun -sdk $QMAKE_MAC_SDK -find $QMAKE_CXX`

That scares me, but hopefully they know what they're doing with taht.

> and as far as I've seen that means you always get the clang from Xcode no matter what QMAKE_CXX is set to.

Nope.

$ xcrun -sdk macosx -find clang-mp-devel
/opt/local/bin/clang-mp-devel


> 
> R.



More information about the macports-dev mailing list