kravietz / pam_tacplus

TACACS+ protocol client library and PAM module in C. This PAM module support authentication, authorization (account management) and accounting (session management)performed using TACACS+ protocol designed by Cisco.
GNU Lesser General Public License v3.0
130 stars 97 forks source link

Problem with installation on Debian #179

Closed bojika closed 2 years ago

bojika commented 2 years ago

Hello,

Cannot build it on Debian Bullseye. What I missed up?

root@fff3135bbacf:/pam-tacplus# uname -ra
Linux fff3135bbacf 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5 (2019-06-19) x86_64 GNU/Linux
root@fff3135bbacf:/# apt install -y git autoconf build-essential libtool automake libpam-dev libssl-dev gnulib
Reading package lists... `Done`
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libpam0g-dev' instead of 'libpam-dev'
autoconf is already the newest version (2.69-14).
automake is already the newest version (1:1.16.3-2).
build-essential is already the newest version (12.9).
git is already the newest version (1:2.30.2-1).
gnulib is already the newest version (20210102~ebaa53c-1).
libtool is already the newest version (2.4.6-15).
libssl-dev is already the newest version (1.1.1k-1+deb11u1).
libpam0g-dev is already the newest version (1.4.0-9+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@fff3135bbacf:/# git clone https://git.sr.ht/~kravietz/pam-tacplus
Cloning into 'pam-tacplus'...
remote: Enumerating objects: 3897, done.
remote: Total 3897 (delta 0), reused 0 (delta 0), pack-reused 3897
Receiving objects: 100% (3897/3897), 1.20 MiB | 185.00 KiB/s, done.
Resolving deltas: 100% (2427/2427), done.

root@fff3135bbacf:/# cd pam-tacplus

root@fff3135bbacf:/pam-tacplus# gnulib-tool --makefile-name=Makefile.gnulib --libtool --import \
                  fcntl crypto/md5 array-list list xlist getrandom realloc-posix \
                  explicit_bzero xalloc getopt-gnu \
Module list with included dependencies (indented):
    absolute-header
    alloca-opt
  array-list
    attribute
    basename-lgpl
    byteswap
    c99
    cloexec
    close
    crypto/af_alg
  crypto/md5
    crypto/md5-buffer
    double-slash-root
    dup2
    errno
    error
    exitfail
  explicit_bzero
    extensions
    extern-inline
  fcntl
    fcntl-h
    fd-hook
    fflush
    filename
    fpurge
    freading
    fseek
    fseeko
    fstat
    ftell
    ftello
    getdtablesize
  getopt-gnu
    getopt-posix
    getprogname
  getrandom
    gettext-h
    include_next
    intprops
    largefile
    limits-h
  list
    lseek
    malloca
    minmax
    msvc-inval
    msvc-nothrow
    multiarch
    nocrash
    open
    pathmax
  realloc-posix
    size_max
    snippet/_Noreturn
    snippet/arg-nonnull
    snippet/c++defs
    snippet/unused-parameter
    snippet/warn-on-use
    socklen
    ssize_t
    stat
    stat-time
    std-gnu11
    stdalign
    stdbool
    stddef
    stdint
    stdio
    stdlib
    strerror
    strerror-override
    string
    sys_random
    sys_socket
    sys_stat
    sys_types
    sys_uio
    time
    unistd
    verify
  xalloc
    xalloc-die
    xalloc-oversized
  xlist
    xsize
Notice from module error:
  If you are using GNU gettext version 0.16.1 or older, add the following options
  to XGETTEXT_OPTIONS in your po/Makevars:
    --flag=error:3:c-format --flag=error_at_line:5:c-format
File list:
  lib/_Noreturn.h
  lib/af_alg.c
  lib/af_alg.h
  lib/alloca.in.h
  lib/arg-nonnull.h
  lib/attribute.h
  lib/basename-lgpl.c
  lib/basename-lgpl.h
  lib/byteswap.in.h
  lib/c++defs.h
  lib/cloexec.c
  lib/cloexec.h
  lib/close.c
  lib/dup2.c
  lib/errno.in.h
  lib/error.c
  lib/error.h
  lib/exitfail.c
  lib/exitfail.h
  lib/explicit_bzero.c
  lib/fcntl.c
  lib/fcntl.in.h
  lib/fd-hook.c
  lib/fd-hook.h
  lib/fflush.c
  lib/filename.h
  lib/fpurge.c
  lib/freading.c
  lib/freading.h
  lib/fseek.c
  lib/fseeko.c
  lib/fstat.c
  lib/ftell.c
  lib/ftello.c
  lib/getdtablesize.c
  lib/getopt-cdefs.in.h
  lib/getopt-core.h
  lib/getopt-ext.h
  lib/getopt-pfx-core.h
  lib/getopt-pfx-ext.h
  lib/getopt.c
  lib/getopt.in.h
  lib/getopt1.c
  lib/getopt_int.h
  lib/getprogname.c
  lib/getprogname.h
  lib/getrandom.c
  lib/gettext.h
  lib/gl_array_list.c
  lib/gl_array_list.h
  lib/gl_list.c
  lib/gl_list.h
  lib/gl_openssl.h
  lib/gl_xlist.c
  lib/gl_xlist.h
  lib/intprops.h
  lib/limits.in.h
  lib/lseek.c
  lib/malloca.c
  lib/malloca.h
  lib/md5.c
  lib/md5.h
  lib/minmax.h
  lib/msvc-inval.c
  lib/msvc-inval.h
  lib/msvc-nothrow.c
  lib/msvc-nothrow.h
  lib/open.c
  lib/pathmax.h
  lib/realloc.c
  lib/size_max.h
  lib/stat-time.c
  lib/stat-time.h
  lib/stat-w32.c
  lib/stat-w32.h
  lib/stat.c
  lib/stdalign.in.h
  lib/stdbool.in.h
  lib/stddef.in.h
  lib/stdint.in.h
  lib/stdio-impl.h
  lib/stdio.in.h
  lib/stdlib.in.h
  lib/strerror-override.c
  lib/strerror-override.h
  lib/strerror.c
  lib/string.in.h
  lib/sys-limits.h
  lib/sys_random.in.h
  lib/sys_socket.c
  lib/sys_socket.in.h
  lib/sys_stat.in.h
  lib/sys_types.in.h
  lib/sys_uio.in.h
  lib/time.in.h
  lib/unistd.c
  lib/unistd.in.h
  lib/unused-parameter.h
  lib/verify.h
  lib/warn-on-use.h
  lib/xalloc-die.c
  lib/xalloc-oversized.h
  lib/xalloc.h
  lib/xmalloc.c
  lib/xsize.c
  lib/xsize.h
  m4/00gnulib.m4
  m4/absolute-header.m4
  m4/af_alg.m4
  m4/alloca.m4
  m4/byteswap.m4
  m4/close.m4
  m4/double-slash-root.m4
  m4/dup2.m4
  m4/eealloc.m4
  m4/errno_h.m4
  m4/error.m4
  m4/explicit_bzero.m4
  m4/extensions.m4
  m4/extern-inline.m4
  m4/fcntl-o.m4
  m4/fcntl.m4
  m4/fcntl_h.m4
  m4/fflush.m4
  m4/fpurge.m4
  m4/freading.m4
  m4/fseek.m4
  m4/fseeko.m4
  m4/fstat.m4
  m4/ftell.m4
  m4/ftello.m4
  m4/getdtablesize.m4
  m4/getopt.m4
  m4/getprogname.m4
  m4/getrandom.m4
  m4/gl-openssl.m4
  m4/gnulib-common.m4
  m4/include_next.m4
  m4/largefile.m4
  m4/limits-h.m4
  m4/lseek.m4
  m4/malloc.m4
  m4/malloca.m4
  m4/md5.m4
  m4/minmax.m4
  m4/mode_t.m4
  m4/msvc-inval.m4
  m4/msvc-nothrow.m4
  m4/multiarch.m4
  m4/nocrash.m4
  m4/off_t.m4
  m4/open-cloexec.m4
  m4/open-slash.m4
  m4/open.m4
  m4/pathmax.m4
  m4/pid_t.m4
  m4/realloc.m4
  m4/size_max.m4
  m4/socklen.m4
  m4/sockpfaf.m4
  m4/ssize_t.m4
  m4/stat-time.m4
  m4/stat.m4
  m4/std-gnu11.m4
  m4/stdalign.m4
  m4/stdbool.m4
  m4/stddef_h.m4
  m4/stdint.m4
  m4/stdio_h.m4
  m4/stdlib_h.m4
  m4/strerror.m4
  m4/string_h.m4
  m4/sys_random_h.m4
  m4/sys_socket_h.m4
  m4/sys_stat_h.m4
  m4/sys_types_h.m4
  m4/sys_uio_h.m4
  m4/time_h.m4
  m4/unistd_h.m4
  m4/warn-on-use.m4
  m4/wchar_t.m4
  m4/wint_t.m4
  m4/xalloc.m4
  m4/xsize.m4
  m4/zzgnulib.m4
Copying file lib/_Noreturn.h
Copying file lib/af_alg.c
Copying file lib/af_alg.h
Copying file lib/alloca.in.h
Copying file lib/arg-nonnull.h
Copying file lib/attribute.h
Copying file lib/basename-lgpl.c
Copying file lib/basename-lgpl.h
Copying file lib/byteswap.in.h
Copying file lib/c++defs.h
Copying file lib/cloexec.c
Copying file lib/cloexec.h
Copying file lib/close.c
Copying file lib/dup2.c
Copying file lib/errno.in.h
Copying file lib/error.c
Copying file lib/error.h
Copying file lib/exitfail.c
Copying file lib/exitfail.h
Copying file lib/explicit_bzero.c
Copying file lib/fcntl.c
Copying file lib/fcntl.in.h
Copying file lib/fd-hook.c
Copying file lib/fd-hook.h
Copying file lib/fflush.c
Copying file lib/filename.h
Copying file lib/fpurge.c
Copying file lib/freading.c
Copying file lib/freading.h
Copying file lib/fseek.c
Copying file lib/fseeko.c
Copying file lib/fstat.c
Copying file lib/ftell.c
Copying file lib/ftello.c
Copying file lib/getdtablesize.c
Copying file lib/getopt-cdefs.in.h
Copying file lib/getopt-core.h
Copying file lib/getopt-ext.h
Copying file lib/getopt-pfx-core.h
Copying file lib/getopt-pfx-ext.h
Copying file lib/getopt.c
Copying file lib/getopt.in.h
Copying file lib/getopt1.c
Copying file lib/getopt_int.h
Copying file lib/getprogname.c
Copying file lib/getprogname.h
Copying file lib/getrandom.c
Copying file lib/gettext.h
Copying file lib/gl_array_list.c
Copying file lib/gl_array_list.h
Copying file lib/gl_list.c
Copying file lib/gl_list.h
Copying file lib/gl_openssl.h
Copying file lib/gl_xlist.c
Copying file lib/gl_xlist.h
Copying file lib/intprops.h
Copying file lib/limits.in.h
Copying file lib/lseek.c
Copying file lib/malloca.c
Copying file lib/malloca.h
Copying file lib/md5.c
Copying file lib/md5.h
Copying file lib/minmax.h
Copying file lib/msvc-inval.c
Copying file lib/msvc-inval.h
Copying file lib/msvc-nothrow.c
Copying file lib/msvc-nothrow.h
Copying file lib/open.c
Copying file lib/pathmax.h
Copying file lib/realloc.c
Copying file lib/size_max.h
Copying file lib/stat-time.c
Copying file lib/stat-time.h
Copying file lib/stat-w32.c
Copying file lib/stat-w32.h
Copying file lib/stat.c
Copying file lib/stdalign.in.h
Copying file lib/stdbool.in.h
Copying file lib/stddef.in.h
Copying file lib/stdint.in.h
Copying file lib/stdio-impl.h
Copying file lib/stdio.in.h
Copying file lib/stdlib.in.h
Copying file lib/strerror-override.c
Copying file lib/strerror-override.h
Copying file lib/strerror.c
Copying file lib/string.in.h
Copying file lib/sys-limits.h
Copying file lib/sys_random.in.h
Copying file lib/sys_socket.c
Copying file lib/sys_socket.in.h
Copying file lib/sys_stat.in.h
Copying file lib/sys_types.in.h
Copying file lib/sys_uio.in.h
Copying file lib/time.in.h
Copying file lib/unistd.c
Copying file lib/unistd.in.h
Copying file lib/unused-parameter.h
Copying file lib/verify.h
Copying file lib/warn-on-use.h
Copying file lib/xalloc-die.c
Copying file lib/xalloc-oversized.h
Copying file lib/xalloc.h
Copying file lib/xmalloc.c
Copying file lib/xsize.c
Copying file lib/xsize.h
Copying file m4/00gnulib.m4
Copying file m4/absolute-header.m4
Copying file m4/af_alg.m4
Copying file m4/alloca.m4
Copying file m4/byteswap.m4
Copying file m4/close.m4
Copying file m4/double-slash-root.m4
Copying file m4/dup2.m4
Copying file m4/eealloc.m4
Copying file m4/errno_h.m4
Copying file m4/error.m4
Copying file m4/explicit_bzero.m4
Copying file m4/extensions.m4
Copying file m4/extern-inline.m4
Copying file m4/fcntl-o.m4
Copying file m4/fcntl.m4
Copying file m4/fcntl_h.m4
Copying file m4/fflush.m4
Copying file m4/fpurge.m4
Copying file m4/freading.m4
Copying file m4/fseek.m4
Copying file m4/fseeko.m4
Copying file m4/fstat.m4
Copying file m4/ftell.m4
Copying file m4/ftello.m4
Copying file m4/getdtablesize.m4
Copying file m4/getopt.m4
Copying file m4/getprogname.m4
Copying file m4/getrandom.m4
Copying file m4/gl-openssl.m4
Copying file m4/gnulib-common.m4
Copying file m4/gnulib-tool.m4
Copying file m4/include_next.m4
Copying file m4/largefile.m4
Copying file m4/limits-h.m4
Copying file m4/lseek.m4
Copying file m4/malloc.m4
Copying file m4/malloca.m4
Copying file m4/md5.m4
Copying file m4/minmax.m4
Copying file m4/mode_t.m4
Copying file m4/msvc-inval.m4
Copying file m4/msvc-nothrow.m4
Copying file m4/multiarch.m4
Copying file m4/nocrash.m4
Copying file m4/off_t.m4
Copying file m4/open-cloexec.m4
Copying file m4/open-slash.m4
Copying file m4/open.m4
Copying file m4/pathmax.m4
Copying file m4/pid_t.m4
Copying file m4/realloc.m4
Copying file m4/size_max.m4
Copying file m4/socklen.m4
Copying file m4/sockpfaf.m4
Copying file m4/ssize_t.m4
Copying file m4/stat-time.m4
Copying file m4/stat.m4
Copying file m4/std-gnu11.m4
Copying file m4/stdalign.m4
Copying file m4/stdbool.m4
Copying file m4/stddef_h.m4
Copying file m4/stdint.m4
Copying file m4/stdio_h.m4
Copying file m4/stdlib_h.m4
Copying file m4/strerror.m4
Copying file m4/string_h.m4
Copying file m4/sys_random_h.m4
Copying file m4/sys_socket_h.m4
Copying file m4/sys_stat_h.m4
Copying file m4/sys_types_h.m4
Copying file m4/sys_uio_h.m4
Copying file m4/time_h.m4
Copying file m4/unistd_h.m4
Copying file m4/warn-on-use.m4
Copying file m4/wchar_t.m4
Copying file m4/wint_t.m4
Copying file m4/xalloc.m4
Copying file m4/xsize.m4
Copying file m4/zzgnulib.m4
Creating lib/Makefile.gnulib
Creating m4/gnulib-cache.m4
Creating m4/gnulib-comp.m4
Creating ./lib/.gitignore
Creating ./m4/.gitignore
Finished.

You may need to add #include directives for the following .h files.
  #include <fcntl.h>
  #include <getopt.h>
  #include <stdlib.h>
  #include <string.h>
  #include <sys/random.h>
  #include "gl_array_list.h"
  #include "gl_list.h"
  #include "gl_xlist.h"
  #include "md5.h"
  #include "xalloc.h"

You may need to use the following Makefile variables when linking.
Use them in <program>_LDADD when linking a program, or
in <library>_a_LDFLAGS or <library>_la_LDFLAGS when linking a library.
  $(LIB_CRYPTO)
  $(LIB_GETRANDOM)
  $(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise

Don't forget to
  - "include Makefile.gnulib" from within "lib/Makefile.am",
  - mention "-I m4" in ACLOCAL_AMFLAGS in Makefile.am,
  - mention "m4/gnulib-cache.m4" in EXTRA_DIST in Makefile.am,
  - invoke gl_EARLY in ./configure.ac, right after AC_PROG_CC,
  - invoke gl_INIT in ./configure.ac.

root@fff3135bbacf:/pam-tacplus# gettext -V
gettext (GNU gettext-runtime) 0.21
Copyright (C) 1995-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.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 Ulrich Drepper.

root@fff3135bbacf:/pam-tacplus# autoreconf -f -v -i
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I config -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'config'.
libtoolize: copying file 'config/libtool.m4'
libtoolize: copying file 'config/ltoptions.m4'
libtoolize: copying file 'config/ltsugar.m4'
libtoolize: copying file 'config/ltversion.m4'
libtoolize: copying file 'config/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:46: installing 'config/ar-lib'
configure.ac:46: installing 'config/config.guess'
configure.ac:46: installing 'config/config.sub'
configure.ac:19: installing 'config/install-sh'
configure.ac:19: installing 'config/missing'
automake: warnings are treated as errors
Makefile.am:95: warning: clang -print-file-name=libclang_rt.asan-x86_64.so: non-POSIX variable name
Makefile.am:95: (probably a GNU make extension)
Makefile.am: installing 'config/depcomp'
autoreconf: automake failed with exit status: 1

Thanks, Alexey

bojika commented 2 years ago

I can compile 1.5.1 without any problem. Only I have to change AC_PREREQ([2.64]) in configure.ac