Homebrew / legacy-homebrew

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

libsndfile errors when attempting to compile #3488

Closed shelbyKiraM closed 13 years ago

shelbyKiraM commented 13 years ago

I recently reinstalled my OS, and when trying to build mpd, got this

user@oniichan:~$ brew doctor
We couldn't detect gcc 4.0.x. Some formulae require this compiler.

You changed your cc to symlink to llvm.
This bypasses LLVM checks, and some formulae may mysteriously fail to work.
You may want to change /usr/bin/cc to point back at gcc.

To force Homebrew to use LLVM, you can set the "HOMEBREW_LLVM" environmental
variable, or pass "--use-llvm" to "brew install".

Warning: X11 not installed.
You don't have X11 installed as part of your Xcode installation.
This isn't required for all formulae, but is expected by some.

user@oniichan:~$ brew install mpd
==> Downloading http://pkg-config.freedesktop.org/releases/pkg-config-0.25.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/pkg-config/0.25 --with-pc-path=/usr/local/lib/pkgconfig:/usr/lib/pkgconfi
==> make install
/usr/local/Cellar/pkg-config/0.25: 8 files, 232K, built in 32 seconds
==> Downloading http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file gettext-runtime/gnulib-lib/setenv.c
patching file gettext-tools/gnulib-lib/execute.c
patching file gettext-tools/gnulib-lib/pipe.c
patching file gettext-tools/gnulib-lib/setenv.c
patching file gettext-tools/gnulib-lib/unsetenv.c
==> ./configure --disable-dependency-tracking --disable-debug --prefix=/usr/local/Cellar/gettext/0.17 --without-emacs --without-included-gettext --without-included-glib --without-included-libcroco --without-included-libxml
==> make
==> make install
==> Caveats
This formula is keg-only, so it is not symlinked into Homebrew's prefix.
The formula provides the following rationale:

OS X provides the BSD gettext library and some software gets confused if both are in the library path.

Generally there are no consequences of this for you, however if you build
your own software and it requires this formula, you may want to run this
command to link it into the Homebrew prefix:
    $ brew link gettext
==> Summary
/usr/local/Cellar/gettext/0.17: 353 files, 9.5M, built in 4.9 minutes
==> Downloading http://ftp.gnome.org/pub/gnome/sources/glib/2.24/glib-2.24.2.tar.bz2
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> Downloading patches
######################################################################## 100.0%
######################################################################## 100.0%
==> Patching
patching file configure.in
patching file tests/child-test.c
==> Downloading http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/private/tmp/homebrew-glib-2.24.2-Cyid/glib-2.24.2/iconv --enable-static --disable-shared
==> make install
==> ./configure --disable-dependency-tracking --disable-rebuilds --prefix=/usr/local/Cellar/glib/2.24.2 --with-libiconv=gnu --disable-debug
######################################################################## 100.0%
==> ed - config.h < config.h.ed
==> make
==> make install
/usr/local/Cellar/glib/2.24.2: 296 files, 7.5M, built in 2.6 minutes
==> Downloading http://downloads.sourceforge.net/project/mad/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/libid3tag/0.15.1b --disable-debug --disable-dependency-tracking
==> make install
/usr/local/Cellar/libid3tag/0.15.1b: 6 files, 260K, built in 14 seconds
==> Downloading http://downloads.sourceforge.net/sourceforge/lame/lame-3.98.4.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/lame/3.98.4 --enable-nasm
==> make install
/usr/local/Cellar/lame/3.98.4: 19 files, 1.7M, built in 37 seconds
==> Downloading http://downloads.xiph.org/releases/ogg/libogg-1.2.0.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/libogg/1.2.0
==> make
==> make install
/usr/local/Cellar/libogg/1.2.0: 82 files, 508K, built in 10 seconds
==> Downloading http://downloads.sourceforge.net/sourceforge/flac/flac-1.2.1.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --disable-debug --disable-asm-optimizations --enable-sse --prefix=/usr/local/Cellar/flac/1.2.1 --mandir=/usr/local/Cellar/flac/1.2.1/share/man
==> make install
==> Downloading https://gist.github.com/raw/124242/79857936f1d72824be0fb5d2ac845c02322abea0/flac2mp3
######################################################################## 100.0%
/usr/local/Cellar/flac/1.2.1: 303 files, 6.6M, built in 60 seconds
==> Downloading http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.1.tar.bz2
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/libvorbis/1.3.1
==> make install
/usr/local/Cellar/libvorbis/1.3.1: 117 files, 7.2M, built in 22 seconds
==> Downloading http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/theora/1.1.1
==> make install
/usr/local/Cellar/theora/1.1.1: 91 files, 2.4M, built in 19 seconds
==> Downloading http://downloads.us.xiph.org/releases/speex/speex-1.2rc1.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/speex/1.2rc1 --disable-debug --disable-dependency-tracking
==> make install
/usr/local/Cellar/speex/1.2rc1: 28 files, 1.1M, built in 39 seconds
==> Downloading http://downloads.us.xiph.org/releases/libshout/libshout-2.2.2.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/libshout/2.2.2 --disable-debug --disable-dependency-tracking
==> make install
/usr/local/Cellar/libshout/2.2.2: 12 files, 260K, built in 20 seconds
==> Downloading http://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --disable-debugging --enable-fpm=64bit --prefix=/usr/local/Cellar/mad/0.15.1b
==> make install
/usr/local/Cellar/mad/0.15.1b: 7 files, 352K, built in 19 seconds
==> Downloading http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.bz2
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/faad2/2.7 --disable-debug --disable-dependency-tracking
==> make install
/usr/local/Cellar/faad2/2.7: 13 files, 808K, built in 27 seconds
==> Downloading http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.23.tar.gz
File already downloaded and cached to /Users/user/Library/Caches/Homebrew
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/libsndfile/1.0.23
==> make install
Making install in M4
Making install in man
 /usr/bin/install -c -m 644 sndfile-info.1 sndfile-play.1 sndfile-convert.1 sndfile-cmp.1 sndfile-metadata-get.1 sndfile-metadata-set.1 sndfile-concat.1 sndfile-interleave.1 sndfile-deinterleave.1 '/usr/local/Cellar/libsndfile/1.0.23/share/man/man1'
