When I compile with the option --enable-tcp-wrapper, I get the following error. afinet.o: In function `do_open_afinet_connection': afinet.o(.text+0x38b): undefined reference to `request_init' afinet.o(.text+0x394): undefined reference to `sock_host' afinet.o(.text+0x39c): undefined reference to `hosts_access' collect2: ld returned 1 exit status I have enclosed the error.log and a copy of the makefile. Any ideas??
Jim Gifford writes:
When I compile with the option --enable-tcp-wrapper, I get the following error.
afinet.o: In function `do_open_afinet_connection': afinet.o(.text+0x38b): undefined reference to `request_init' afinet.o(.text+0x394): undefined reference to `sock_host' afinet.o(.text+0x39c): undefined reference to `hosts_access' collect2: ld returned 1 exit status
There's still some problem with the autoconf stuff, it seems. Try adding -lwrap to the LDFLAGS like this: gmake LDFLAGS+=-lwrap
No luck any other ideas? ----- Original Message ----- From: "Ed Ravin" <eravin@panix.com> To: <syslog-ng@lists.balabit.hu> Sent: Monday, April 22, 2002 3:26 PM Subject: Re: [syslog-ng]Error when compiling with tcp-wrappers
Jim Gifford writes:
When I compile with the option --enable-tcp-wrapper, I get the following error.
afinet.o: In function `do_open_afinet_connection': afinet.o(.text+0x38b): undefined reference to `request_init' afinet.o(.text+0x394): undefined reference to `sock_host' afinet.o(.text+0x39c): undefined reference to `hosts_access' collect2: ld returned 1 exit status
There's still some problem with the autoconf stuff, it seems. Try adding -lwrap to the LDFLAGS like this:
gmake LDFLAGS+=-lwrap
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng
No luck any other ideas?
Try CFLAGS instead of LDFLAGS. I hit this one when I built syslog-ng on NetBSD, but forgot to document the fix.
When I compile with the option --enable-tcp-wrapper, I get the following error.
afinet.o: In function `do_open_afinet_connection': afinet.o(.text+0x38b): undefined reference to `request_init' afinet.o(.text+0x394): undefined reference to `sock_host' afinet.o(.text+0x39c): undefined reference to `hosts_access' collect2: ld returned 1 exit status
There's still some problem with the autoconf stuff, it seems. Try adding -lwrap to the LDFLAGS like this:
gmake LDFLAGS+=-lwrap
On Mon, Apr 22, 2002 at 06:26:48PM -0400, Ed Ravin wrote:
Jim Gifford writes:
When I compile with the option --enable-tcp-wrapper, I get the following error.
afinet.o: In function `do_open_afinet_connection': afinet.o(.text+0x38b): undefined reference to `request_init' afinet.o(.text+0x394): undefined reference to `sock_host' afinet.o(.text+0x39c): undefined reference to `hosts_access' collect2: ld returned 1 exit status
There's still some problem with the autoconf stuff, it seems. Try adding -lwrap to the LDFLAGS like this:
gmake LDFLAGS+=-lwrap
here's the check for libwrap: AC_CHECK_LIB(wrap, hosts_access) it does the trick for me: ... checking for hosts_access in -lwrap... yes ... -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
It's there. I have tried everything. It just seems during the make the libwrap is not included. somewhere there needs to be a -lwrap added, I do not see one in the configure file. ----- Original Message ----- From: "Balazs Scheidler" <bazsi@balabit.hu> To: <syslog-ng@lists.balabit.hu> Sent: Tuesday, April 23, 2002 5:18 AM Subject: Re: [syslog-ng]Error when compiling with tcp-wrappers
On Mon, Apr 22, 2002 at 06:26:48PM -0400, Ed Ravin wrote:
Jim Gifford writes:
When I compile with the option --enable-tcp-wrapper, I get the following error.
afinet.o: In function `do_open_afinet_connection': afinet.o(.text+0x38b): undefined reference to `request_init' afinet.o(.text+0x394): undefined reference to `sock_host' afinet.o(.text+0x39c): undefined reference to `hosts_access' collect2: ld returned 1 exit status
There's still some problem with the autoconf stuff, it seems. Try adding -lwrap to the LDFLAGS like this:
gmake LDFLAGS+=-lwrap
here's the check for libwrap:
AC_CHECK_LIB(wrap, hosts_access)
it does the trick for me:
... checking for hosts_access in -lwrap... yes ...
-- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng
Jim Gifford writes:
It's there. I have tried everything. It just seems during the make the libwrap is not included. somewhere there needs to be a -lwrap added, I do not see one in the configure file.
It can be fixed by editing src/Makefile. This works for me on NetBSD 1.5.2, x86 platform: --- src/Makefile Wed Apr 24 23:30:33 2002 +++ /tmp/Makefile.fixed Wed Apr 24 23:28:28 2002 @@ -96,7 +96,7 @@ DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I. CPPFLAGS = -LDFLAGS = +LDFLAGS = -lwrap LIBS = -lfl /devel/build/libol-0.3.2/src/.libs/libol.a syslog_ng_OBJECTS = main.o sources.o center.o filters.o destinations.o \ log.o cfgfile.o cfg-grammar.o cfg-lex.o affile.o afsocket.o afunix.o \ My configure options were: ./configure --prefix=/install/syslog-ng-1.5.16 --enable-tcp-wrapper --with-libol=/src/build/libol-0.3.2 And the relevant output from configure was: checking for hosts_access in -lwrap... no checking whether to enable TCP wrapper support... yes So clearly something is broken in the configure process.
----- Original Message ----- From: "Balazs Scheidler" <bazsi@balabit.hu> To: <syslog-ng@lists.balabit.hu> Sent: Tuesday, April 23, 2002 5:18 AM Subject: Re: [syslog-ng]Error when compiling with tcp-wrappers
On Mon, Apr 22, 2002 at 06:26:48PM -0400, Ed Ravin wrote:
Jim Gifford writes:
When I compile with the option --enable-tcp-wrapper, I get the following error.
afinet.o: In function `do_open_afinet_connection': afinet.o(.text+0x38b): undefined reference to `request_init' afinet.o(.text+0x394): undefined reference to `sock_host' afinet.o(.text+0x39c): undefined reference to `hosts_access' collect2: ld returned 1 exit status
There's still some problem with the autoconf stuff, it seems. Try adding -lwrap to the LDFLAGS like this:
gmake LDFLAGS+=-lwrap
here's the check for libwrap:
AC_CHECK_LIB(wrap, hosts_access)
it does the trick for me:
... checking for hosts_access in -lwrap... yes ...
-- Bazsi
Did not work here, I had to add it to LIBS. ----- Original Message ----- From: "Ed Ravin" <eravin@panix.com> To: <syslog-ng@lists.balabit.hu> Sent: Wednesday, April 24, 2002 8:38 PM Subject: Re: [syslog-ng]Error when compiling with tcp-wrappers
Jim Gifford writes:
It's there. I have tried everything. It just seems during the make the libwrap is not included. somewhere there needs to be a -lwrap added, I do not see one in the configure file.
It can be fixed by editing src/Makefile. This works for me on NetBSD 1.5.2, x86 platform:
--- src/Makefile Wed Apr 24 23:30:33 2002 +++ /tmp/Makefile.fixed Wed Apr 24 23:28:28 2002 @@ -96,7 +96,7 @@
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I. CPPFLAGS = -LDFLAGS = +LDFLAGS = -lwrap LIBS = -lfl /devel/build/libol-0.3.2/src/.libs/libol.a syslog_ng_OBJECTS = main.o sources.o center.o filters.o destinations.o \ log.o cfgfile.o cfg-grammar.o cfg-lex.o affile.o afsocket.o afunix.o \
My configure options were:
./configure --prefix=/install/syslog-ng-1.5.16 --enable-tcp-wrapper --with- libol=/src/build/libol-0.3.2
And the relevant output from configure was:
checking for hosts_access in -lwrap... no checking whether to enable TCP wrapper support... yes
So clearly something is broken in the configure process.
----- Original Message ----- From: "Balazs Scheidler" <bazsi@balabit.hu> To: <syslog-ng@lists.balabit.hu> Sent: Tuesday, April 23, 2002 5:18 AM Subject: Re: [syslog-ng]Error when compiling with tcp-wrappers
On Mon, Apr 22, 2002 at 06:26:48PM -0400, Ed Ravin wrote:
Jim Gifford writes:
When I compile with the option --enable-tcp-wrapper, I get the following error.
afinet.o: In function `do_open_afinet_connection': afinet.o(.text+0x38b): undefined reference to `request_init' afinet.o(.text+0x394): undefined reference to `sock_host' afinet.o(.text+0x39c): undefined reference to `hosts_access' collect2: ld returned 1 exit status
There's still some problem with the autoconf stuff, it seems. Try adding -lwrap to the LDFLAGS like this:
gmake LDFLAGS+=-lwrap
here's the check for libwrap:
AC_CHECK_LIB(wrap, hosts_access)
it does the trick for me:
... checking for hosts_access in -lwrap... yes ...
-- Bazsi
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng
On Wed, Apr 24, 2002 at 11:38:25PM -0400, Ed Ravin wrote:
Jim Gifford writes:
It's there. I have tried everything. It just seems during the make the libwrap is not included. somewhere there needs to be a -lwrap added, I do not see one in the configure file.
My configure options were:
./configure --prefix=/install/syslog-ng-1.5.16 --enable-tcp-wrapper --with-libol=/src/build/libol-0.3.2
And the relevant output from configure was:
checking for hosts_access in -lwrap... no checking whether to enable TCP wrapper support... yes
So clearly something is broken in the configure process.
can you check config.log why it fails? -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
Balazs Scheidler writes:
On Wed, Apr 24, 2002 at 11:38:25PM -0400, Ed Ravin wrote:
./configure --prefix=/install/syslog-ng-1.5.16 --enable-tcp-wrapper --with-libol=/src/build/libol-0.3.2
[...]
checking for hosts_access in -lwrap... no checking whether to enable TCP wrapper support... yes
So clearly something is broken in the configure process.
can you check config.log why it fails?
Here's the log: configure:2725: checking for tcpd.h configure:2735: gcc -E conftest.c >/dev/null 2>conftest.out configure:2762: checking for hosts_access in -lwrap configure:2781: gcc -o conftest -g -O2 conftest.c -lwrap 1>&5 /usr/lib/libwrap.so: undefined reference to `allow_severity' /usr/lib/libwrap.so: undefined reference to `deny_severity' collect2: ld returned 1 exit status configure: failed program was: #line 2770 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char hosts_access(); int main() { hosts_access() ; return 0; } configure:2811: checking whether to enable TCP wrapper support I think the fix is that the test program should define "allow_severity" and "deny_severity", since those are required to be in the user program for it to compile successfully.
On Thu, Apr 25, 2002 at 01:49:45PM -0400, Ed Ravin wrote:
Balazs Scheidler writes:
On Wed, Apr 24, 2002 at 11:38:25PM -0400, Ed Ravin wrote:
./configure --prefix=/install/syslog-ng-1.5.16 --enable-tcp-wrapper --with-libol=/src/build/libol-0.3.2
[...]
checking for hosts_access in -lwrap... no checking whether to enable TCP wrapper support... yes
So clearly something is broken in the configure process.
can you check config.log why it fails?
Here's the log:
configure:2725: checking for tcpd.h configure:2735: gcc -E conftest.c >/dev/null 2>conftest.out configure:2762: checking for hosts_access in -lwrap configure:2781: gcc -o conftest -g -O2 conftest.c -lwrap 1>&5 /usr/lib/libwrap.so: undefined reference to `allow_severity' /usr/lib/libwrap.so: undefined reference to `deny_severity' collect2: ld returned 1 exit status configure: failed program was: #line 2770 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char hosts_access();
int main() { hosts_access() ; return 0; } configure:2811: checking whether to enable TCP wrapper support
I think the fix is that the test program should define "allow_severity" and "deny_severity", since those are required to be in the user program for it to compile successfully.
Can you check this configure.in patch if it does autodetect your -lwrap ? (after patching you need to run autoconf) diff -u -r1.46 configure.in --- configure.in 2002/04/12 07:42:16 1.46 +++ configure.in 2002/04/26 07:50:11 @@ -83,6 +83,26 @@ blb_cv_c_modern_utmp=yes, blb_cv_c_modern_utmp=no)]) +old_LDFLAGS=$LDFLAGS +LDFLAGS=-lwrap +AC_CACHE_CHECK(for hosts_access in -lwrap, + blb_cv_c_lwrap, +[AC_TRY_LINK(, +[ +int allow_severity; +int deny_severity; +extern int hosts_access(void); + +int foo(void) +{ + hosts_access(); +} +], +blb_cv_c_lwrap=yes, +blb_cv_c_lwrap=no)]) +LDFLAGS=$old_LDFLAGS + + if test "x$blb_cv_c_modern_utmp" = "xyes"; then AC_DEFINE(HAVE_MODERN_UTMP) fi @@ -169,7 +189,10 @@ if test "x$enable_tcp_wrapper" = "xyes"; then AC_CHECK_HEADERS(tcpd.h) - AC_CHECK_LIB(wrap, hosts_access) + dnl AC_CHECK_LIB(wrap, hosts_access) + if test $blb_cv_c_lwrap = "xyes"; then + LIBS="$LIBS -lwrap" + fi fi AC_MSG_CHECKING(whether to enable TCP wrapper support) -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
On Fri, Apr 26, 2002 at 09:51:04AM +0200, Balazs Scheidler wrote:
On Thu, Apr 25, 2002 at 01:49:45PM -0400, Ed Ravin wrote:
Balazs Scheidler writes:
I think the fix is that the test program should define "allow_severity" and "deny_severity", since those are required to be in the user program for it to compile successfully.
Can you check this configure.in patch if it does autodetect your -lwrap ? (after patching you need to run autoconf)
I'm trying to figure out if the FAQ needs something about compiling in tcp wrappers support. Does the configure process work now when compiling it? I'm sure someone knows and I don't have to try myself. TIA -- "I've not lost my mind. It's backed up on tape somewhere." - Unknown
Nate Campi writes:
On Fri, Apr 26, 2002 at 09:51:04AM +0200, Balazs Scheidler wrote:
On Thu, Apr 25, 2002 at 01:49:45PM -0400, Ed Ravin wrote:
I think the fix is that the test program should define "allow_severity" and "deny_severity", since those are required to be in the user program for it to compile successfully. Can you check this configure.in patch if it does autodetect your -lwrap ? (after patching you need to run autoconf)
I'm trying to figure out if the FAQ needs something about compiling in tcp wrappers support. Does the configure process work now when compiling it? I'm sure someone knows and I don't have to try myself.
We don't need an FAQ entry, we need a configure script that works :-) I just tried to build 1.5.18 as follows, on NetBSD 1.5.2: untar file apply Baszi's patch posted to the list recently:
Try this patch (and regenerate your configure script using autoconf ) diff -u -r1.49 configure.in --- configure.in 29 May 2002 10:24:42 -0000 1.49 +++ configure.in 30 May 2002 15:43:42 -0000 @@ -190,7 +190,7 @@ if test "x$enable_tcp_wrapper" = "xyes"; then AC_CHECK_HEADERS(tcpd.h) dnl AC_CHECK_LIB(wrap, hosts_access) - if test $blb_cv_c_lwrap = "xyes"; then + if test "x$blb_cv_c_lwrap" = "xyes"; then LIBS="$LIBS -lwrap" fi fi
ran "autoconf" ran "configure --prefix=/blah --enable-tcp-wrapper --with-libol=$PWD/../libol-3.3" Got all sorts of grief - the first configure failed, with: config.status: cannot find input file: utils/Makefile.in But re-iterating configure got farther, and then I get: gcc -g -O2 -Wall -I/var/home/elr/tmp/libol-0.3.3/src -D_GNU_SOURCE -o syslog-ng main.o sources.o center.o filters.o destinations.o log.o cfgfile.o cfg-grammar.o cfg-lex.o affile.o afsocket.o afunix.o afinet.o afinter.o afuser.o afstreams.o afprogram.o afremctrl.o nscache.o utils.o syslog-names.o -lfl /var/home/elr/tmp/libol-0.3.3/src/.libs/libol.a afinet.o: In function `do_open_afinet_connection': /var/home/elr/tmp/syslog-ng-1.5.18/src/afinet.c:223: undefined reference to `request_init' /var/home/elr/tmp/syslog-ng-1.5.18/src/afinet.c:224: undefined reference to `sock_host' /var/home/elr/tmp/syslog-ng-1.5.18/src/afinet.c:225: undefined reference to `hosts_access' collect2: ld returned 1 exit status Which shows -lwrap is still missing from LDFLAGS. Feh.
On Mon, Apr 22, 2002 at 03:19:23PM -0700, Jim Gifford wrote:
When I compile with the option --enable-tcp-wrapper, I get the following error.
afinet.o: In function `do_open_afinet_connection': afinet.o(.text+0x38b): undefined reference to `request_init' afinet.o(.text+0x394): undefined reference to `sock_host' afinet.o(.text+0x39c): undefined reference to `hosts_access' collect2: ld returned 1 exit status
you are not linked against -lwrap for some reason. do you have an /usr/lib/libwrap.so or /lib/libwrap.so ? -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
participants (4)
-
Balazs Scheidler
-
Ed Ravin
-
Jim Gifford
-
Nate Campi