Homebrew / legacy-homebrew

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

mpd refuses to install #14787

Closed bnhymn closed 12 years ago

bnhymn commented 12 years ago

MPD refuses to install on my system. I've reinstalled Xcode and the developer tools to no avail. Full Log

Fails with this error:

Undefined symbols for architecture x86_64:
  "_allow_severity", referenced from:
      _severity_option in libwrap.a(options.o)
  "_deny_severity", referenced from:
      _severity_option in libwrap.a(options.o)
      _twist_option in libwrap.a(options.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [src/mpd] Error 1
config.log was copied to /Users/bnhymn/Library/Logs/Homebrew
==> Exit Status: 2
jacknagel commented 12 years ago

If you build with --env=std does it work?

bnhymn commented 12 years ago

Unfortunately, no. Fails with exactly the same error.

2bits commented 12 years ago

Unrecognized option '--enable-zip' that's not a good start :-) A quick duck search tells me that allow_severity is a symbol from net-snmp or libwrap for tcpwrappers. My guess is something with libwrap. Here is what your log said:

checking for request_init in -lwrap... yes
configure: auto-detected libwrap

So at least we know it's being detected...

2bits commented 12 years ago

It just installed without error for me on 10.8.1 using XCode-4.4.1+CLT from Preferences.

$ brew install --lastfm mpd
==> Downloading http://sourceforge.net/projects/musicpd/files/mpd/0.17/mpd-0.17.tar.bz2
Already downloaded: /Library/Caches/Homebrew/mpd-0.17.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/mpd/0.17 --enable-bzip2 --enable-flac --enable-shout --enable-fluidsynth --enable-zip --enable-lame-encoder
==> make install
/usr/local/Cellar/mpd/0.17: 13 files, 584K, built in 14 seconds
$
$ brew --config -1
/usr/local-0.9.3 10.8.1 4.4.1 clang-421 llvm-2336 /opt/X11-2.7.3
bnhymn commented 12 years ago

Still not working for me — seems I'm out of date on OS X by x.x.1 but there's no update showing up in the App Store.

[~] brew --config -1
/usr/local-0.9.3 10.8 4.4.1 clang-421 llvm-2336 /opt/X11-2.7.2
2bits commented 12 years ago

Hmm, and your XQuartz too. Strange. What's your brew list? And gist your /Users/bnhymn/Library/Logs/Homebrew/config.log if it still pertains to mpd.

2bits commented 12 years ago

On my system I just saw this:

configure: WARNING: libwrap not found -- disabling libwrap

So please see if you can find where that came from on your system.

bnhymn commented 12 years ago

brew list and config.log as requested: https://gist.github.com/3689641

bnhymn commented 12 years ago
[~] sudo find / -name 'libwrap*'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libwrap.7.6.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libwrap.7.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libwrap.a
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libwrap.dylib
/Library/Caches/Homebrew/mpd--git/m4/libwrap.m4 # tried installing from HEAD, no luck
/Users/bnhymn/Desktop/mpd-0.17.1/m4/libwrap.m4 # me attempting to compile from source, no luck
/usr/lib/libwrap.a # I think this is a standard OSX file, wasn't added by me
2bits commented 12 years ago

I don't have /usr/lib/libwrap* after a clean install of Mountain Lion with XCode-4.4.1+CLT from Preferences. Did you upgrade from 10.7 or 10.6? What do you get for ls -l /usr/lib/libwrap.a? Somehow your config might be non-standard. What do you get for brew --config?

bnhymn commented 12 years ago

This install was upgraded from 10.7.

[~] ls -l /usr/lib/libwrap.a 
-rw-r--r--  1 root  wheel  166024 13 Jun  2011 /usr/lib/libwrap.a
[~] brew --config
HOMEBREW_VERSION: 0.9.3
HEAD: 1a5df200bbf0eed2cc6cd0874ffdd82be462bf42
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.8-x86_64
Xcode: 4.4.1
CLT: 1.0.0.9000000000.1.1249367152
GCC-4.2: build 5666
LLVM-GCC: build 2336
Clang: 4.0 build 421
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/bnhymn/.rbenv/shims/ruby
2bits commented 12 years ago
sudo mv /usr/lib/libwrap.a /usr/lib/libwrap.a.bak
brew install mpd
sudo mv /usr/lib/libwrap.a.bak /usr/lib/libwrap.a

Though I'm of the opinion that you can delete that library. It doesn't exist on my system nor in the 10.8 SDK as you've shown. ping @jacknagel to ask if disabling libwrap in mpd is reasonable.

bnhymn commented 12 years ago

Yep, that actually worked — I finally have a working install of mpd, thanks so much for that! I'll have to look into how libwrap.a got there.

2bits commented 12 years ago

I'll submit a PR to disable libwrap by default and make it an option to turn on. thanks

jacknagel commented 12 years ago

Sorry for ignoring this, I'm just now cleaning out my notifications.

On 10.6 I have /usr/lib/libwrap.{a, dylib}.

Presumably it is no longer part of OS X. Your solution sounds reasonable. Thanks.