aad-for-linux / pam_aad

Azure Active Directory PAM Module
GNU General Public License v3.0
24 stars 9 forks source link

build failure #20

Closed outzhu closed 2 years ago

outzhu commented 2 years ago

from using ./bootstrap.sh

umask 022
autoreconf -fiv
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
aclocal: warning: couldn't open directory 'm4': No such file or directory
autoreconf: configure.ac: tracing
autoreconf: configure.ac: creating directory build-aux
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:14: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:15: error: possibly undefined macro: AC_DISABLE_STATIC
configure.ac:18: error: possibly undefined macro: AC_ENABLE_STATIC
configure.ac:19: error: possibly undefined macro: AC_ENABLE_SHARED
autoreconf: /usr/bin/autoconf failed with exit status: 1
oxr463 commented 2 years ago

Can you provide the output from cat /etc/os-release and autoconf --version?

outzhu commented 2 years ago

cat /etc/os-release

NAME="Ubuntu" VERSION="20.04.2 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.2 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal

autoconf --version

autoconf (GNU Autoconf) 2.69 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+/Autoconf: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html, http://gnu.org/licenses/exceptions.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

oxr463 commented 2 years ago

Can you check and see if pkg-config is installed?

Reference(s):

outzhu commented 2 years ago

it's not, should I also get pkgconf?

oxr463 commented 2 years ago

it's not, should I also get pkgconf?

I don't think it will hurt. Try running this command, https://github.com/aad-for-linux/pam_aad/blob/master/docker/ubuntu/Dockerfile#L9 (all the way down to uuid-dev).

outzhu commented 2 years ago

nope, still same error.

oxr463 commented 2 years ago

nope, still same error.

How about we try this, https://unix.stackexchange.com/a/18680/247886

outzhu commented 2 years ago
sudo apt-get -y install autoconf automake libtool cmake autoconf-archive build-essential

this solves autoconf issues.

./bootstrap.sh
./configure --with-pam-dir=/lib/x86_64-linux-gnu/security/

success but the make output returns

  CC       pam_aad_la-pam_aad.lo
pam_aad.c:2:10: fatal error: jansson.h: No such file or directory
    2 | #include <jansson.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:479: pam_aad_la-pam_aad.lo] Error 1
oxr463 commented 2 years ago

success but the make output returns

  CC       pam_aad_la-pam_aad.lo
pam_aad.c:2:10: fatal error: jansson.h: No such file or directory
    2 | #include <jansson.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:479: pam_aad_la-pam_aad.lo] Error 1

We need to ensure Jansson is installed, https://github.com/aad-for-linux/pam_aad/blob/master/docker/ubuntu/Dockerfile#L18

oxr463 commented 2 years ago

See also: https://github.com/aad-for-linux/docker/issues/4

oxr463 commented 2 years ago

@outzhu were you able to build using the docker images?

oxr463 commented 2 years ago

I can confirm the docker image builds are working per our GitHub Actions: https://github.com/aad-for-linux/pam_aad/actions/runs/3049338989