Hi Neils Baggesen:
I tried the 5.7.2.rc2.
The configure options are as follows
LIBS="-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 result is similar to 5.7.1.

libtool: link: gcc -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -Uaix5
-Daix5=aix5 -o snmpd snmpd.o -Wl,-brtl  ./.libs/libnetsnmpagent.a
./.libs/libnetsnmpmibs.a
/home/build/mnathan/net-snmp-5.7.2.rc2/agent/.libs/libnetsnmpagent.a
/home/build/mnathan/net-snmp-5.7.2.rc2/snmplib/.libs/libnetsnmp.a
-lperfstat ../snmplib/.libs/libnetsnmp.a -lm -lpthread
ld: 0711-317 ERROR: Undefined symbol: .CMSG_SPACE
ld: 0711-317 ERROR: Undefined symbol: .CMSG_LEN
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.

[he socket.h that it needs to look at to resolve the above has those
symbols require LINUX_COMPATIBILITY flag.  Just wanted to mention that in
case that has a bearing on resolving this in an AIX build]

Thanks
Mukund

On Tue, Sep 4, 2012 at 9:43 AM, Nathan, Mukund <mnat...@enterasys.com>wrote:

> 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

Reply via email to