Skip to content
This repository has been archived by the owner. It is now read-only.

Git package broken in 10.11 El Capitan #40519

Closed
nrbrook opened this issue Jun 9, 2015 · 41 comments

Comments

@nrbrook
Copy link

commented Jun 9, 2015

While I managed to fix most issues I was initially seeing in El Capitan by installing the latest command line tools, running brew update, brew doctor and fixing the warnings, I can't reinstall git (which I was attempting to do to fix a different issue).

$ brew reinstall git
==> Reinstalling git
==> Downloading https://www.kernel.org/pub/software/scm/git/git-2.4.3.tar.xz
Already downloaded: /Library/Caches/Homebrew/git-2.4.3.tar.xz
==> make prefix=/usr/local/Cellar/git/2.4.3 sysconfdir=/usr/local/etc CC=clang C
./git-compat-util.h:219:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
         ^
1 error generated.
make: *** [ll-merge.o] Error 1
@DomT4

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2015

We don't support El Capitan at this point. What build options are you using?

@xu-cheng xu-cheng added the 10.11 label Jun 9, 2015
@mohibeyki

This comment has been minimized.

Copy link

commented Jun 9, 2015

I have the same issue, and I'm not using any build options, what options should I use?

@DomT4

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2015

You both have the 10.11 CLT installed? Can someone do mdfind ssl.h | grep include? Does /usr/include exist for you both?

@npinon

This comment has been minimized.

Copy link

commented Jun 9, 2015

Yes it exist :

mdfind ssl.h | grep include
/usr/local/Cellar/openssl/1.0.1j/include/openssl/ssl.h
/usr/local/Cellar/openssl/1.0.2/include/openssl/ssl.h
/usr/local/Cellar/openssl/1.0.2a-1/include/openssl/ssl.h
/usr/local/Cellar/openssl/1.0.1f/include/openssl/ssl.h
/usr/local/Cellar/openssl/1.0.1h/include/openssl/ssl.h
/usr/local/Cellar/openssl/1.0.1i/include/openssl/ssl.h

I don't have the same issue :

brew reinstall git
==> Reinstalling git
==> Downloading https://www.kernel.org/pub/software/scm/git/git-2.4.3.tar.xz
Already downloaded: /Library/Caches/Homebrew/git-2.4.3.tar.xz
==> make prefix=/usr/local/Cellar/git/2.4.3 sysconfdir=/usr/local/etc CC=clang CFLAGS= LDFLAGS= install
./git-compat-util.h:100:10: fatal error: 'unistd.h' file not found
#include <unistd.h>
         ^
1 error generated.
make: *** [ll-merge.o] Error 1
@MikeMcQuaid

This comment has been minimized.

Copy link
Member

commented Jun 9, 2015

To be honest if you're already running El Capitan you should be submitting pull requests to fix these type of issues yourselves.

@DomT4

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2015

Yes it exist :

It only exists via Homebrew there - None of those are system directories. You can use a Homebrew OpenSSL by doing brew install git --with-brewed-openssl. Let me know if that works. I'm curious to know if 10.11 kills OpenSSL though - Does /usr/bin/openssl exist?

#include <unistd.h>

This should exist if /usr/include exists.

@mohibeyki

This comment has been minimized.

Copy link

commented Jun 9, 2015

Well, using --with-brewed-openssl worked as it should have :)
and /usr/bing/openssl exists
@MikeMcQuaid unfortunately I'm not an expert in brew, and I feel ashamed because it feels like we should have :(

@DomT4

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2015

and /usr/bin/openssl exists

The headers and libraries should exist somewhere on the system then - Either within Xcode or the CLT. If they exist in Xcode they'll be tucked inside /path/to/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/openssl or similar. Are you all using Xcode 7?

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

commented Jun 9, 2015

Run /usr/bin/openssl -v and see what it says.

@npinon

This comment has been minimized.

Copy link

commented Jun 9, 2015

Openssl isn't the problem. El capitan seems to have a bug in the make phase.

brew reinstall git --with-brewed-openssl
==> Reinstalling git with --with-brewed-openssl
==> Downloading https://www.kernel.org/pub/software/scm/git/git-2.4.3.tar.xz
Already downloaded: /Library/Caches/Homebrew/git-2.4.3.tar.xz
==> make prefix=/usr/local/Cellar/git/2.4.3 sysconfdir=/usr/local/etc CC=clang CFLAGS= LDFLAGS= install
make: *** [hex.o] Error 1
1 error generated.
make: *** [list-objects.o] Error 1
1 error generated.
make: *** [line-log.o] Error 1
@nrbrook

This comment has been minimized.

Copy link
Author

commented Jun 9, 2015

Yes I've seen those errors too, before I installed Command_Line_Tools_OS_X_10.11_for_Xcode_7_beta.dmg I think. brew install git --with-brewed-openssl fixed the git installation for me too

@mohibeyki

This comment has been minimized.

Copy link

commented Jun 9, 2015

I have XCode 6.3.2 and that is probably the problems since there is no MacOSX10.11.sdk in XCode directory (10.10 & 10.9 exists)
I thought having the new CLT tools would mean that these problems shouldn't happen
Using openssl version -a

OpenSSL 0.9.8zf 19 Mar 2015
built on: May  9 2015
platform: darwin64-x86_64-llvm
options:  bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) blowfish(idx)
compiler: -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O3 -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DMD32_REG_T=int -DOPENSSL_NO_IDEA -DOPENSSL_PIC -DOPENSSL_THREADS -DZLIB -mmacosx-version-min=10.6
OPENSSLDIR: "/System/Library/OpenSSL"
@nrbrook

This comment has been minimized.

Copy link
Author

commented Jun 9, 2015

Perhaps sudo xcode-select -switch /Applications/Xcode-beta.app with Xcode 7 beta would fix it? edit: nope, same error.

@DomT4

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2015

El capitan seems to have a bug in the make phase.

Need more details here. brew gist-logs git should show them.

I have XCode 6.3.2 and that is probably the problems since there is no MacOSX10.11.sdk in XCode directory

If you're using the unstable OS X you should be using the unstable Xcode as well.

@npinon

This comment has been minimized.

Copy link

commented Jun 9, 2015

Command Line Tools (OS X 10.11) for Xcode 7 beta && sudo xcode-select -switch /Applications/Xcode-beta.app
resolved the issue.

It works fine now

@epogue

This comment has been minimized.

Copy link

commented Jun 9, 2015

@npinon: Thanks! Fixed it for me as well.

@rslota

This comment has been minimized.

Copy link

commented Jun 9, 2015

@npinon @npinon How is that even possible since there is no openssl in XCode 7 beta/MacOSX10.11.sdk? Can someone confirm that XCode 7 beta contains "Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/openssl" folder?

@alexwhen

This comment has been minimized.

Copy link

commented Jun 9, 2015

same problem

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

commented Jun 9, 2015

Everyone running 10.11 will have the same problem.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

commented Jun 9, 2015

It's almost as if you're running a developers-only OS beta released less than 24h ago.

@mistydemeo

This comment has been minimized.

Copy link
Member

commented Jun 9, 2015

If you're experiencing an issue, and installing Xcode 7 and running xcode-select does not fix the issue, please provide the logs from brew gist-logs git. We can't diagnose anything further without logs. Thanks!

@DomT4

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2015

@Homebrew/owners @bfontaine When do we want to add basic recognition of the new OS X? Names, symbols, Xcode version, etc? We waited till 10 Aug last year.

@mistydemeo

This comment has been minimized.

Copy link
Member

commented Jun 9, 2015

Given that users are installing it already, we should probably add the basics required to support it now, with the caveat that it's definitely unsupported and may not work.

@lloeki

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2015

Re @RoXeon:

# Xcode-beta, sdk 10.10
~> ls /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/openssl | wc -l 
      71
# Xcode-beta, sdk 10.11
~> ls /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/openssl
ls: /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/openssl: No such file or directory

Re @mistydemeo: https://gist.github.com/anonymous/4c693e3c46bf3030078b

with the caveat that it's definitely unsupported and may not work.

