Thanx for the reply, Dave. But my Makefile contains minimal things. And I
am not able to comprehend whether I am missing something or adding something
extra..Below is my Makefile for the cross compilation of subagent. Please
tell me what's the problem with this file..
--------------------------------------------------------------------------
----------------------------------------------
# Minimum environment and virtual path setup
SHELL = /bin/sh
srcdir = .
top_srcdir = ../..
# Paths
prefix = /home/tina/snmpdbinary
exec_prefix = /home/tina/snmpdbinary
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libdir = ${exec_prefix}/lib
datadir = ${prefix}/share
includedir = ${prefix}/include/net-snmp
ucdincludedir = ${prefix}/include/ucd-snmp
mandir = ${prefix}/man
man1dir = $(mandir)/man1
man3dir = $(mandir)/man3
man5dir = $(mandir)/man5
man8dir = $(mandir)/man8
snmplibdir = $(datadir)/snmp
mibdir = $(snmplibdir)/mibs
persistentdir = /var/net-snmp
SNMPINCLUDE=-I. -I../agent/mibgroup -I../agent -I../include
# Compiler arguments
CFLAGS
= -g -O2 -Dlinux -D_FILE_OFFSET_BITS=64 -D_LINUX -DCHIP_REVISION_USED=4
LIBTOOL = $(SHELL) $(top_builddir)/libtool
# Misc Compiling Stuff
CC =
/home/vinod/SW00005/SW00016R4_SclSource/mpc8xx/install/host/usr/bin/ppc-linu
x-gcc
# libtool definitions
.SUFFIXES: .c .o .lo
.c.lo:
$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(SNMPINCLUDE) $(CFLAGS) -c -o
$@ $<
top_builddir=../..
CPPFLAGS=-I../../include -I$(top_srcdir)/include -I. -I../.. -I$(srcdir) -I
$(srcdir)/../.. -I$(srcdir)/../../snmplib -I$(srcdir)/.. -I.. -I/home/vinod/
SW00005/SW -I/home/vinod/SW00005/SW/SCOR \ I/home/vinod/SW00005/SW/Linux
$(LIB_CFLAGS)
# Need a special .c -> .o definition here to make sure we place the
# object files in the sub directory.
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(SNMPINCLUDE) -o $@ $<
LOBJS = jcastrmon.lo
OBJS2 = example-demon.o jcastrmon.o
TARGETS = example-demon
BUILDAGENTLIBS= `net-snmp-config --agent-libs`
#all: standardall $(LOBJS)
all: example-demon $(LOBJS)
example-demon: $(OBJS2)
$(CC) -g -o example-demon $(OBJS2) $(SNMPINCLUDE) $(BUILDAGENTLIBS)
--------------------------------------------------------------------------
------------------------------------------------------------
Thanx and Regards!
Tina
----- Original Message -----
From: "Dave Shield" <[EMAIL PROTECTED]>
To: "Tina Agarwal" <[EMAIL PROTECTED]>
Cc: "net-snmp-users" <[EMAIL PROTECTED]>
Sent: Tuesday, September 28, 2004 5:56 PM
Subject: Re: subagent issue
> > I have cross-compiled my master agent with options
> > like "--prefix
=/home/tina/snmpdbinary --enable-static --disable-shared"
> > given with configure. Due to this, my master agent does not make files
like
> > libnetsnmpagent.so in the /home/tina/snmpdbinary/lib folder. But when
I try
> > to cross compile my subagent (by making changes in its make file), it
> > generates error as:
> > /usr/local/lib/libnetsnmpagent.so: could not read symbols: Invalid
> > operation
> > collect2: ld returned 1 exit status
> > make: ***[example-demon] Error 1
> >
> > This may be because it tries to read the file from the location
> > /usr/local/lib which contains libnetsnmpagent.so as a result from
local
> > compilation.
>
> Your best bet is probably to remove the local installation
> completely before trying to compile the subagent.
> (Or at least to remove the shared libraries)
>
> Dave
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> Net-snmp-users mailing list
> [EMAIL PROTECTED]
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users