Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add `depends_on :clt` #14384

Closed
mxcl opened this Issue · 23 comments

6 participants

@mxcl
Collaborator

A number of formula fail to build without the CLT installed, and my attempts to fix them prove that it may not be possible. Here is a current list:

  • lippurple (no tcl-config.sh)
  • ldns (can't find openssl)
  • opencv (Python.h)
  • fontforge (Python.h)
  • libstfl (Can't find Ruby.h)
  • gdal. (Can't find numpy/*.h)
@adamv
Owner

See #14371

@samueljohn

I could add other (perhaps more severe cases) to your list.
But Python.h, Ruby.h can easily be solved by brew install python ruby.

For these cases, I'd prefer

depends_on 'python' unless MacOS::clt.installed?

instead of depends_on :clt (assuming depends_on 'python' means homebrew's python and not any)

@mxcl
Collaborator

As much as I want wo/CLT to work I'm reluctant to litter formula with special case handling.

I actually solved the Python.h ones in superenv, but gdal proved it is a inadequate fix. Depending on brew/python works but then you are adding a massive dep. Really it should remove the python features. But then you should support that and the alternative etc. So it's tonnes of special handling for a minority of users.

@samueljohn

It isn't that bad as you describe and will get better over time because upstream devs will also notice that many people have Xcode but not the CLTs or the other way around.

I still haven't had the time to really understand what your superenv does.

@mxcl
Collaborator

I find it very unlikely that upstream devs will support Xcode without CLT. Why should they? It's complicated and not designed for anything but the Xcode IDE. Also it's subject to change every release.

Maybe it's not as bad as I say, but based on my work the last week or so, I certainly think there are categories of problems that are not solved easily.

I use Xcode wo/CLT and will continue to on my main machine for the foreseeable future. But I wouldn't recommend it, and I have another machine for testing which is CLT wo/Xcode.

@samueljohn

Probably you are right :-)

I use Xcode wo/CLT and will continue to on my main machine for the foreseeable future. But I wouldn't recommend it, and I have another machine for testing which is CLT wo/Xcode.

100% agree. Same for me.
Still a bit sad that Apple did removed the CLT just to spare 150 megs.

@mxcl
Collaborator

Still a bit sad that Apple did removed the CLT just to spare 150 megs.

I think it was motivated by:

  1. Xcode needing to be just the .app bundle for the App Store
  2. Wanting to distribute the CLT separately.

Once you've done both of these. You don't want to install the CLT by default when the .app opens as users will demand that it be optional. And then you have what you have.

@samueljohn

distribute the CLT separately

... which is great but (when I checked last) a normal Apple-ID was not sufficient to download.

@jacknagel
Collaborator

Applied @samueljohn's pull request to my deps branch; #14456.

@MindTooth

Might this be the cause of me not being able to install Mercurial w/o CLT?

Ed1t: Can't find Python headers. This also include with # pip install mercurial.

@samueljohn

Thanks @jacknagel!

Perhaps we have to fix mercurial to deal with system python's moved headers on Xcode ony systems.
If you don't mind installing brewed python - it would fix that, @MindTooth .

@MindTooth

Would mean I need to install Xquartz. Not that I wan't to be difficult, but if I can manage with only Xcode.app, I'm quite happy with that :) But, I have no intention to add more work if people see it unfit. I respect the work going into this :)

@samueljohn

Pythons uses Tk and Tk, in turn, includes one or two headers from X. If we make Tk an option we could get rid of X. But tk is still kind of the default GUI. Or we find that X is perhaps not really needed at all. But how to patch?

@mxcl
Collaborator

Consider this the definite default for Homebrew: --without-X (when possible).

@mikemcquaid
Owner

@mxcl If that's the case I'll bear that in mind for anything non-gtk.

@mxcl
Collaborator

When possible, and practical. Obviously stuff that needs X to be useful should depend on X.

@mxcl
Collaborator

The reason for this new attitude is: X is no longer readily available. And it sucks.

@adamv
Owner

Note that things that "depend_on :x11" really ought to have a code comment reminding us why

@mikemcquaid
Owner

I'm working on it. Very little stuff justifiably needs to depend on X11. Longer term I'd say that stuff should be in another tap anyway.

@MindTooth

If I installed OpenSSL, and I pointed ldns like so:

./configure --prefix=/usr/local/Cellar/ldns/1.6.13 --with-drill --with-ssl=/usr/local/Cellar/openssl/1.0.1c

It worked just fine for no_clt. Also added depends_on 'openssl'. This will of course break if OpenSSL upgrades, so maybe it's a dead end.

(Though I expect everyone in here to know this already, with how building software works :P )

P.S.: Read this about OpenSSL being somewhat deprecated in Lion: http://ludovicrousseau.blogspot.no/2011/08/mac-os-x-lion-and-openssl.html

@adamv
Owner

Is depends_on :clt still a needed option? This thread seems to have drifted from the subject line.

@mxcl
Collaborator

Some formula need it. Or need to be hacked copiously.

@adamv
Owner

Closing in anticipation of #14456 which includes a patch for this.

@adamv adamv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.