nu774 / fdkaac

command line encoder frontend for libfdk-aac
Other
260 stars 58 forks source link

Build failure on OS X Mavericks with Homebrew #15

Closed zuku closed 10 years ago

zuku commented 10 years ago

Hi,

I got the following error message when I tried to build fdkaac v0.6.0 on OS X Mavericks with Homebrew.

$ autoreconf -i configure.ac:49: warning: macro 'AM_ICONV' not found in library

You can see the entire log message on Gist.

This issue is similar to #11 Build binaries with OS X Maverick and Ubuntu 14.x. However, I got the same error message even if gettext and libiconv were installed using Homebrew.

Do you have any good idea to avoid this error?

nu774 commented 10 years ago

Maybe https://github.com/Homebrew/homebrew/issues/10853 or https://github.com/Homebrew/homebrew/issues/10824 ? Do you have iconv.m4 file in /usr/share/acocal/iconv.m4 or somewhere?

nu774 commented 10 years ago

If you're still having trouble, probably you could try the following:

  1. download official gettext tarball: https://www.gnu.org/software/gettext/
  2. extract iconv.m4 (it's under gettext-runtime/m4) and copy it to m4 directory under fdkaac dir.
zuku commented 10 years ago

Thank you for your advice.

I couldn't find iconv.m4 file in my system. So ran the steps you mentioned. Then got another error.

$ cd fdkaac-0.6.3/
$ cp ../gettext-0.19.2/gettext-runtime/m4/iconv.m4 m4/
$ autoreconf -i
configure.ac:49: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:210: AM_ICONV_LINK is expanded from...
m4/iconv.m4:268: AM_ICONV is expanded from...
configure.ac:49: the top level
configure.ac:49: warning: AC_LIB_RPATH is m4_require'd but not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:210: AM_ICONV_LINK is expanded from...
m4/iconv.m4:268: AM_ICONV is expanded from...
configure.ac:49: the top level
configure.ac:49: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:210: AM_ICONV_LINK is expanded from...
m4/iconv.m4:268: AM_ICONV is expanded from...
configure.ac:49: the top level
configure.ac:49: warning: AC_LIB_RPATH is m4_require'd but not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:210: AM_ICONV_LINK is expanded from...
m4/iconv.m4:268: AM_ICONV is expanded from...
configure.ac:49: the top level
configure.ac:49: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:210: AM_ICONV_LINK is expanded from...
m4/iconv.m4:268: AM_ICONV is expanded from...
configure.ac:49: the top level
configure.ac:49: warning: AC_LIB_RPATH is m4_require'd but not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:210: AM_ICONV_LINK is expanded from...
m4/iconv.m4:268: AM_ICONV is expanded from...
configure.ac:49: the top level
configure.ac:49: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:210: AM_ICONV_LINK is expanded from...
m4/iconv.m4:268: AM_ICONV is expanded from...
configure.ac:49: the top level
configure.ac:49: warning: AC_LIB_RPATH is m4_require'd but not m4_defun'd
m4/iconv.m4:18: AM_ICONV_LINKFLAGS_BODY is expanded from...
m4/iconv.m4:210: AM_ICONV_LINK is expanded from...
m4/iconv.m4:268: AM_ICONV is expanded from...
configure.ac:49: the top level
configure:5264: error: possibly undefined macro: AC_LIB_PREPARE_PREFIX
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:5265: error: possibly undefined macro: AC_LIB_RPATH
configure:5270: error: possibly undefined macro: AC_LIB_LINKFLAGS_BODY
configure:5278: error: possibly undefined macro: AC_LIB_APPENDTOVAR
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1
zuku commented 10 years ago

Probably, this issue relates to Homebrew/homebrew#8461.

After following steps, the build process worked perfectly.

  1. brew Install gettext
  2. brew link --force gettext
$ brew install gettext
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gettext-0.19.2.mavericks.bottle.tar.gz
==> Pouring gettext-0.19.2.mavericks.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

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. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/gettext/lib
    CPPFLAGS: -I/usr/local/opt/gettext/include

==> Summary
🍺  /usr/local/Cellar/gettext/0.19.2: 1920 files, 18M
$ brew link --force gettext
Linking /usr/local/Cellar/gettext/0.19.2... 189 symlinks created
$ 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'

fdkaac doesn't work with BSD gettext. Is it right?

nu774 commented 10 years ago

fdkaac doesn't work with BSD gettext. Is it right?

Yes. The build system of fdkaac is dependent on iconv.m4 which is provided by GNU's gettext distribution.

zuku commented 10 years ago

OK. I got it.