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
132 stars 102 forks source link

SLES install issues #91

Open gentlel opened 7 years ago

gentlel commented 7 years ago

I have problems to install tacplus to SLES 12

here are the outputs:

./auto.sh    
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I config
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_DIR, `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
autoreconf: Leaving directory `.'

./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking build system type... x86_64-suse-linux-gnu
checking host system type... x86_64-suse-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-suse-linux/bin/ld
checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-suse-linux-gnu file names to x86_64-suse-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-suse-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-suse-linux/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether gcc and cc understand -c and -o together... yes
checking for pam_start in -lpam... yes
checking for tac_connect in -ltac... no
checking for MD5_Init in -lcrypto... no
checking for RAND_pseudo_bytes in -lcrypto... no
checking for logwtmp in -lutil... yes
checking for ANSI C header files... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking openssl/md5.h usability... no
checking openssl/md5.h presence... no
checking for openssl/md5.h... no
checking openssl/rand.h usability... no
checking openssl/rand.h presence... no
checking for openssl/rand.h... no
checking linux/random.h usability... yes
checking linux/random.h presence... yes
checking for linux/random.h... yes
checking sys/random.h usability... no
checking sys/random.h presence... no
checking for sys/random.h... no
checking security/pam_appl.h usability... yes
checking security/pam_appl.h presence... yes
checking for security/pam_appl.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether CC supports -fstack-protector-all... yes
checking whether CC supports -Wl,-z,relro... yes
checking whether CC supports -Wl,-z,now... yes
checking whether CC supports -fPIE... yes
checking whether CC supports -pie... yes
checking whether CC supports -U_FORTIFY_SOURCE... yes
checking whether CC supports -D_FORTIFY_SOURCE=2... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking return type of signal handlers... void
checking for bzero... yes
checking for gethostbyname... yes
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for select... yes
checking for socket... yes
checking for logwtmp... yes
checking for getrandom... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libtac.pc
config.status: creating pam_tacplus.spec
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

