Skip to content

Instantly share code, notes, and snippets.

@zuku
Last active August 29, 2015 14:05
Show Gist options
  • Save zuku/34f1748c2658a45b2443 to your computer and use it in GitHub Desktop.
Save zuku/34f1748c2658a45b2443 to your computer and use it in GitHub Desktop.
fdkaac-0.6.0 build failure on OS X 10.8 with MacPorts
$ cd fdkaac-0.6.0
$ export LDFLAGS='-L/opt/local/lib'
$ export CPPFLAGS='-I/opt/local/include'
$ export LD_LIBRARY_PATH=/opt/local/lib
$ export LD_INCLUDE_PATH=/opt/local/include
$ autoreconf -i
configure.ac:12: installing './compile'
configure.ac:41: installing './config.guess'
configure.ac:41: installing './config.sub'
configure.ac:10: installing './install-sh'
configure.ac:10: installing './missing'
Makefile.am: installing './depcomp'
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking localcharset.h usability... yes
checking localcharset.h presence... yes
checking for localcharset.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking endian.h usability... no
checking endian.h presence... no
checking for endian.h... no
checking byteswap.h usability... no
checking byteswap.h presence... no
checking for byteswap.h... no
checking fdk-aac/aacenc_lib.h usability... yes
checking fdk-aac/aacenc_lib.h presence... yes
checking for fdk-aac/aacenc_lib.h... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int8_t... yes
checking for size_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for ptrdiff_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for struct __timeb64... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for sigaction... yes
checking for gettimeofday... yes
checking for nl_langinfo... yes
checking for _vscprintf... no
checking for fseeko64... no
checking for getopt_long... yes
checking for library containing aacEncOpen... -lfdk-aac
checking build system type... x86_64-apple-darwin12.5.0
checking host system type... x86_64-apple-darwin12.5.0
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for shared library run path origin... done
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
$ make
make all-am
depbase=`echo src/aacenc.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/aacenc.o -MD -MP -MF $depbase.Tpo -c -o src/aacenc.o src/aacenc.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/caf_reader.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/caf_reader.o -MD -MP -MF $depbase.Tpo -c -o src/caf_reader.o src/caf_reader.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/extrapolater.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/extrapolater.o -MD -MP -MF $depbase.Tpo -c -o src/extrapolater.o src/extrapolater.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/limiter.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/limiter.o -MD -MP -MF $depbase.Tpo -c -o src/limiter.o src/limiter.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/lpc.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/lpc.o -MD -MP -MF $depbase.Tpo -c -o src/lpc.o src/lpc.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/m4af.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/m4af.o -MD -MP -MF $depbase.Tpo -c -o src/m4af.o src/m4af.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/main.o -MD -MP -MF $depbase.Tpo -c -o src/main.o src/main.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/metadata.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/metadata.o -MD -MP -MF $depbase.Tpo -c -o src/metadata.o src/metadata.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/parson.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/parson.o -MD -MP -MF $depbase.Tpo -c -o src/parson.o src/parson.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/pcm_float_converter.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/pcm_float_converter.o -MD -MP -MF $depbase.Tpo -c -o src/pcm_float_converter.o src/pcm_float_converter.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/pcm_native_converter.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/pcm_native_converter.o -MD -MP -MF $depbase.Tpo -c -o src/pcm_native_converter.o src/pcm_native_converter.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/pcm_readhelper.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/pcm_readhelper.o -MD -MP -MF $depbase.Tpo -c -o src/pcm_readhelper.o src/pcm_readhelper.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/pcm_sint16_converter.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/pcm_sint16_converter.o -MD -MP -MF $depbase.Tpo -c -o src/pcm_sint16_converter.o src/pcm_sint16_converter.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/progress.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/progress.o -MD -MP -MF $depbase.Tpo -c -o src/progress.o src/progress.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/wav_reader.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/wav_reader.o -MD -MP -MF $depbase.Tpo -c -o src/wav_reader.o src/wav_reader.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/compat_posix.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/compat_posix.o -MD -MP -MF $depbase.Tpo -c -o src/compat_posix.o src/compat_posix.c &&\
mv -f $depbase.Tpo $depbase.Po
gcc -g -O2 -L/opt/local/lib -o fdkaac src/aacenc.o src/caf_reader.o src/extrapolater.o src/limiter.o src/lpc.o src/m4af.o src/main.o src/metadata.o src/parson.o src/pcm_float_converter.o src/pcm_native_converter.o src/pcm_readhelper.o src/pcm_sint16_converter.o src/progress.o src/wav_reader.o src/compat_posix.o -liconv -lfdk-aac -lm -lfdk-aac
Undefined symbols for architecture x86_64:
"_locale_charset", referenced from:
_aacenc_to_utf8 in compat_posix.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[1]: *** [fdkaac] Error 1
make: *** [all] Error 2
$ export LDFLAGS='-L/opt/local/lib -lcharset'
$ make clean
test -z "fdkaac" || rm -f fdkaac
rm -f *.o
rm -f missings/*.o
rm -f src/*.o
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking localcharset.h usability... yes
checking localcharset.h presence... yes
checking for localcharset.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking endian.h usability... no
checking endian.h presence... no
checking for endian.h... no
checking byteswap.h usability... no
checking byteswap.h presence... no
checking for byteswap.h... no
checking fdk-aac/aacenc_lib.h usability... yes
checking fdk-aac/aacenc_lib.h presence... yes
checking for fdk-aac/aacenc_lib.h... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int8_t... yes
checking for size_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for ptrdiff_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for struct __timeb64... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for sigaction... yes
checking for gettimeofday... yes
checking for nl_langinfo... yes
checking for _vscprintf... no
checking for fseeko64... no
checking for getopt_long... yes
checking for library containing aacEncOpen... -lfdk-aac
checking build system type... x86_64-apple-darwin12.5.0
checking host system type... x86_64-apple-darwin12.5.0
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for shared library run path origin... done
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
$ make
make all-am
depbase=`echo src/aacenc.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/aacenc.o -MD -MP -MF $depbase.Tpo -c -o src/aacenc.o src/aacenc.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/caf_reader.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/caf_reader.o -MD -MP -MF $depbase.Tpo -c -o src/caf_reader.o src/caf_reader.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/extrapolater.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/extrapolater.o -MD -MP -MF $depbase.Tpo -c -o src/extrapolater.o src/extrapolater.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/limiter.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/limiter.o -MD -MP -MF $depbase.Tpo -c -o src/limiter.o src/limiter.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/lpc.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/lpc.o -MD -MP -MF $depbase.Tpo -c -o src/lpc.o src/lpc.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/m4af.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/m4af.o -MD -MP -MF $depbase.Tpo -c -o src/m4af.o src/m4af.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/main.o -MD -MP -MF $depbase.Tpo -c -o src/main.o src/main.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/metadata.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/metadata.o -MD -MP -MF $depbase.Tpo -c -o src/metadata.o src/metadata.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/parson.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/parson.o -MD -MP -MF $depbase.Tpo -c -o src/parson.o src/parson.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/pcm_float_converter.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/pcm_float_converter.o -MD -MP -MF $depbase.Tpo -c -o src/pcm_float_converter.o src/pcm_float_converter.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/pcm_native_converter.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/pcm_native_converter.o -MD -MP -MF $depbase.Tpo -c -o src/pcm_native_converter.o src/pcm_native_converter.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/pcm_readhelper.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/pcm_readhelper.o -MD -MP -MF $depbase.Tpo -c -o src/pcm_readhelper.o src/pcm_readhelper.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/pcm_sint16_converter.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/pcm_sint16_converter.o -MD -MP -MF $depbase.Tpo -c -o src/pcm_sint16_converter.o src/pcm_sint16_converter.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/progress.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/progress.o -MD -MP -MF $depbase.Tpo -c -o src/progress.o src/progress.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/wav_reader.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/wav_reader.o -MD -MP -MF $depbase.Tpo -c -o src/wav_reader.o src/wav_reader.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo src/compat_posix.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I/opt/local/include -g -O2 -MT src/compat_posix.o -MD -MP -MF $depbase.Tpo -c -o src/compat_posix.o src/compat_posix.c &&\
mv -f $depbase.Tpo $depbase.Po
gcc -g -O2 -L/opt/local/lib -lcharset -o fdkaac src/aacenc.o src/caf_reader.o src/extrapolater.o src/limiter.o src/lpc.o src/m4af.o src/main.o src/metadata.o src/parson.o src/pcm_float_converter.o src/pcm_native_converter.o src/pcm_readhelper.o src/pcm_sint16_converter.o src/progress.o src/wav_reader.o src/compat_posix.o -liconv -lfdk-aac -lm -lfdk-aac
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.8.5
BuildVersion: 12F45
$ port version
Version: 2.3.1
$ port info automake
automake @1.14.1_2 (devel)
Description: Automake is a tool for automatically generating Makefile.in files from files called
Makefile.am. Each Makefile.am is basically a series of make variable definitions, with
rules being thrown in occasionally. The generated Makefile.in files are compliant with
the GNU Makefile standards.
Homepage: http://www.gnu.org/software/automake/
Build Dependencies: autoconf
Library Dependencies: perl5
Platforms: darwin, freebsd
License: GPL-2+ Permissive
Maintainers: mww@macports.org, openmaintainer@macports.org
$ port info autoconf
autoconf @2.69_2 (devel)
Description: Autoconf is an extensible package of m4 macros that produce shell scripts to
automatically configure software source code packages. These scripts can adapt the
packages to many kinds of UNIX-like systems without manual user intervention. Autoconf
creates a configuration script for a package from a template file that lists the
operating system features that the package can use, in the form of m4 macro calls.
Homepage: http://www.gnu.org/software/autoconf/
Extract Dependencies: xz
Library Dependencies: perl5, m4
Platforms: darwin
License: Autoconf GPL-3+
Maintainers: larryv@macports.org
$ port info gettext
gettext @0.19.2 (devel)
Variants: universal
Description: gettext is the GNU internationalization (i18n) and localization (l10n) library, used for
writing multilingual programs.
Homepage: http://www.gnu.org/software/gettext/
Library Dependencies: expat, libiconv, ncurses
Platforms: darwin, freebsd, linux
License: LGPL-2.1+ GPL-3+
Maintainers: ryandesign@macports.org
$ port info libiconv
libiconv @1.14 (textproc)
Variants: cp932fix, enable_cp932fix, universal
Description: A character-set conversion library which implements the iconv() API for dealing with
unicode and other types of conversion.
Homepage: http://www.gnu.org/software/libiconv/
Build Dependencies: gperf
Platforms: darwin, freebsd, linux
License: LGPL-2+ GPL-3+
Maintainers: ryandesign@macports.org
$ port info libfdk-aac
libfdk-aac @0.1.3_1 (audio)
Variants: universal
Description: Fraunhofer FDK AAC Codec Library, released as part of Android, from the opencore-amr
project. High-quality encoding and decoding of AAC audio supporting 5.1 channels,
AAC-LC, Main profile, SBR, and Parametric Stereo (HE-AAC v1 and v2).
Homepage: http://sourceforge.net/projects/opencore-amr/
Platforms: darwin
License: Restrictive
Maintainers: mopihopi@osj.us, openmaintainer@macports.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment