4

I'm trying to compile the tmux that has iTerm2 support.

This is the error I get:

configure.ac:105: error: possibly undefined macro: AC_SEARCH_LIBS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1
autoreconf failed

The website says:

If you get an error like "undefined macro: AC_SEARCH_LIBS", run this: echo $(brew --prefix)/share/aclocal | sudo tee -a /usr/share/aclocal/dirlist

Even though I've ran that command (as root), I still have the same results. This is the result of that command:

/usr/local/share/aclocal

I think the permissions of /usr/share/aclocal/dirlist shouldn't be a problem:

$ ls -lah /usr/share/aclocal
total 8
drwxr-xr-x   5 root  wheel   170B May  6 20:20 .
drwxr-xr-x  69 root  wheel   2.3K Mar 12 03:18 ..
-rw-r--r--   1 root  wheel    69B May  6 20:54 dirlist
-rw-r--r--   1 root  wheel   7.7K Mar  3 20:57 libxml.m4
-rw-r--r--   1 root  wheel   7.9K Mar  3 20:57 libxslt.m4

aclocal, automake and autoconf are all in /usr/local/bin/, and I've tried installing them through homebrew and I also tried compiling and installing them myself. I always have the same results.

Halp?

2
  • What's the content of the /usr/share/aclocal/dirlist file?
    – Daniel Beck
    Jun 10, 2012 at 20:16
  • /usr/local/share/aclocal, /usr/share/aclocal, /usr/local/share/aclocal. replace ", " with newlines.
    – orryowr
    Jun 12, 2012 at 2:56

2 Answers 2

4

I got this after upgrading OS X. It was fixed with: brew reinstall pkg-config

1
  • This is the correct solution. Autoconf’s error message is misleading; the problem is not the use of AC_SEARCH_LIBS, but that of PKG_CHECK_MODULES immediately afterwards. This macro is provided by pkgconfig. Jun 11, 2015 at 3:40
1

For those running into this issue on a mac using macports rather than homebrew the suggestion to run:

 echo $(brew --prefix)/share/aclocal | sudo tee -a /usr/share/aclocal/dirlist

Has the following equivalent:

Ensure that /usr/share/aclocal/dirlist contains the line /opt/local/share/aclocal (this is where macports puts macros):

echo "/opt/local/share/aclocal" | sudo tee -a /usr/share/aclocal/dirlist
1
  • I don’t know if this was ever necessary with MacPorts’ automake, but it definitely isn’t necessary now. /opt/local/share/aclocal is in aclocal’s default system includes list. Jun 11, 2015 at 3:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .