Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Empty archive" error when install formulas with tar.xz archives, after upgrading to Xcode 8 #969

Closed
zhouyan opened this issue Sep 15, 2016 · 13 comments

Comments

@zhouyan
Copy link

zhouyan commented Sep 15, 2016

I have just upgraded to Xcode 8 and run xcode-select --install after the upgrading. I tried to reinstall all formulas I had. And I encountered errors as the following, for example, when installing git,

$ brew install git --verbose
==> Using the sandbox
/usr/bin/sandbox-exec -f /tmp/homebrew20160915-13630-1k3cym9.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Library/Homebrew -- /usr/local/Library/Homebrew/build.rb /usr/local/Library/Taps/homebrew/homebrew-core/Formula/git.rb --verbose
==> Downloading https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.xz
Already downloaded: /Users/Zhou/Library/Caches/Homebrew/git-2.10.0.tar.xz
==> Verifying git-2.10.0.tar.xz checksum
Error: Empty archive

This error only happens with formulas using a source packed as tar.xz instead of gz or bz2. I tried to manually uncompress the package via tar xf and it works fine.

@MikeMcQuaid
Copy link
Member

Try to brew uninstall --force xz.

@zhouyan
Copy link
Author

zhouyan commented Sep 15, 2016

I already tried that before submiting this issue. xz just got reinstalled back as a dependencies for those formulas and the same issue persists.

@mistydemeo
Copy link
Member

Can you install the CLT, then brew reinstall xz, and try again? This is a problem caused by having Xcode 8 on 10.11 without the CLT, which we'll be adding a warning for (#965).

@zhouyan
Copy link
Author

zhouyan commented Sep 15, 2016

Both were done. The first thing I did was to install CLT even before I try to do anything with brew.

On Sep 15, 2016, at 17:37, Misty De Meo notifications@github.com wrote:

Can you install the CLT, then brew reinstall xz, and try again? This is a problem caused by having Xcode 8 on 10.11 without the CLT, which we'll be adding a warning for (#965).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@mistydemeo
Copy link
Member

What happens if you run xz on the commandline?

@zmwangx
Copy link
Contributor

zmwangx commented Sep 15, 2016

Or just brew test xz.

@zhouyan
Copy link
Author

zhouyan commented Sep 15, 2016

brew test xz fail with the following

$ brew test xz
Testing xz
==> Using the sandbox
==> /usr/local/Cellar/xz/5.2.2/bin/xz /tmp/xz-test-20160915-23199-1gis089/data.txt
Last 15 lines from /Users/Zhou/Library/Logs/Homebrew/xz/test.01.xz:
2016-09-15 17:47:00 +0800

/usr/local/Cellar/xz/5.2.2/bin/xz
/tmp/xz-test-20160915-23199-1gis089/data.txt

dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
  Referenced from: /usr/local/Cellar/xz/5.2.2/bin/xz
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _clock_gettime
  Referenced from: /usr/local/Cellar/xz/5.2.2/bin/xz
  Expected in: /usr/lib/libSystem.B.dylib

Error: xz: failed
Failed executing: /usr/local/Cellar/xz/5.2.2/bin/xz /tmp/xz-test-20160915-23199-1gis089/data.txt
/usr/local/Library/Homebrew/formula.rb:1608:in `block in system'
/usr/local/Library/Homebrew/formula.rb:1545:in `open'
/usr/local/Library/Homebrew/formula.rb:1545:in `system'
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/xz.rb:35:in `block in <class:Xz>'
/usr/local/Library/Homebrew/formula.rb:1446:in `block (2 levels) in run_test'
/usr/local/Library/Homebrew/formula.rb:775:in `with_logging'
/usr/local/Library/Homebrew/formula.rb:1445:in `block in run_test'
/usr/local/Library/Homebrew/extend/fileutils.rb:14:in `block in mktemp'
/usr/local/Library/Homebrew/extend/fileutils.rb:74:in `block in run'
/usr/local/Library/Homebrew/extend/fileutils.rb:74:in `chdir'
/usr/local/Library/Homebrew/extend/fileutils.rb:74:in `run'
/usr/local/Library/Homebrew/extend/fileutils.rb:13:in `mktemp'
/usr/local/Library/Homebrew/formula.rb:1439:in `run_test'
/usr/local/Library/Homebrew/test.rb:28:in `block in <main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
/usr/local/Library/Homebrew/test.rb:27:in `<main>'

However, uncompress seems to work just fine. For example cd ~/Library/Cache/Homebrew; tar xf whatever.tar.xz works just fine.

@zmwangx
Copy link
Contributor

zmwangx commented Sep 15, 2016

Your /usr/bin/tar has nothing to do with brewed xz.

Typical Xcode 8 on El Cap debacle.

Please pour our bottle in the meantime rather than compile from source.

@zhouyan
Copy link
Author

zhouyan commented Sep 15, 2016

OK, I guess I have just to wait a few more days for the new OS. It sounds like Xcode 8 on Sierra is better and it is only a problem of Xcode 8 on Ei Cap

@zmwangx
Copy link
Contributor

zmwangx commented Sep 15, 2016

Here's some background reading: Homebrew/homebrew-core#4809 (comment).

And #970 will hopefully fix the problem.

@zmwangx
Copy link
Contributor

zmwangx commented Sep 15, 2016

I guess I have just to wait a few more days for the new OS.

By the way, be advised that if you need anything on this list you'd better hold out a little longer.

@DomT4
Copy link
Member

DomT4 commented Sep 15, 2016

Anyone impacted should brew reinstall xz. This should be fixed by ILZ's sterling work in #970, but you'll need to reinstall the broken xz.

@zmwangx
Copy link
Contributor

zmwangx commented Sep 17, 2016

Closing due to inactivity.

@zmwangx zmwangx closed this as completed Sep 17, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants