freifunkh / ansible

Here we store all Ansible roles and configs used for Freifunk Hannover.
MIT License
7 stars 3 forks source link

apinger: does not compile on bullseye #240

Closed 1977er closed 8 months ago

1977er commented 1 year ago
TASK [ffh.apinger : Build and install apinger] ***********************************************************************************************************************************
fatal: [sn01]: FAILED! => {
    "changed": true,
    "cmd": "sh autogen.sh && cd src && make install",
    "delta": "0:00:10.224131",
    "end": "2022-08-22 21:41:35.521017",
    "rc": 2,
    "start": "2022-08-22 21:41:25.296886"
}

STDOUT:

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 bison... bison -y
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 whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... 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 arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.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 time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for sys/wait.h... (cached) yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking linux/types.h usability... yes
checking linux/types.h presence... yes
checking for linux/types.h... yes
checking for linux/filter.h... yes
checking for sys/types.h... (cached) yes
checking for netinet/in_systm.h... yes
checking for netinet/in.h... yes
checking for netinet/ip.h... yes
checking for netinet/ip_icmp.h... yes
checking for struct sockaddr_in... yes
checking for struct ip.ip_hl... yes
checking for struct icmp.icmp_type... yes
checking for struct icmp.icmp_code... yes
checking for struct icmp.icmp_cksum... yes
checking for struct icmp.icmp_seq... yes
checking for struct icmp.icmp_id... yes
checking for netinet/ip6.h... yes
checking for netinet/icmp6.h... yes
checking for struct sockaddr_in6... yes
checking for struct icmp6_hdr.icmp6_type... yes
checking for struct icmp6_hdr.icmp6_code... yes
checking for struct icmp6_hdr.icmp6_cksum... yes
checking for struct icmp6_hdr.icmp6_seq... yes
checking for struct icmp6_hdr.icmp6_id... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... (cached) yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking return type of signal handlers... void
checking for strftime... yes
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for memset... yes
checking for socket... yes
checking for strdup... yes
checking for strerror... yes
checking for strpbrk... yes
checking for poll... yes
checking for vsyslog... yes
checking for time... yes
checking for popen... yes
checking for setvbuf... yes
checking for access... yes
checking for sched_yield... yes
checking for recvmsg... yes
checking for rrdtool... /usr/bin/rrdtool
checking for rrdcgi... /usr/bin/rrdcgi
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
gcc -DHAVE_CONFIG_H -I. -I..    -D"SYSCONFDIR=\"/usr/local/etc\"" -ggdb -Wall -MT apinger.o -MD -MP -MF .deps/apinger.Tpo -c -o apinger.o apinger.c
mv -f .deps/apinger.Tpo .deps/apinger.Po
/bin/bash ../ylwrap cfgparser1.y y.tab.c cfgparser1.c y.tab.h `echo cfgparser1.c | sed -e s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/ -e s/c++$/h++/ -e s/c$/h/` y.output cfgparser1.output -- bison -y -d
updating cfgparser1.output
updating cfgparser1.h
gcc -DHAVE_CONFIG_H -I. -I..    -D"SYSCONFDIR=\"/usr/local/etc\"" -ggdb -Wall -MT cfgparser1.o -MD -MP -MF .deps/cfgparser1.Tpo -c -o cfgparser1.o cfgparser1.c
mv -f .deps/cfgparser1.Tpo .deps/cfgparser1.Po
/bin/bash ../ylwrap cfgparser2.l lex.yy.c cfgparser2.c -- flex
gcc -DHAVE_CONFIG_H -I. -I..    -D"SYSCONFDIR=\"/usr/local/etc\"" -ggdb -Wall -MT cfgparser2.o -MD -MP -MF .deps/cfgparser2.Tpo -c -o cfgparser2.o cfgparser2.c
mv -f .deps/cfgparser2.Tpo .deps/cfgparser2.Po
gcc -DHAVE_CONFIG_H -I. -I..    -D"SYSCONFDIR=\"/usr/local/etc\"" -ggdb -Wall -MT conf.o -MD -MP -MF .deps/conf.Tpo -c -o conf.o conf.c
mv -f .deps/conf.Tpo .deps/conf.Po
gcc -DHAVE_CONFIG_H -I. -I..    -D"SYSCONFDIR=\"/usr/local/etc\"" -ggdb -Wall -MT icmp.o -MD -MP -MF .deps/icmp.Tpo -c -o icmp.o icmp.c
mv -f .deps/icmp.Tpo .deps/icmp.Po
gcc -DHAVE_CONFIG_H -I. -I..    -D"SYSCONFDIR=\"/usr/local/etc\"" -ggdb -Wall -MT icmp6.o -MD -MP -MF .deps/icmp6.Tpo -c -o icmp6.o icmp6.c
mv -f .deps/icmp6.Tpo .deps/icmp6.Po
gcc -DHAVE_CONFIG_H -I. -I..    -D"SYSCONFDIR=\"/usr/local/etc\"" -ggdb -Wall -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -I..    -D"SYSCONFDIR=\"/usr/local/etc\"" -ggdb -Wall -MT debug.o -MD -MP -MF .deps/debug.Tpo -c -o debug.o debug.c
mv -f .deps/debug.Tpo .deps/debug.Po
gcc -DHAVE_CONFIG_H -I. -I..    -D"SYSCONFDIR=\"/usr/local/etc\"" -ggdb -Wall -MT rrd.o -MD -MP -MF .deps/rrd.Tpo -c -o rrd.o rrd.c
mv -f .deps/rrd.Tpo .deps/rrd.Po
gcc -D"SYSCONFDIR=\"/usr/local/etc\"" -ggdb -Wall   -o apinger apinger.o cfgparser1.o cfgparser2.o conf.o icmp.o icmp6.o main.o debug.o rrd.o

STDERR:

configure.ac:10: installing './compile'
configure.ac:5: installing './install-sh'
configure.ac:5: installing './missing'
Makefile.am: installing './INSTALL'
Makefile.am: installing './COPYING' using GNU General Public License v3 file
Makefile.am:     Consider adding the COPYING file to the version control system
Makefile.am:     for your code, to avoid questions about which license your project uses
src/Makefile.am: installing './depcomp'
configure.ac: installing './ylwrap'
apinger.c: In function ‘analyze_reply’:
apinger.c:567:32: warning: variable ‘paa’ set but not used [-Wunused-but-set-variable]
  567 | struct active_alarm_list *aal,*paa,*naa;
      |                                ^~~
apinger.c:565:5: warning: variable ‘previous_received’ set but not used [-Wunused-but-set-variable]
  565 | int previous_received;
      |     ^~~~~~~~~~~~~~~~~
/opt/apinger/src/cfgparser1.y:47.1-8: warning: POSIX Yacc does not support %verbose [-Wyacc]
   47 | %verbose
      | ^~~~~~~~
/opt/apinger/src/cfgparser1.y:49.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
   49 | %expect 14
      | ^~~~~~~
cfgparser2.c:1560:16: warning: ‘input’ defined but not used [-Wunused-function]
 1560 |     static int input  (void)
      |                ^~~~~
/usr/bin/ld: icmp.o:/opt/apinger/src/apinger.h:114: multiple definition of `targets'; apinger.o:/opt/apinger/src/apinger.h:114: first defined here
/usr/bin/ld: icmp6.o:/opt/apinger/src/apinger.h:114: multiple definition of `targets'; apinger.o:/opt/apinger/src/apinger.h:114: first defined here
/usr/bin/ld: main.o:/opt/apinger/src/apinger.h:114: multiple definition of `targets'; apinger.o:/opt/apinger/src/apinger.h:114: first defined here
/usr/bin/ld: debug.o:/opt/apinger/src/apinger.h:114: multiple definition of `targets'; apinger.o:/opt/apinger/src/apinger.h:114: first defined here
/usr/bin/ld: rrd.o:/opt/apinger/src/apinger.h:114: multiple definition of `targets'; apinger.o:/opt/apinger/src/apinger.h:114: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:388: apinger] Error 1

MSG:

non-zero return code
1977er commented 1 year ago

Can we do something about it? @lemoer

AiyionPrime commented 1 year ago

apinger no longer has an installation candidate on current Debians. We need an alternative.

Originally posted by @1977er in https://github.com/freifunkh/ansible/issues/75#issuecomment-1423049741

AiyionPrime commented 1 year ago

@1977er die ld-Fehler wirst du los, indem du targets als extern markierst:

--- a/src/apinger.h
+++ b/src/apinger.h
@@ -111,7 +111,7 @@ struct piped_info {
 };
 #endif

-struct target *targets;
+extern struct target *targets;

 extern int foreground;
 extern char *config_file;

Die Warnungen sollten kein Problem beim kompilieren darstellen.

1977er commented 8 months ago

Patch applied. Thanks @AiyionPrime. Closing.