Hiroshi Saito saito
Thu Aug 25 09:16:10 PDT 2005
Hi.

An error takes place by NETSNMP. :-(
I have tried this by FreeBSD. (net-snmp-5.1.3.1)

(Situation)
snmp_thread.c:10:15: c.h: No such file or directory
In file included from slon.h:18,
                 from snmp_thread.c:12:
...
...

Correction of slon/Makefile seems to be necessity.
There was another problem further after this.

In file included from /usr/local/include/net-snmp/definitions.h:22,
                 from /usr/local/include/net-snmp/net-snmp-includes.h:68,
                 from snmp_thread.c:14:
/usr/local/include/net-snmp/types.h:56: redefinition of `socklen_t'
/usr/include/netdb.h:73: `socklen_t' previously declared here
/usr/local/include/net-snmp/types.h:60: redefinition of `in_addr_t'
/usr/include/sys/types.h:159: `in_addr_t' previously declared here

It is likely to have the necessity for a script in config/acx_netsnmp.m4.

AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define if <sys/socket.h> defines socklen_t.])
AC_DEFINE(HAVE_IN_ADDR_T,1, [Define if <sys/types.h> defines in_addr_t.])
( This description is diffident. )

Furthermore... It happens that a library is not found.

snmp_thread.o: In function `init_nstAgentSubagentObject':
/home/saito/Slony-I/slony1-engine-1.1.1-20050822/src/slon/snmp_thread.c:28: undefined
reference to `netsnmp_register_int_instance'
...
...

I may have missed something.
However, I think that this correction is required for the time being.

Regards,
Hiroshi Saito
-------------- next part --------------
--- src/slon/Makefile.orig	Thu Aug 25 15:14:40 2005
+++ src/slon/Makefile	Thu Aug 25 16:58:23 2005
@@ -43,7 +43,7 @@
 
 ifdef HAVE_NETSNMP
 OBJS+= snmp_thread.o
-LDFLAGS+= ${NETSNMP_AGENTLIBS}
+override LDFLAGS+= ${NETSNMP_AGENTLIBS}
 endif
 
 ifeq ($(PORTNAME), win32)
@@ -77,7 +77,7 @@
 confoptions.o:		confoptions.c slon.h confoptions.h
 
 snmp_thread.o:		snmp_thread.c slon.h
-	$(CC) $(PTHREAD_CFLAGS) $(CFLAGS) $(NETSNMP_CFLAGS) -DHAVE_NETSNMP -c $< -o $@
+	$(CC) $(CPPFLAGS) $(PTHREAD_CFLAGS) $(CFLAGS) $(NETSNMP_CFLAGS) -DHAVE_NETSNMP -c $< -o $@
 
 conf-file.c:		conf-file.l
 ifdef FLEX


More information about the Slony1-general mailing list