Making install in doc
 /usr/bin/install -c -m 644 index.html libsndfile.jpg libsndfile.css api.html command.html bugs.html sndfile_info.html new_file_type.HOWTO pkgconfig.html win32.html FAQ.html lists.html embedded_files.html octave.html dither.html tutorial.html '/usr/local/Cellar/libsndfile/1.0.23/share/doc/libsndfile1-dev/html'
Making install in Win32
Making install in src
Making install in GSM610
  CC    decode.o
  CC    add.o
  CC    gsm_decode.o
  CC    gsm_encode.o
  CC    long_term.o
  CC    preprocess.o
  CC    short_term.o
  CC    code.o
  CC    gsm_create.o
  CC    gsm_destroy.o
  CC    gsm_option.o
  CC    lpc.o
  CC    rpe.o
  CC    table.o
  LINK  libgsm.la
Making install in G72x
  CC    g72x.o
  CC    g721.o
  CC    g723_16.o
  CC    g723_24.o
  CC    g723_40.o
  CC    
  LINK  libg72x.la
  LINK  g72x_test
  CC    sndfile.o
  CC    aiff.o
  CC    au.o
  CC    avr.o
  CC    caf.o
  CC    dwd.o
  CC    flac.o
  CC    g72x.o
  CC    htk.o
  CC    ircam.o
  CC    macbinary3.o
  CC    macos.o
  CC    mat4.o
  CC    mat5.o
  CC    nist.o
  CC    ogg.o
  CC    paf.o
  CC    pvf.o
  CC    raw.o
  CC    rx2.o
  CC    sd2.o
  CC    sds.o
  CC    svx.o
  CC    txw.o
  CC    wve.o
  CC    voc.o
  CC    w64.o
  CC    wav_w64.o
  CC    wav.o
  CC    xi.o
  CC    mpc2k.o
  CC    rf64.o
  CC    common.o
  CC    file_io.o
  CC    command.o
  CC    pcm.o
  CC    ulaw.o
  CC    alaw.o
  CC    float32.o
  CC    double64.o
  CC    ima_adpcm.o
  CC    ms_adpcm.o
  CC    gsm610.o
  CC    dwvw.o
  CC    vox_adpcm.o
  CC    interleave.o
  CC    strings.o
  CC    dither.o
  CC    broadcast.o
  CC    audio_detect.o
  CC    ima_oki_adpcm.o
  CC    chunk.o
  CC    chanmap.o
  CC    windows.o
  CC    id3.o
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  LINK  libcommon.la
ranlib: file: .libs/libcommon.a(windows.o) has no symbols
  LINK  test_main
  LINK  libsndfile.la
