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

Can't be build on CentOS 6 #32

Closed
jwsdv opened this issue Jul 5, 2017 · 3 comments
Closed

Can't be build on CentOS 6 #32

jwsdv opened this issue Jul 5, 2017 · 3 comments

Comments

@jwsdv
Copy link
Contributor

jwsdv commented Jul 5, 2017

Hello Nigel,
i had the pam-mysql module successfully build before your commit on Nov 2016. Before the configure script was already there and the make process happened to work without any problems.

Now with 0.8.1 that doesn't work anymore:

# autoreconf -f -i --verbose
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
configure.ac:45: error: possibly undefined macro: AC_DEFINE
      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

If i add m4_pattern_allow([AC_DEFINE]) to configure.ac, it works to reconf:

# autoreconf -f -i --verbose
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:6: unknown warning category `no-extra-portability'
autoreconf: Leaving directory `.'

But there are some macros not getting replaces correctly:

# ./configure --prefix=/usr --with-pam-mods-dir=/lib64/security --with-openssl
[...]
checking security/pam_appl.h usability... yes
checking security/pam_appl.h presence... yes
checking for security/pam_appl.h... yes
checking for size_t... yes
checking whether ELOOP is declared... yes
checking whether EOVERFLOW is declared... yes
checking for library containing socket... none required
checking for getaddrinfo... yes
./configure: line 13662: PAM_MYSQL_CHECK_IPV6: command not found
./configure: line 13663: PAM_MYSQL_CHECK_GETHOSTBYNAME_R: command not found
./configure: line 13669: syntax error near unexpected token `"$withval"'
./configure: line 13669: `  PAM_MYSQL_CHECK_LIBMYSQLCLIENT("$withval")'

In the generated configure i see the problem:



PAM_MYSQL_CHECK_IPV6
PAM_MYSQL_CHECK_GETHOSTBYNAME_R


# Check whether --with-mysql was given.
if test "${with_mysql+set}" = set; then
  withval=$with_mysql;
  PAM_MYSQL_CHECK_LIBMYSQLCLIENT("$withval")

else

  PAM_MYSQL_CHECK_LIBMYSQLCLIENT(/usr /usr/local /usr/mysql /opt/mysql)

fi



# Check whether --with-openssl was given.
if test "${with_openssl+set}" = set; then
  withval=$with_openssl;
else
  with_openssl=check
fi

Do you have any clue on how to build on CentOS ?

Thank you!

@NigelCunningham
Copy link
Owner

I haven't tried CentOS. That said, I've just started to download an ISO and will see if I can reproduce and fix the issue. Thanks for the report.

@jwsdv
Copy link
Contributor Author

jwsdv commented Jul 5, 2017

We found the problem and fixed in configure.ac and Makefile.am.
I added another pull-request for this.
Sorry, there are all commits in there, i don't know how to separate them...

diff -ur pam-MySQL-0.8.1.orig/configure.ac pam-MySQL-0.8.1/configure.ac
--- pam-MySQL-0.8.1.orig/configure.ac   2017-05-24 13:25:22.000000000 +0200
+++ pam-MySQL-0.8.1/configure.ac        2017-07-05 13:51:36.509880169 +0200
@@ -1,3 +1,4 @@
+m4_pattern_allow([AC_DEFINE])
 AC_PREREQ([2.58])
 AC_INIT(pam-mysql, 0.8)
 AC_CONFIG_MACRO_DIR([m4])
diff -ur pam-MySQL-0.8.1.orig/Makefile.am pam-MySQL-0.8.1/Makefile.am
--- pam-MySQL-0.8.1.orig/Makefile.am    2017-05-24 13:25:22.000000000 +0200
+++ pam-MySQL-0.8.1/Makefile.am 2017-07-05 13:54:07.879971404 +0200
@@ -8,5 +8,6 @@
 pam_mysql_la_LIBADD   = $(openssl_LIBS) -lpam

 EXTRA_DIST = INSTALL.pam-mysql
+ACLOCAL_AMFLAGS = -I m4

 AM_DISTCHECK_CONFIGURE_FLAGS = --with-pam-mods-dir=\$${prefix}/lib/security

@NigelCunningham
Copy link
Owner

Closing as this has been merged. Thanks!

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