On Wed, 2011-02-23 at 18:29 -0800, Wes Hardaker wrote:
> >>>>> On Wed, 23 Feb 2011 22:36:20 +0100, Magnus Fromreide 
> >>>>> <[email protected]> said:
> 
> MF> 3 #define NETSNMP_FEATURE_REQUIRE_#DEFINE 1
> ...
> MF> and I have to admit that this doesn't look like C to me...
> 
> No...  it looks like there must be some issue with the script that
> generates the file.  I suspect an issue with sed/grep/tr/etc or
> something in local/minimalist/feature-check.
> 
> Can you show me what the apps/snmpnetstat/inet.ft file looks like?
> 
> I also note you're building it outside the source tree?

Yes. I usually does that, save for the perl tree.

> I haven't tried that yet, though I thought I coded it so it should work.
> 
> Which platform is this on?

debian/testing on x86_64 with gcc 4.6.0 20110207 (experimental)

Looking further it seems that the issue is -ggdb3.

Consider the output of

echo 'a(b)' | gcc -E - '-Da(x) x b'

as opposed to the output of

echo 'a(b)' | gcc -E - '-Da(x) x b' -ggdb3

Thus the patch in fc.diff seems to do the trick.

The build stil dies but there are other reasons for that now...

/MF

(and for the record this is how I invoke configure:

../clean/configure --enable-mini-agent --without-rpm --without-kmem-usage 
--without-root-access --with-defaults --prefix=/tmp/net-snmp-install 
--disable-debugging --disable-mib-loading --disable-manuals --disable-privacy 
--disable-md5 --disable-shared 
--with-out-transports=UDPIPv6,TCP,Unix,Callback,Alias,TCPIPv6 --without-openssl 
--disable-snmp --enable-snmpv2 --disable-snmpv1 --without-opaque-special-types 
--disable-deprecated --with-out-mib-modules=default_modules 
--with-mib-modules=ucd-snmp/dlmod,mibII/system_mib CFLAGS='-Os 
-ffunction-sections -ggdb3' LDFLAGS='-Wl,--gc-sections -Os -ggdb3' 
CC=/usr/local/gcc-head/bin/gcc --disable-ipv6 --enable-minimalist

where ../clean contains trunk/net-snmp/
/* required by ../../../clean/apps/snmpnetstat/inet.c */
#define NETSNMP_FEATURE_REQUIRE_#DEFINE 1
#define NETSNMP_FEATURE_REQUIRE_NETSNMP_FEATURE_REQUIRE(X) 1
#define NETSNMP_FEATURE_REQUIRE_X 1

/* features provided by ../../../clean/apps/snmpnetstat/inet.c */
#define NETSNMP_FEATURE_PROVIDE_#DEFINE 1
#define NETSNMP_FEATURE_PROVIDE_NETSNMP_FEATURE_PROVIDE(X) 1
#define NETSNMP_FEATURE_PROVIDE_X 1

/* features provided by ../../../clean/apps/snmpnetstat/inet.c */
#define NETSNMP_FEATURE_#DEFINE_CHILD_OF_#DEFINE 1
#define NETSNMP_FEATURE_PROVIDE_#DEFINE 1
#define NETSNMP_FEATURE_NETSNMP_FEATURE_CHILD_OF(X_CHILD_OF_Y) 1
#define NETSNMP_FEATURE_PROVIDE_NETSNMP_FEATURE_CHILD_OF(X 1
#define NETSNMP_FEATURE_X_CHILD_OF_Y 1
#define NETSNMP_FEATURE_PROVIDE_X 1

/* features wanted by ../../../clean/apps/snmpnetstat/inet.c */
#define NETSNMP_FEATURE_WANT_#DEFINE 1
#define NETSNMP_FEATURE_WANT_NETSNMP_FEATURE_WANT(X) 1
#define NETSNMP_FEATURE_WANT_X 1
#define netsnmp_feature_require(X) X NSF_RR
#define netsnmp_feature_provide(X) X NSF_PP
#define netsnmp_feature_child_of(X,Y) X,Y NSF_CO
#define netsnmp_feature_want(X) X NSF_WW
Index: local/minimalist/feature-check
===================================================================
--- local/minimalist/feature-check	(revision 19988)
+++ local/minimalist/feature-check	(working copy)
@@ -56,7 +56,8 @@
              '-Dnetsnmp_feature_require(X)=X NSF_RR' \
              '-Dnetsnmp_feature_provide(X)=X NSF_PP' \
              '-Dnetsnmp_feature_child_of(X,Y)=X,Y NSF_CO' \
-             '-Dnetsnmp_feature_want(X)=X NSF_WW' $source | $GREP NSF_ > $tmpf
+             '-Dnetsnmp_feature_want(X)=X NSF_WW' $source | \
+    $GREP NSF_ | $GREP -v netsnmp_feature_ > $tmpf
 
 $RM -f $destination;
 touch $destination;
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to