Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on OS X Mavericks with Homebrew #15

Closed
zuku opened this issue Aug 16, 2014 · 6 comments
Closed

Build failure on OS X Mavericks with Homebrew #15

zuku opened this issue Aug 16, 2014 · 6 comments

Comments

@zuku
Copy link

zuku commented Aug 16, 2014

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
Copy link
Owner

nu774 commented Aug 16, 2014

Maybe Homebrew/legacy-homebrew#10853 or Homebrew/legacy-homebrew#10824 ?
Do you have iconv.m4 file in /usr/share/acocal/iconv.m4 or somewhere?

@nu774
Copy link
Owner

nu774 commented Aug 16, 2014

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
Copy link
Author

zuku commented Aug 16, 2014

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
Copy link
Author

zuku commented Aug 16, 2014

Probably, this issue relates to Homebrew/legacy-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
Copy link
Owner

nu774 commented Aug 16, 2014

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
Copy link
Author

zuku commented Aug 17, 2014

OK. I got it.

@zuku zuku closed this as completed Aug 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants