Hi Niels Baggesen:
Thanks for responding.
Yes, I will try 5.7.2.rc2 and update you.
Regarding the availability of Symbols CMSG_SPACE and CMSG_LEN, here are
some details.
Here are my configuration options.
LDFLAGS="-rpath=\$$ORIGIN:/usr/lib:/usr/local/lib:/lib" LIBS="-lz -lcrypto
-lpthread" ./configure --prefix=/home/build/mnathan/netsnmp_staging
--exec-prefix=/home/build/mnathan/netsnmp_exec
--libdir=/home/build/mnathan/netsnmp_exec/lib
--with-mibdirs=/usr/dragon/.snmp/mibs:/opt/dragon/share/snmp/mibs:./../docs
--enable-ipv6 --enable-reentrant --with-default-snmp-version="3"
--with-sys-contact="dl-ids_escalat...@enterasys.com"
--with-sys-location="Unknown" --with-logfile="/var/log/snmpd.log"
--with-persistent-directory="/var/net-snmp" --disable-embedded-perl
--disable-shared
The prefix and exec-prefix options above are purposely set to be in the
user space because we have a special build area we need to manually
populate once the libnetsnmp.so.30 gets correctly built.
Within net-snmp the symbols are defined in
include/net-snmp/library/snmp_transport.h
#if defined(solaris2)
# ifndef CMSG_SPACE
# define CMSG_SPACE(l) \
((unsigned int)_CMSG_HDR_ALIGN(sizeof (struct cmsghdr) + (l)))
# define CMSG_LEN(l) (_CMSG_HDR_ALIGN(sizeof(struct cmsghdr)) + (l))
# endif
#endif
#endif /* HAVE_SYS_SOCKET_H */
This is running on AIX so HAVE_SYS_SOCKET_H should be the chosen path to
get these symbols. The platform type is aix5.
Within my Aix, whose uname -a output is as follows,
AIX drbld-aix 2 5 00CA5AAE4C00
The symbols above are in /usr/include/sys/socket.h
Here is the config.log output written by executing the ./configure and
pertaining to sys/socket.h
configure:16172: checking sys/socket.h usability
configure:16172: gcc -c -fno-strict-aliasing -g -O2 -Uaix5 -Daix5=aix5
conftest
.c >&5
configure:16172: $? = 0
configure:16172: result: yes
configure:16172: checking sys/socket.h presence
configure:16172: gcc -E conftest.c
configure:16172: $? = 0
configure:16172: result: yes
configure:16172: checking for sys/socket.h
configure:16172: result: yes
Here are the lines in /usr/include/sys/socket.h
/*
* CMSG_ALIGN, CMSG_SPACE, CMSG_LEN
* Added for Linux compatibility.
*/
#ifdef _LINUX_SOURCE_COMPAT
#define CMSG_ALIGN _CMSG_ALIGN
#define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) +
_CMSG_ALIGN(len))
#define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
#endif /* _LINUX_SOURCE_COMPAT */
So, it seems to indicate the need for the Linux compatibility flag to be
included in CFLAGS. One of the configure option is --oldincludedir and the
fact that it is oldincludedir raises some concern. Even including that did
not resolve it. I recall that when I included
--oldincludesdir=/usr/include it resulted in undefined symbols
for CMSG_ALIGN. I did not further try to resolve that because I was not
sure about including the --oldincludedir option. I expected that to be
flagged automatically by configure.
Please note that the net-snmp-5.7.1/snmplib does build, but,
net-snmp-5.7.1/agent is the one that fails this way.
[ I am thinking that the agent side code does use these symbols but the
snmplib side does not so the link time fails on the agent side. I have not
verified that]
Thanks
Mukund
On Tue, Sep 4, 2012 at 12:51 AM, Niels Baggesen
<n...@users.sourceforge.net>wrote:
> On Mon, Sep 03, 2012 at 08:20:02PM -0400, Nathan, Mukund wrote:
> > CMSG_SPACE and CMSG_LEN are macro defined in an include file
> >
> > ~/net-snmp-5.7.1/include/net-snmp/library/snmp_transport.h
> >
> > CMSG_SPACE is defined for solaris platform and sys/socket.h is expected
> for
> > non solaris.
>
> Are the two symbols defined in any of the system include files?
>
> What options did you give to confidure?
>
> Could you please try the same with the current 5.7.2.rc2 release
> candidate?
>
> /Niels
>
> --
> Niels Baggesen - @home - Ã…rhus - Denmark - n...@users.sourceforge.net
> The purpose of computing is insight, not numbers --- R W Hamming
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders