KristianLyng / nrpe

Nagios NRPE-work (IPv6, and SANITY)
8 stars 3 forks source link

Fails to build on debian #1

Open darac opened 12 years ago

darac commented 12 years ago

Hello,

I am running Debian Sid and have found that this program doesn't seem to build properly from git.

$ git clone git://github.com/KristianLyng/nrpe.git nrpe3
Cloning into 'nrpe3'...
remote: Counting objects: 1089, done.
remote: Compressing objects: 100% (333/333), done.
remote: Total 1089 (delta 747), reused 1089 (delta 747)
Receiving objects: 100% (1089/1089), 761.02 KiB | 641 KiB/s, done.
Resolving deltas: 100% (747/747), done.
$ cd nrpe3
$ ./autogen.sh
+ aclocal
+ autoheader
+ automake --add-missing --copy --foreign
configure.ac:9: installing `./install-sh'
configure.ac:9: installing `./missing'
src/Makefile.am: installing `./depcomp'
+ autoconf
$ dpkg-buildpackage -uc -us
dpkg-buildpackage: source package nagios-nrpe
dpkg-buildpackage: source version 3.0-1~alpha1~kly3~squeeze1
dpkg-buildpackage: source changed by Kristian Lyngstol <kristian@bohemians.org>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build nrpe3
 fakeroot debian/rules clean
dpatch  deapply-all
rm -rf patch-stamp patch-stampT debian/patched
dh_testdir
dh_testroot
if test -f Makefile; then /usr/bin/make distclean; fi
dh_clean
rm -f config.sub config.guess
rm -f build-stamp install-stamp fix-configs-stamp configure-stamp
 dpkg-source -b nrpe3
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
dpkg-source: info: using source format `1.0'
dpkg-source: warning: source directory 'nrpe3' is not <sourcepackage>-<upstreamversion> 'nagios-nrpe-3.0'
dpkg-source: info: building nagios-nrpe in nagios-nrpe_3.0-1~alpha1~kly3~squeeze1.tar.gz
dpkg-source: info: building nagios-nrpe in nagios-nrpe_3.0-1~alpha1~kly3~squeeze1.dsc
 debian/rules build
test -d debian/patched || install -d debian/patched
dpatch  apply-all
dpatch  cat-all  >>patch-stampT
mv -f patch-stampT patch-stamp
dh_testdir
ln -sf /usr/share/misc/config.sub .
ln -sf /usr/share/misc/config.guess .
rm -f config.cache
./configure CFLAGS="-O2 -Wall" CXXFLAGS="" \
                --prefix=/usr \
                --sysconfdir=/etc \
                --localstatedir=/var \
                --libexecdir=/usr/lib/nagios/plugins \
                --libdir=/usr/lib/nagios \
                --enable-command-args
configure: WARNING: unrecognized options: --enable-command-args
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SSL... 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 how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -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 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 for stdint.h... (cached) 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 uid_t in sys/types.h... yes
checking for int16_t... yes
checking for int32_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint32_t... 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 for alarm... yes
checking for bzero... yes
checking for endgrent... yes
checking for endpwent... yes
checking for getcwd... yes
checking for gethostbyname... yes
checking for inet_ntoa... yes
checking for memset... yes
checking for putenv... yes
checking for select... yes
checking for socket... yes
checking for strchr... yes
checking for strcspn... yes
checking for strdup... yes
checking for strerror... yes
checking for strpbrk... yes
checking for strspn... yes
checking for strstr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
configure: WARNING: unrecognized options: --enable-command-args
touch configure-stamp
dh_testdir
/usr/bin/make all
make[1]: Entering directory `/tmp/nrpe3'
/usr/bin/make  all-recursive
make[2]: Entering directory `/tmp/nrpe3'
Making all in src
make[3]: Entering directory `/tmp/nrpe3/src'
gcc -DHAVE_CONFIG_H -I. -I..  -I../include     -O2 -Wall -MT check_nrpe.o -MD -MP -MF .deps/check_nrpe.Tpo -c -o check_nrpe.o check_nrpe.c
check_nrpe.c: In function ‘main’:
check_nrpe.c:335:19: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
mv -f .deps/check_nrpe.Tpo .deps/check_nrpe.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I../include     -O2 -Wall -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c
mv -f .deps/utils.Tpo .deps/utils.Po
gcc  -O2 -Wall   -o check_nrpe check_nrpe.o utils.o -lssl -lcrypto
gcc -DHAVE_CONFIG_H -I. -I..  -I../include     -O2 -Wall -MT nrpe.o -MD -MP -MF .deps/nrpe.Tpo -c -o nrpe.o nrpe.c
nrpe.c: In function ‘main’:
nrpe.c:1053:8: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
mv -f .deps/nrpe.Tpo .deps/nrpe.Po
gcc  -O2 -Wall   -o nrpe nrpe.o utils.o -lssl -lcrypto
make[3]: Leaving directory `/tmp/nrpe3/src'
make[3]: Entering directory `/tmp/nrpe3'
make[3]: Leaving directory `/tmp/nrpe3'
make[2]: Leaving directory `/tmp/nrpe3'
make[1]: Leaving directory `/tmp/nrpe3'
touch build-stamp
 fakeroot debian/rules binary
sed -i -e '/Last Modified/ d' sample-config/nrpe.cfg
sed: can't read sample-config/nrpe.cfg: No such file or directory
make: *** [fix-configs-stamp] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

As you can see, the program builds fine, but when it comes to fixing the timestamp in the configs, the script fails. This is probably because, in sample-config, the files are "nrpe.cfg.in" and "nrpe.xinetd.in".

honwhy commented 11 years ago

after I start NRPE daemon by nrpe -c /usr/local/nagios/etc/nrpe.cfg -d why nrpe is listening on port 0 (zero), but I have make sure that nrpe.cfg ,the server_port is 5566 why?

darac commented 11 years ago

@Honwhy: This is an issue with building nrpe, rather than running it. You should start a new issue, rather than commenting on this existing (but unrelated) issue. Thanks.