warning: no debug symbols in executable (-arch x86_64)
copying selected object files to avoid basename conflicts...
ranlib: file: .libs/libsndfile.a(windows.o) has no symbols
 /bin/sh /private/tmp/homebrew-libsndfile-1.0.23-5FTf/libsndfile-1.0.23/shave-libtool '/bin/sh ../libtool'   --mode=install /usr/bin/install -c   libsndfile.la '/usr/local/Cellar/libsndfile/1.0.23/lib'
 /usr/bin/install -c -m 644 sndfile.hh '/usr/local/Cellar/libsndfile/1.0.23/include'

 /usr/bin/install -c -m 644 sndfile.h '/usr/local/Cellar/libsndfile/1.0.23/include'
ranlib: file: /usr/local/Cellar/libsndfile/1.0.23/lib/libsndfile.a(windows.o) has no symbols
Making install in examples
  CC    
  CC    
  CC    
  CC    
  CXX   sndfilehandle.o
  CC    
  LINK  make_sine
  LINK  sfprocess
  LINK  list_formats
  LINK  generate
  LINK  sndfilehandle
  LINK  sndfile-to-text
Making install in regtest
  CC    
  CC    
  CC    
  LINK  sndfile-regtest
  /bin/sh /private/tmp/homebrew-libsndfile-1.0.23-5FTf/libsndfile-1.0.23/shave-libtool '/bin/sh ../libtool'   --mode=install /usr/bin/install -c sndfile-regtest '/usr/local/Cellar/libsndfile/1.0.23/bin'

Making install in tests
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CC    
  CXX   cpp_test.o
  LINK  sfversion
  LINK  floating_point_test
  LINK  write_read_test
  LINK  lossy_comp_test
  LINK  error_test
  LINK  ulaw_test
  LINK  alaw_test
  LINK  dwvw_test
  LINK  peak_chunk_test
  LINK  command_test
  LINK  stdin_test
  LINK  stdout_test
  LINK  stdio_test
  LINK  pcm_test
  LINK  headerless_test
  LINK  pipe_test
  LINK  benchmark
  LINK  header_test
  LINK  misc_test
  LINK  raw_test
  LINK  string_test
  LINK  multi_file_test
  LINK  dither_test
  LINK  scale_clip_test
  LINK  win32_test
  LINK  fix_this
  LINK  aiff_rw_test
  LINK  virtual_io_test
  LINK  locale_test
  LINK  largefile_test
  LINK  win32_ordinal_test
  LINK  ogg_test
  LINK  vorbis_test
  LINK  checksum_test
  LINK  external_libs_test
  LINK  rdwr_test
  LINK  cpp_test
Making install in programs
  CC    
  CC    
sndfile-play.c:57:21: error: Carbon.h: No such file or directory
make[1]: *** [sndfile-play.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install-recursive] Error 1
Exit status: 2

http://github.com/mxcl/homebrew/blob/master/Library/Formula/libsndfile.rb#L12

==> Environment
HOMEBREW_VERSION: 0.7.1
HEAD: (none)
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.6.5
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.0
GCC-4.0: N/A 
GCC-4.2: build 5664 
LLVM: build 2333 
MacPorts or Fink? false
X11 installed? false

==> Build Flags
CC: /usr/bin/cc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
MAKEFLAGS: -j2
Error: Failure while executing: make install 
Please report this bug at http://github.com/mxcl/homebrew/issues

Also try:
  `brew doctor` to check your setup for common problems.
  `brew missing` to check installed packages for missing deps.
user@oniichan:~$
shelbyKiraM commented 13 years ago

(I should point out that I only have Xcode 4 and no X11)

adamv commented 13 years ago

Homebrew doesn't yet explicitly suport Xcode 4. Xcode 4 defaults to LLVM instead of GCC, which doesn't work with everything. Try using gcc instead of llvm-gcc, or install Xcode 3.2.x, or wait until Homebrew supports Xcode 4.

shelbyKiraM commented 13 years ago

Ooh. I totally got it to work by doing ln -s /Xcode4 /Developer. Thanks though... I'll make it work anyway ;)

MikeMcQuaid commented 13 years ago

Also, please install X11 or other stuff will break.