One solution:
I encountered libsndfile linker errors that are similar but not identical.
, -, configure script, libsndfile tar.gz.
. , libvorbis libogg. ABI, libsndfile libvorbis libogg, .
configure script libsndfile:
EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBISENC_CFLAGS"
EXTERNAL_LIBS="$FLAC_LIBS $VORBISENC_LIBS"
( . script ).
?
EXTERNAL_CFLAGS , EXTERNAL_LIBS 2.
:
EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS"
EXTERNAL_LIBS="$FLAC_LIBS $OGG_LIBS $VORBIS_LIBS $VORBISENC_LIBS"
, , .
My Backstory:
(by @ubob) 2 " libsndfile . /configure make"
, ( ) ./configure, , @ubob .
: Mac OS X 10.8.1
libsndfile: libsndfile-1.0.24
( libsndfile-1.0.25 EXTERNAL_LIBS)
, :
flac/1.3.1/lib/libFLAC.8.dylib
libogg/1.3.2/lib/libogg.0.dylib
libvorbis/1.3.5/lib/libvorbis.0.dylib
libvorbis/1.3.5/lib/libvorbisenc.2.dylib
libvorbis/1.3.5/lib/libvorbisfile.3.dylib
:
export CC="clang -v"
export FLAC_CFLAGS="-I/whichever/path/leads/to/flac/1.3.1/include"
export FLAC_LIBS="-L/whichever/path/leads/toflac/1.3.1/lib -lFLAC.8"
export OGG_CFLAGS="-I/whichever/path/leads/tolibogg/1.3.2/include"
export OGG_LIBS="-L/whichever/path/leads/tolibogg/1.3.2/lib -logg.0"
export VORBIS_CFLAGS="-I/whichever/path/leads/tolibvorbis/1.3.5/include"
export VORBIS_LIBS="-L/whichever/path/leads/tolibvorbis/1.3.5/lib -lvorbis.0"
export VORBISENC_CFLAGS="-I/whichever/path/leads/tolibvorbis/1.3.5/include"
export VORBISENC_LIBS="-L/whichever/path/leads/tolibvorbis/1.3.5/lib -lvorbisenc.2 -lvorbisfile.3"
./configure --enable-external-libs --disable-static --enable-shared --disable-sqlite --disable-dependency-tracking
make
EXTERNAL_CFLAGS EXTERNAL_LIBS, , libsndfile.1.dylib, .
:
CCLD libsndfile.la
Undefined symbols for architecture x86_64:
"_ogg_page_eos", referenced from:
_ogg_open in ogg.o
_ogg_close in ogg.o
_ogg_read_sample in ogg.o
_ogg_write_samples in ogg.o
"_ogg_page_granulepos", referenced from:
_ogg_open in ogg.o
"_ogg_page_serialno", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
[OMITTED FOR BREVITY]
"_ogg_stream_reset", referenced from:
_ogg_read_header in ogg.o
"_ogg_sync_buffer", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
_ogg_read_sample in ogg.o
"_ogg_sync_clear", referenced from:
_ogg_open in ogg.o
_ogg_close in ogg.o
"_ogg_sync_init", referenced from:
_ogg_open in ogg.o
"_ogg_sync_pageout", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
_ogg_read_sample in ogg.o
"_ogg_sync_reset", referenced from:
_ogg_read_header in ogg.o
[OMITTED FOR BREVITY]
"_vorbis_comment_clear", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
_ogg_close in ogg.o
"_vorbis_comment_init", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
_ogg_write_header in ogg.o
"_vorbis_comment_query", referenced from:
_ogg_read_header in ogg.o
"_vorbis_dsp_clear", referenced from:
_ogg_read_header in ogg.o
_ogg_close in ogg.o
"_vorbis_info_clear", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
_ogg_close in ogg.o
[OMITTED FOR BREVITY]
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)