Purely as courtesy, shouldn't (at least) brew doctor warn about being run on a yet unknown system?

@epogue

This comment has been minimized.

Copy link

commented Jun 9, 2015

Spoke too soon. @npinon's advice helped me with some packages, but brew install git is failing.

Here are the logs from my system: https://gist.github.com/anonymous/e06a7ee90875513f46ec /cc @mistydemeo

@npinon

This comment has been minimized.

Copy link

commented Jun 9, 2015

@epogue use

brew install git --with-brewed-openssl
@bentruyman

This comment has been minimized.

Copy link

commented Jun 9, 2015

@npinon That worked for me. Thanks.

@RnbWd

This comment has been minimized.

Copy link

commented Jun 9, 2015

I can confirm this works for me too:

brew install git --with-brewed-openssl

thanks!

@mistydemeo

This comment has been minimized.

Copy link
Member

commented Jun 9, 2015

Can someone experiencing this try:

brew install https://gist.githubusercontent.com/mistydemeo/1395c9d5f537c5428d84/raw/685dad5a04cd76d13d0c87966857f48f48aca3ff/git.rb
@lloeki

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2015

@mistydemeo tried, works for me.

mistydemeo added a commit to mistydemeo/homebrew that referenced this issue Jun 9, 2015
Git will still attempt to import OpenSSL headers unless explicitly
told not to.

Fixes Homebrew#40519.
@mistydemeo

This comment has been minimized.

Copy link
Member

commented Jun 9, 2015

PR in #40532.

@RnbWd

This comment has been minimized.

Copy link

commented Jun 9, 2015

@mistydemeo tried your formula as well:

brew install https://gist.githubusercontent.com/mistydemeo/1395c9d5f537c5428d84/raw/685dad5a04cd76d13d0c87966857f48f48aca3ff/git.rb

It worked!

@mistydemeo

This comment has been minimized.

Copy link
Member

commented Jun 9, 2015

Merged that branch; this should be fixed now.

@mistydemeo mistydemeo closed this in 0946193 Jun 9, 2015
@yurikoles

This comment has been minimized.

Copy link

commented Jun 9, 2015

I can say even more, the brew itself is broken, because it fails to link apps. Just try to do a fresh install or clean prefix, not just upgrade and use old brew.

I found one hack: use sudo or setuid for brew binary

@tdsmith

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2015

Please open a new issue if you continue to have problems with this or other packages after upgrading.

@Homebrew Homebrew locked and limited conversation to collaborators Jun 9, 2015
@DomT4

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2015

Something interesting. There is no include/openssl folder in the 10.11 Xcode SDK, but there is lib/libcrypto.tbd and lib/libssl.tbd. There's also lib/sshcrypto/libcrypto.tdb.

Edit - Tim's locking didn't appear until after I hit comment, which is irritating. Sorry Tim 😸

@mistydemeo

This comment has been minimized.

Copy link
Member

commented Jun 10, 2015

The .tbd files are a new feature in the 10.11 SDKs, I believe. The actual libraries are located in /usr/lib as expected; like with Xcode, the CLT doesn't install any openssl headers.

@DomT4

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2015

@mistydemeo Something interesting has apparently happened with ssh on 10.11 - I wonder if Apple are planning to ditch OpenSSL completely relatively soon if they're already dropping the headers, combined with this?

@mistydemeo

This comment has been minimized.

Copy link
Member

commented Jun 11, 2015

ssh has its own libcrypto (/usr/lib/sshcrypto/libcrypto.dylib) and the headers aren't included, so I assume that's not intended for public use at any point.

I know Apple has marked their openssl headers as deprecated, but hopefully they intend to provide more than one OS's worth of notice for removal. The actual libraries probably aren't going away for some time.

@mistydemeo

This comment has been minimized.

Copy link
Member

commented Jun 11, 2015

Interesting though!

@DomT4

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2015

Thanks! Will be interesting to see what Apple's plans are long-term on this, especially with OpenSSL removing support for the 0.9.8 branch in December (Although there's nothing stopping Apple continuing to support the branch themselves).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
You can’t perform that action at this time.