Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal Error Installing libsndfile on OS X Mavericks

Tags:

c

libsndfile

I'm currently trying to install libsndfile on my mac running os x 10.9.1. However, when after running the command 'make' it runs for a while and then displays the following message: sndfile-play.c:61:11: fatal error: 'Carbon.h' file not found. I haven't had much luck finding people with a similar issue. From what I found it looks like it may have to do with newer os versions not being supported. Anyone know how to resolve this issue? Thanks in advance!

like image 510
user2951764 Avatar asked Jan 08 '14 08:01

user2951764


1 Answers

The following worked for me (I am running OS X 10.9.1):

  1. Download the source code
  2. Untar the bundle
  3. $ ./configure
  4. $ make
  5. A problem should occur with Carbon.h (sndfile-play.c:61:21: error: Carbon.h: No such file or directory)
  6. Search Carbon.h in your machine using: $ find /Applications/Xcode.app/Contents/Developer/ | grep Carbon.h
  7. Edit **programs/**Makefile
  8. Look for CFLAGS, ensure CFLAGS is configured: CFLAGS =
    -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Carbon.framework/Versions/A/Headers/ -g -O2 -std=gnu99 -Wall -Wextra -Wdeclaration-after-statement -Wpointer-arith -funsigned-char -Wstrict-prototypes -Wmissing-prototypes -Wcast-align -Wcast-qual -Wnested-externs -Wbad-function-cast -Wwrite-strings -Wundef -pipe -I/Developer/Headers/FlatCarbon
  9. $ make
  10. $ make check (All test should pass), then:
  11. $ sudo make install

Source: http://comunidad.udistrital.edu.co/ocala/2013/06/09/building-libsndfile-on-mac-os-x/

like image 78
martinweiss Avatar answered Nov 01 '22 14:11

martinweiss