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

sh autogen.sh fails with error - possibly undefined macro: AC_SEARCH_LIBS #257

Closed
Jonher937 opened this Issue Jan 2, 2016 · 8 comments

Comments

7 participants
@Jonher937

Jonher937 commented Jan 2, 2016

Today I cloned the git repo and followed the steps on the wiki, however, on the third step (autogen.sh) it failed with the error message below.

➜ P4n73r @ tmux:git:(master) sh autogen.sh
Useless use of /d modifier in transliteration operator at /usr/local/share/automake-1.9/Automake/Wrap.pm line 60.
configure.ac: installing `etc/install-sh'
configure.ac: installing `etc/missing'
configure.ac:8: installing `etc/config.guess'
configure.ac:8: installing `etc/config.sub'
Makefile.am: installing `etc/compile'
Makefile.am: installing `etc/depcomp'
configure.ac:109: 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/bin/autoconf failed with exit status: 1
autoreconf failed

I have also tried to run "autoreconf -i --force" as mentioned in #72

➜ P4n73r @ tmux:git:(master) autoreconf -i --force
configure.ac:109: 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/bin/autoconf failed with exit status: 1

If i run "aclocal", "sh autogen.sh" seems to be error-free, but then the next step breaks instead...

➜ P4n73r @ tmux:git:(master) sh autogen.sh
Useless use of /d modifier in transliteration operator at /usr/local/share/automake-1.9/Automake/Wrap.pm line 60.
Useless use of /d modifier in transliteration operator at /usr/local/share/automake-1.9/Automake/Wrap.pm line 60.
➜ P4n73r @ tmux:git:(master)
➜ P4n73r @ tmux:git:(master) ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
-- Cut away some log, see link below block for full output --
checking for library containing clock_gettime... no
./configure: line 4582: syntax error near unexpected token `newline'
./configure: line 4582: `PKG_CHECK_MODULES('

Full output of "./configure" can be found here: https://gist.github.com/Jonher937/5834deb07e75c26b7b8a

I have verified that pkgbuild is installed on my Mac running OS X 10.11.2
Please let me know if you require any additional info.

Thank you in advance!

@ThomasAdam

This comment has been minimized.

Show comment
Hide comment
@ThomasAdam

ThomasAdam Jan 2, 2016

Contributor

Install pkg-config

Contributor

ThomasAdam commented Jan 2, 2016

Install pkg-config

@ThomasAdam ThomasAdam closed this Jan 2, 2016

@Jonher937

This comment has been minimized.

Show comment
Hide comment
@Jonher937

Jonher937 Jan 3, 2016

I have it installed, tried reinstalling xcode and it's command line tools as well, no difference.

➜ P4n73r @ tmux:git:(master) sh autogen.sh
Useless use of /d modifier in transliteration operator at /usr/local/share/automake-1.9/Automake/Wrap.pm line 60.
configure.ac: installing `etc/install-sh'
configure.ac: installing `etc/missing'
configure.ac:8: installing `etc/config.guess'
configure.ac:8: installing `etc/config.sub'
Makefile.am: installing `etc/compile'
Makefile.am: installing `etc/depcomp'
configure.ac:109: 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/bin/autoconf failed with exit status: 1
autoreconf failed
➜ P4n73r @ tmux:git:(master) pkg-config --version
0.28

Is there anything else I can check?

Jonher937 commented Jan 3, 2016

I have it installed, tried reinstalling xcode and it's command line tools as well, no difference.

➜ P4n73r @ tmux:git:(master) sh autogen.sh
Useless use of /d modifier in transliteration operator at /usr/local/share/automake-1.9/Automake/Wrap.pm line 60.
configure.ac: installing `etc/install-sh'
configure.ac: installing `etc/missing'
configure.ac:8: installing `etc/config.guess'
configure.ac:8: installing `etc/config.sub'
Makefile.am: installing `etc/compile'
Makefile.am: installing `etc/depcomp'
configure.ac:109: 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/bin/autoconf failed with exit status: 1
autoreconf failed
➜ P4n73r @ tmux:git:(master) pkg-config --version
0.28

Is there anything else I can check?

@ThomasAdam

This comment has been minimized.

Show comment
Hide comment
@ThomasAdam

ThomasAdam Jan 3, 2016

Contributor

No idea. I don't know (nor want to know!) anything about OSX. See this though:

http://superuser.com/questions/421396/cant-compile-tmux-with-iterm-support

But we're way outside the scope of your original question.

Contributor

ThomasAdam commented Jan 3, 2016

No idea. I don't know (nor want to know!) anything about OSX. See this though:

http://superuser.com/questions/421396/cant-compile-tmux-with-iterm-support

But we're way outside the scope of your original question.

@kenshinji

This comment has been minimized.

Show comment
Hide comment
@kenshinji

kenshinji Mar 22, 2016

@ThomasAdam I ran into the same problem with @Jonher937 , after installing pkg-config, it works!

kenshinji commented Mar 22, 2016

@ThomasAdam I ran into the same problem with @Jonher937 , after installing pkg-config, it works!

@jakirkham

This comment has been minimized.

Show comment
Hide comment
@jakirkham

jakirkham Sep 7, 2016

Had the same issue on OS X that the OP reported in the first traceback. Needed the following to build it correctly. Then everything went smoothly.

  • autoconf
  • automake
  • m4
  • libtool
  • libevent
  • perl
  • pkg-config

jakirkham commented Sep 7, 2016

Had the same issue on OS X that the OP reported in the first traceback. Needed the following to build it correctly. Then everything went smoothly.

  • autoconf
  • automake
  • m4
  • libtool
  • libevent
  • perl
  • pkg-config

alex-tu-cc pushed a commit to alex-tu-cc/tmux.snap that referenced this issue Nov 4, 2016

Alex Tu
autogen.sh:configure.ac:109: error: possibly undefined macro: AC_SEAR…
…CH_LIBS

Bug: tmux/tmux#257
Signed-off-by: Alex Tu <alex.tu@canonical.com>
@raphattack

This comment has been minimized.

Show comment
Hide comment
@raphattack

raphattack Feb 22, 2017

@jakirkham's tip saved me from endless debugging.

raphattack commented Feb 22, 2017

@jakirkham's tip saved me from endless debugging.

@PrithivirajDamodaran

This comment has been minimized.

Show comment
Hide comment
@PrithivirajDamodaran

PrithivirajDamodaran commented May 20, 2017

@jakirkham thanks a heap !

@wagnerikeda

This comment has been minimized.

Show comment
Hide comment
@wagnerikeda

wagnerikeda Jan 18, 2018

Thank you very much @jakirkham !
I successfuly built tmux on MacOS 10.13.
I installed from source all the packages you mentioned, except Perl.
I bumped into https://github.com/tmux/tmux/issues/72 which was solved with autoreconf -i --force && ./configure as mentioned by @ThomasAdam there.

wagnerikeda commented Jan 18, 2018

Thank you very much @jakirkham !
I successfuly built tmux on MacOS 10.13.
I installed from source all the packages you mentioned, except Perl.
I bumped into https://github.com/tmux/tmux/issues/72 which was solved with autoreconf -i --force && ./configure as mentioned by @ThomasAdam there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment