tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: OSX: No suitable Xcode SDK or Command Line Tools installed [patch/hack]



* On 2016-01-05 at 16:07 GMT, Hubert Feyrer wrote:

> On Thu, 26 Nov 2015, Jonathan Perkin wrote:
> >>I've updated XCode on my system running OS X 10.10.5 the other day,
> >>and now pkgsrc tells me:
> >>
> >>	promise% make
> >>	ERROR: This package has set PKG_FAIL_REASON:
> >>===> 	ERROR: No suitable Xcode SDK or Command Line Tools installed.
> >>	ERROR: graphviz-2.38.0nb9 requires a working dlopen().
> >>	*** Error code 1
> >>
> >>	Stop.
> >>	bmake: stopped in /usr/pkgsrc/graphics/graphviz
> >>
> >>Most likely not, at least helloworld.c builds & runs fine.
> >>So, digging deeper apparently latest XCode thinks it's 10.11 time,
> >>and thus (in pkgsrc/mk/pkatform/Darwin.mk) OSX_VERS gets set wrong,
> >>then the SDK version is of course wrong, and then no proper headers can be
> >>found, etc.
> >>
> >>Digging deeper (see below), I whipped the attached patch together.
> >>
> >>Any comments? Improvements (I'm sure there are many)?
> >
> >How is building against a newer SDK than what you are running going to
> >work?  I confess I haven't tried this in a bulk build yet, but I'm
> >pretty sure it's going to end badly (or worse, in ways that are hard
> >to debug).
> >
> >For now the only sensible route seems to be installing the Command
> >Line Tools as indicated, until Apple either start shipping the 10.10
> >SDK in XCode 7, or stop tricking 10.10 users into upgrading to an
> >XCode which doesn't support their system.
> 
> If you have 10.9 and update Xcode, that's the situation that you end up: A
> working build environment, where only pkgsrc doesn't work. I don't think
> that denying users (and me) a working pkgsrc "just because" is a useful
> option, as there is a patch available that fixes the situation.
>
> I have tested the patch with the latest pkgsrc release with a bunch of pkgs,
> and everything works fine.

This is an unfortunate mis-characterisation of the situation.

Firstly, it is not the case that only pkgsrc is affected - Homebrew
and MacPorts also require the installation of Command Line Tools when
using this configuration, and will not use the 10.11 SDK on 10.10.

Secondly, we aren't denying users a working pkgsrc.  There is a clear
and viable solution to the issue - install the Command Line Tools.  I
myself run 10.10 with Xcode 7 and the CLT installed, and this works
great.

Thirdly, I have genuine concerns - not merely "just because" - that
building software against a newer release than that which you are
running on is going to break in subtle ways, and that we definitely
shouldn't be doing this silently by default rather than informing the
users of how they can fix the problem properly.

> So, are there any real concerns before committing this?

Could I ask why you are insistent on proceeding with this
self-declared "hack", rather than simply installing the Command Line
Tools?  You're only an 'xcode-select --install' away from a working,
supported solution without the need for such hacks.

If there are genuine reasons why CLT are objectionable, then it may be
worth exploring whether we can use something similar to
MACOSX_DEPLOYMENT_TARGET which allows us to use the 10.11 SDK but only
pulling in APIs which are available on 10.10.  This would certainly be
a lot more reassuring than blindly using the 10.11 SDK and hoping for
the best.

Regards,

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index