make
make  all-am
make[1]: Entering directory '/home/ui492521/pam_tacplus-1.4.1'
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.    -fstack-protector-all -Wl,-z,relro -Wl,-z,now -fPIE -pie -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-acct_r.lo -MD -MP -MF libtac/lib/.deps/libtac_la-acct_r.Tpo -c -o libtac/lib/libtac_la-acct_r.lo `test -f 'libtac/lib/acct_r.c' || echo './'`libtac/lib/acct_r.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -fstack-protector-all -Wl,-z,relro -Wl,-z,now -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-acct_r.lo -MD -MP -MF libtac/lib/.deps/libtac_la-acct_r.Tpo -c libtac/lib/acct_r.c  -fPIC -DPIC -o libtac/lib/.libs/libtac_la-acct_r.o
mv -f libtac/lib/.deps/libtac_la-acct_r.Tpo libtac/lib/.deps/libtac_la-acct_r.Plo
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.    -fstack-protector-all -Wl,-z,relro -Wl,-z,now -fPIE -pie -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-acct_s.lo -MD -MP -MF libtac/lib/.deps/libtac_la-acct_s.Tpo -c -o libtac/lib/libtac_la-acct_s.lo `test -f 'libtac/lib/acct_s.c' || echo './'`libtac/lib/acct_s.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -fstack-protector-all -Wl,-z,relro -Wl,-z,now -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-acct_s.lo -MD -MP -MF libtac/lib/.deps/libtac_la-acct_s.Tpo -c libtac/lib/acct_s.c  -fPIC -DPIC -o libtac/lib/.libs/libtac_la-acct_s.o
mv -f libtac/lib/.deps/libtac_la-acct_s.Tpo libtac/lib/.deps/libtac_la-acct_s.Plo
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.    -fstack-protector-all -Wl,-z,relro -Wl,-z,now -fPIE -pie -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-attrib.lo -MD -MP -MF libtac/lib/.deps/libtac_la-attrib.Tpo -c -o libtac/lib/libtac_la-attrib.lo `test -f 'libtac/lib/attrib.c' || echo './'`libtac/lib/attrib.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -fstack-protector-all -Wl,-z,relro -Wl,-z,now -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-attrib.lo -MD -MP -MF libtac/lib/.deps/libtac_la-attrib.Tpo -c libtac/lib/attrib.c  -fPIC -DPIC -o libtac/lib/.libs/libtac_la-attrib.o
mv -f libtac/lib/.deps/libtac_la-attrib.Tpo libtac/lib/.deps/libtac_la-attrib.Plo
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.    -fstack-protector-all -Wl,-z,relro -Wl,-z,now -fPIE -pie -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-authen_r.lo -MD -MP -MF libtac/lib/.deps/libtac_la-authen_r.Tpo -c -o libtac/lib/libtac_la-authen_r.lo `test -f 'libtac/lib/authen_r.c' || echo './'`libtac/lib/authen_r.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -fstack-protector-all -Wl,-z,relro -Wl,-z,now -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-authen_r.lo -MD -MP -MF libtac/lib/.deps/libtac_la-authen_r.Tpo -c libtac/lib/authen_r.c  -fPIC -DPIC -o libtac/lib/.libs/libtac_la-authen_r.o
mv -f libtac/lib/.deps/libtac_la-authen_r.Tpo libtac/lib/.deps/libtac_la-authen_r.Plo
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.    -fstack-protector-all -Wl,-z,relro -Wl,-z,now -fPIE -pie -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-authen_s.lo -MD -MP -MF libtac/lib/.deps/libtac_la-authen_s.Tpo -c -o libtac/lib/libtac_la-authen_s.lo `test -f 'libtac/lib/authen_s.c' || echo './'`libtac/lib/authen_s.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -fstack-protector-all -Wl,-z,relro -Wl,-z,now -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-authen_s.lo -MD -MP -MF libtac/lib/.deps/libtac_la-authen_s.Tpo -c libtac/lib/authen_s.c  -fPIC -DPIC -o libtac/lib/.libs/libtac_la-authen_s.o
mv -f libtac/lib/.deps/libtac_la-authen_s.Tpo libtac/lib/.deps/libtac_la-authen_s.Plo
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.    -fstack-protector-all -Wl,-z,relro -Wl,-z,now -fPIE -pie -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-author_r.lo -MD -MP -MF libtac/lib/.deps/libtac_la-author_r.Tpo -c -o libtac/lib/libtac_la-author_r.lo `test -f 'libtac/lib/author_r.c' || echo './'`libtac/lib/author_r.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -fstack-protector-all -Wl,-z,relro -Wl,-z,now -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I ./libtac/include -g -O2 -MT libtac/lib/libtac_la-author_r.lo -MD -MP -MF libtac/lib/.deps/libtac_la-author_r.Tpo -c libtac/lib/author_r.c  -fPIC -DPIC -o libtac/lib/.libs/libtac_la-author_r.o
libtac/lib/author_r.c: In function 'tac_author_read':
libtac/lib/author_r.c:135:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (unsigned int r = 0; r < tb->arg_cnt && r < TAC_PLUS_MAX_ARGCOUNT; r++) {
     ^
libtac/lib/author_r.c:135:5: note: use option -std=c99 or -std=gnu99 to compile your code
libtac/lib/author_r.c:208:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (unsigned int r = 0; r < tb->arg_cnt && r < TAC_PLUS_MAX_ARGCOUNT;
   ^
Makefile:765: recipe for target 'libtac/lib/libtac_la-author_r.lo' failed
make[1]: *** [libtac/lib/libtac_la-author_r.lo] Error 1
make[1]: Leaving directory '/home/ui492521/pam_tacplus-1.4.1'
Makefile:446: recipe for target 'all' failed
make: *** [all] Error 2

Can somebody help me? Thanks

Best Regards gentlel

pprindeville commented 7 years ago

Well, we can either patch the source to be C89 syntax, or we can fix the Makefile to explicitly specify C99... I'm fine with either approach.

Icedeale commented 7 years ago

Hi all,

I ran into the same issue on a CentOS 7 System: ### loop initial declarations are only allowed in C99 mode Is there anything new on this topic? Thanks in advance.

pprindeville commented 7 years ago

Actually, this is fixed in PR #70. Can you try building master? Or 1.5.0-beta.1?