Thanks for the quick response, Magnus.

Please find the compilation options below and let me know if anything else
required.

libtool: compile:  gcc -I../include -I. -I../snmplib -I/usr/include/libnl3
-I/home/anand/workspace/modules/snmp/explore/net-snmp-5.8.pre2/../inc/
-DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64
-I/home/anand/workspace/modules/snmp/explore/net-snmp-5.8.pre2/../inc/
-Ulinux -Dlinux=linux -c transports/snmpUDPIPv6Domain.c  -fPIC -DPIC -o
transports/.libs/snmpUDPIPv6Domain.o

For additional reference please find the configure options as well.

*./configure --without-openssl --with-default-snmp-version=2
--with-sys-contact=contact --with-sys-location=location
--with-logfile=/var/log/snmpd.log --with-persistent-directory=/var/net-snmp
--disable-manuals --disable-scripts --disable-mibs --without-perl-modules
--disable-embedded-perl --enable-mini-agent --enable-fast-install
--enable-ipv6 --with-transports=UDPIPv6
--with-cflags=-I/home/anand/workspace/modules/snmp/explore/net-snmp-5.8.pre2/../inc/*




On Fri, Mar 22, 2019 at 3:22 PM Magnus Fromreide <ma...@lysator.liu.se>
wrote:

> On Fri, Mar 22, 2019 at 01:15:52PM +0530, prabu varadharajan wrote:
> > Dear All,
> >
> > Following is my project source code hierarchy,
> > + src
> >     |
> >     +---- snmp
> >     |
> >     +---- my_app
> >     |
> >     +---- inc
> >             |
> >             +---- local_snmp_macros.h
> >             +---- my_macros.h
> >
> > I have declared few functions and macros in both local_snmp_macros.h and
> > my_macros.h files which are being used by both snmp and my_app
> > applications. As of now I'm copying the header files before ./configure
> and
> > compilation from src/inc/ to src/snmp/agent/mibgroup and removing those
> on
> > clean which is not recommended. So now I would like to avoid this copying
> > overhead and include from src/inc itself.
> >
> > For this I have updated ./configure --with-cflags=-I$(pwd)/../inc and
> able
> > to build the application successfully but I'm getting following fatal
> errors.
> > In this case also I'm observing some* weird behaviour* like I have
> > included my_macros.h
> > and local_snmp_macros.h files in
> > src/snmp/include/net-snmp/library/snmp_logging.h whereas I'm getting
> fatal
> > errors for the *first one*(my_macros.h) only. I have tried exploring
> > Makefile.* and configure script as well but I could not resolve this one.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > *In file included from
> > ./include/net-snmp/output_api.h:181:0,                 from
> > ./include/net-snmp/library/snmp_client.h:32,                 from
> > ./include/net-snmp/varbind_api.h:102,                 from
> > ./include/net-snmp/library/snmp_api.h:33,                 from
> > ./include/net-snmp/definitions.h:23,                 from
> > ./include/net-snmp/types.h:462,                 from
> > include/net-snmp/library/snmpUDPIPv6Domain.h:11,                 from
> > module_tmp_header.h:164:./include/net-snmp/library/snmp_logging.h:7:23:
> > fatal error: my_macros.h: No such file or directorycompilation
> terminated.*
> >
> > *File include view for reference:*
> > #ifndef SNMP_LOGGING_H
> > #define SNMP_LOGGING_H
> >
> > #include <net-snmp/types.h>
> > #include <net-snmp/output_api.h>
> > #include "dummy.h"
> > #include <my_macros.h>
> > #include <local_snmp_macros.h>
> >
> > As per my understanding, I suspect the *configure* script only which
> could
> > have some bug. Please correct me if I'm wrong and help me to overcome
> from
> > this error.
> >
> > *Note: *I have observed same behaviour in noth Net-SNMP-5.5 and
> > Net-SNMP-5.8.pre2 as well.
> >
> > Please feel free to ask more details if required that I can provide to
> > resolve this issue. Or let me know if any reference link if this issue is
> > already reported and resolved.
>
> Could you please show the compile line before the error message (something
> like gcc blah blah something.c -o something.o)
>


-- 
With Best Regards,
Anandaprabu V <https://www.linkedin.com/in/anandaprabu-v-10867671/>
VVDN Technologies Pvt. Ltd <http://www.vvdntech.com/>, Chennai
Cell : +91 9500650885 | Skype : prabuvaradharajan
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to