Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.98k stars 11.36k forks source link

HELLLPP!!! ==> Installing darkice dependency: celt Error: comparison of Fixnum with nil failed #26563

Closed wbill closed 10 years ago

wbill commented 10 years ago

==> Installing darkice dependency: celt Error: comparison of Fixnum with nil failed brew install darkice --use-llvm Warning: "--use-llvm" is deprecated and will be removed in a future version. Please use "--cc=llvm-gcc" instead. ==> Installing dependencies for darkice: celt, autoconf, automake, libtool, flac, libsndfile, libsamplerate, jack ==> Installing darkice dependency: celt Error: comparison of Fixnum with nil failed Please report this bug: https://github.com/Homebrew/homebrew/wiki/troubleshooting /usr/local/Library/Homebrew/formula.rb:248:in >=' /usr/local/Library/Homebrew/formula.rb:248:infails_with?' /usr/local/Library/Homebrew/options.rb:19:in any?' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/set.rb:195:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/set.rb:195:in each_key' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/set.rb:195:ineach' /usr/local/Library/Homebrew/formula.rb:244:in any?' /usr/local/Library/Homebrew/formula.rb:244:infails_with?' /usr/local/Library/Homebrew/extend/ENV/shared.rb:124:in validate_cc!' /usr/local/Library/Homebrew/extend/ENV/super.rb:67:insetup_build_environment' /usr/local/Library/Homebrew/build.rb:123:in install' /usr/local/Library/Homebrew/build.rb:45:inmain' /usr/local/Library/Homebrew/build.rb:12 /usr/local/Library/Formula/celt.rb:15

mistydemeo commented 10 years ago

https://github.com/Homebrew/homebrew/wiki/troubleshooting

Please follow this guide and post the requested diagnostics, thanks!

jacknagel commented 10 years ago

Definitely a bug here, I can reproduce it easily:

$ brew rm darkice celt
Uninstalling /usr/local/Cellar/darkice/1.2...
Uninstalling /usr/local/Cellar/celt/0.11.1...
$ brew install darkice --cc=llvm-gcc
==> Installing darkice dependency: celt
Error: comparison of Fixnum with nil failed

Note this is on 10.9 where there is no true llvm-gcc.

jacknagel commented 10 years ago

For completeness: there doesn't seem to be a need to use llvm, it compiles fine with clang.

jacknagel commented 10 years ago

This is this bug: https://github.com/Homebrew/homebrew/issues/18781

I'm going to add a nil check to Formula#fails_with? in the interim.

jacknagel commented 10 years ago

Hmm, after adding the nil check, there is yet another bug: https://gist.github.com/jacknagel/8919488

==> make install
Making install in src
llvm-g++ -DHAVE_CONFIG_H -I. -I/usr/local/include -I/usr/local/include  -I/usr/local/include  -I/usr/local/include -I/usr/local/include    -O2 -pedantic -Wall    -c -o AudioSource.o AudioSource.cpp
Your Xcode and or CLT are mis-configured. Try some or all of the following:
    xcodebuild -license
    sudo xcode-select -switch /path/to/Xcode.app
make[1]: *** [AudioSource.o] Error 1
make: *** [install-recursive] Error 1

My expectation is that it wouldn't attempt to use llvm-gcc (since it is just a symlink to clang).

wbill commented 10 years ago

Ok, you said use clang, I'm new to clang any idea how I should proceed? Thanks for the help!!!

jacknagel commented 10 years ago

Basically don't use --use-llvm. Any advice that says to do this is outdated, and most recent systems don't have llvm-gcc anymore anyway. Clang is the default these days.