Mastercard / pkcs11-tools

A set of tools to manage objects on PKCS#11 cryptographic tokens. Compatible with many PKCS#11 library, including major HSM brands, NSS and softoken.
Other
162 stars 33 forks source link

"configure.ac:47: error: possibly undefined macro: AC_MSG_WARN" on CentOS 7.8 #22

Closed scheblein closed 4 years ago

scheblein commented 4 years ago

Describe the bug ... autoreconf: running: /usr/bin/autoconf --force configure.ac:47: error: possibly undefined macro: AC_MSG_WARN If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/bin/autoconf failed with exit status: 1

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/Mastercard/pkcs11-tools.git
  2. cd pkcs11-tools
  3. ./bootstrap.sh
  4. See error

Expected behavior ./bootstrap.sh should exit cleanly

Operating System (please complete the following information):

scheblein commented 4 years ago

https://stackoverflow.com/questions/8811381/possibly-undefined-macro-ac-msg-error#37980772 <- This gets me past the ./bootstrap.sh error, but then dies again now in ./configure, probably due to the fact that i removed the brackets.

... checking whether yytext is a pointer... no ./configure: line 4780: syntax error near unexpected token ,{' ./configure: line 4780:AX_PROG_FLEX(,{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU flex is required to regenerate lexer. Generated source code is provided, so it should be OK, until you change the lexer source file. Hint: use LEX variable to point to flex on your system." >&5'

scheblein commented 4 years ago

interesting - i added m4_pattern_allow([AC_MSG_WARN]) to the configure.ac file, and i'm still receiving the error in ./configure

checking whether yytext is a pointer... no ./configure: line 4781: syntax error near unexpected token ,AC_MSG_WARN' ./configure: line 4781:AX_PROG_FLEX(,AC_MSG_WARN([GNU flex is required to regenerate lexer. Generated source code is provided, so it should be OK, until you change the lexer source file. Hint: use LEX variable to point to flex on your system.]))'

scheblein commented 4 years ago

found the solution! the autoconf-archive package needs to be installed (h/t https://github.com/tpm2-software/tpm2-tss/issues/227#issuecomment-227719745)

keldonin commented 4 years ago

@Sheblein, yes autoconf-archive must be installed. Something to add to the documentation.

keldonin commented 4 years ago

Documentation updated, to also add autoconf-archive to the prerequisites.