LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   installing knockd (http://www.linuxquestions.org/questions/linux-newbie-8/installing-knockd-745737/)

lulatsch 08-07-2009 01:27 AM

installing knockd
 
I am trying to install knockd from the knock-0.5.tar.gz.

The ./configure works fine, but when I do make:

Code:

[root@testbox knock-0.5]# make
gcc -g -O2 -g -Wall -pedantic -fno-exceptions -D_GNU_SOURCE -I. -o src/knockd.o -c src/knockd.c
src/knockd.c:134: error: ‚PATH_MAX‚ undeclared here (not in a function)
src/knockd.c: In function ‚parseconfig‚:
src/knockd.c:438: warning: unused variable ‚line‚
src/knockd.c: In function ‚get_next_one_time_sequence‚:
src/knockd.c:695: warning: unused variable ‚line‚
src/knockd.c: In function ‚sniff‚:
src/knockd.c:1386: warning: unused variable ‚parsed_stop_cmd‚
src/knockd.c:1385: warning: unused variable ‚parsed_start_cmd‚
make: *** [src/knockd.o] Error 1


I alternatively tried to install with the knock-0.5-4.src.rpm.

Here it also fails with:

Code:

[root@testbox knocksrcrpm]# rpmbuild --rebuild knock-0.5-4.src.rpm
Installing knock-0.5-4.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.v4qqY5
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf knock-0.5
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/knock-0.5.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd knock-0.5
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #0 (knock-0.5-syslog.patch):'
Patch #0 (knock-0.5-syslog.patch):
+ /bin/cat /root/rpmbuild/SOURCES/knock-0.5-syslog.patch
+ /usr/bin/patch -s -p1 -b --suffix .syslog --fuzz=0
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.k0hwSJ
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd knock-0.5
+ export CFLAGS=-I/usr/include/pcap
+ CFLAGS=-I/usr/include/pcap
+ CFLAGS=-I/usr/include/pcap
+ export CFLAGS
+ CXXFLAGS='-O2 -g -march=i386 -mtune=i686'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -march=i386 -mtune=i686'
+ export FFLAGS
+ ./configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i386-redhat-linux --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
checking for i686-pc-linux-gnu-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 ANSI C... none needed
checking for i686-pc-linux-gnu-g++... no
checking for i686-pc-linux-gnu-c++... no
checking for i686-pc-linux-gnu-gpp... no
checking for i686-pc-linux-gnu-aCC... no
checking for i686-pc-linux-gnu-CC... no
checking for i686-pc-linux-gnu-cxx... no
checking for i686-pc-linux-gnu-cc++... no
checking for i686-pc-linux-gnu-cl... no
checking for i686-pc-linux-gnu-FCC... no
checking for i686-pc-linux-gnu-KCC... no
checking for i686-pc-linux-gnu-RCC... no
checking for i686-pc-linux-gnu-xlC_r... no
checking for i686-pc-linux-gnu-xlC... no
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for pcap_open_live in -lpcap... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... 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 pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.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 sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for pid_t... yes
checking for unistd.h... (cached) yes
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 vprintf... yes
checking for _doprnt... no
checking for inet_ntoa... yes
checking for memmove... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strstr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
+ /usr/bin/make
gcc -O2 -g -march=i386 -mtune=i686 -I/usr/include/pcap -g -Wall -pedantic -fno-exceptions -D_GNU_SOURCE -I. -o src/knockd.o -c src/knockd.c
src/knockd.c:134: error: ‚PATH_MAX‚ undeclared here (not in a function)
src/knockd.c: In function ‚parseconfig‚:
src/knockd.c:438: warning: unused variable ‚line‚
src/knockd.c: In function ‚get_next_one_time_sequence‚:
src/knockd.c:695: warning: unused variable ‚line‚
src/knockd.c: In function ‚sniff‚:
src/knockd.c:1386: warning: unused variable ‚parsed_stop_cmd‚
src/knockd.c:1385: warning: unused variable ‚parsed_start_cmd‚
make: *** [src/knockd.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.k0hwSJ (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.k0hwSJ (%build)

I am running on it on an up to date Fedora 11. Please help :(

lulatsch 08-12-2009 12:47 AM

For all the others waiting (in vain) for a reply;

The solution is to add a

Quote:

#include <limits.h>
to the includes in list.h


All times are GMT -5. The time now is 04:04 AM.