i installed net-snmp-5.3.2 on fedora11 platform below process


=================================================================


./configure --host=i386-linux --build=ppc-linux --target=ppc-linux --prefix=/usr --exec-prefix=/usr --enable-shared --disable-debugging --enable-mini-agent --with-mibs="IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB:NEXCOMM-EXAM-MIB:NEXCOMM-FAN-MIB:NEXCOMM-LOG-MIB:NEXCOMM-SMI" --with-mib-modules="agentx ucd-snmp/dlmod" --with-enterprise-notification-oid=.1.3.6.1.4.1.5927.99.12.1 --sysconfdir=/etc --localstatedir=/var --enable-internal-md5 --enable-snmpv1 --enable-snmpv2c --disable-embedded-perl --with-cc=ppc_82xx-gcc --with-linkcc=ppc_82xx-gcc --with-ar=ppc_82xx-ar --with-endianness=big --with-install-prefix=/home/proj/msap/apps/sychoi/install --without-rpm | tee snmp.config.log



make | tee snmp.config.log

perl -pi -e "s|^prefix=/usr|prefix=/home/proj/msap/apps/sychoi/install/usr|" net-snmp-config

perl -pi -e "s|^exec_prefix=/usr|exec_prefix=/home/proj/msap/apps/sychoi/install/usr|" net-snmp-config

make install | tee snmp.intall.log


===================================================================


and i make a agentx program with my Makefile and exam.c and log.c and fan.c


agentx Makefile is below..


===================================================================

PROJDIR = /home/proj/msap/apps/sychoi
INSTDIR = $(PROJDIR)/rootfs/usr/sbin
SNMPINC = /home/proj/msap/apps/sychoi/install/usr
CC=ppc_82xx-gcc
STRIP=ppc_82xx-strip

OBJS += agentx.o
OBJS += fan.o
OBJS += log.o
OBJS += exam.o

TARGETS = agentx

# LIBS=$(PROJDIR)/lib/libnexcmd/libnexcmd.a -lpthread

# CFLAGS = -I. -I$(PROJDIR)/include/libnexcmd -I$(PROJDIR)/include
#CFLAGS = -I. 'net-snmp-config --cflags'
CFLAGS += -O2 -Dlinux -I. -I$(SNMPINC)/include
BUILDLIBS = -L$(SNMPINC)/lib -lnetsnmp -lcrypto -lm
#BUILDLIBS =+ 'net-snmp-config --libs'
BUILDAGENTLIBS = -L$(SNMPINC)/lib -lnetsnmpmibs -lnetsnmpagent -lnetsnmphelpers -lnetsnmp -ldl -lcrypto -lm
#BUILDAGEXTLIBS =+'net-snmp-config --agent-libs'


# shared library flags (assumes gcc)
DLFLAGS=-fPIC -shared -lpthread

all: $(TARGETS)

agentx: $(OBJS)
#       $(CC) -o agentx $(OBJS) $(LIBS) $(BUILDLIBS) $(BUILDAGENTLIBS)
        $(CC) -o agentx $(OBJS) $(BUILDLIBS) $(BUILDAGENTLIBS)
        $(STRIP) agentx

install:
        cp -a agentx $(INSTDIR)

clean:
        rm -f $(OBJS) $(TARGETS)

                                                              ===================================================================


shortly... i succeeded crosscompilingl net-snmp-5.3.2 on fedora11 and making agentx..


i upload snmpd and agent file on my target board...


first i command "snmpwalk -v 1 -c public 172.16.0.100 system

i received reply...

but i command "snmpwalk -v 1 -c public 172.16.0.100 NEXCOMM-FAN_MIB::fan

i couldn't receive reply...at all...


agentx involved fan and exam and log...

if agentx is executed normally, when i command "snmpwalk -v 1 -c public 172.16.0.100 NEXCOMM-FAN-MIB::fan", i must receive the reply..


i copyed NEXCOMM MIBS in /usr/local/share/snmp/mibs/ directory on my target board..

and command like this

"MIBS=ALL" and "export MIBS"


and i copyed snmpd libraries but it is no use...


honestly... there is no mibs directory and no snmp directory and no share directory..on my target board...

i make a share and snmp and mibs directory in /usr/local/ path...

there is even no .bahsrc


i don't konw how could snmpd recognized NEXCOMM MIBS...

i think the problem is snmp is not recognize NEXCOMM MIBS...


honestly... i simply upload snmpd and agentx file.. and  copy NEXCOMM-MIBS in /usr/local/share/snmp/mibs directory....

and copy snmpd libraries in /lib directory...


there 's anything i must do to execute snmpd nomarlly?!....


plese...help me...


it is first time i cosscompile net-snmp ....


i 'll wait for your advice...


have a good day..


ps...sorry for my poor english again...^^;






---------[ 받은 메일 내용 ]----------
제목 : Re: agentx make error
날짜 : Tue, 23 Mar 2010 09:42:43 -0400
보낸이 :Robert Story <[email protected]>
받는이 :"생각하기" <[email protected]>
함께받는이 : [email protected]
On Tue, 23 Mar 2010 15:08:43 +0900 (KST) 생각하기 wrote:
> fan.o: In function `handle_Fm2rpms':
> fan.c:(.text+0x0): multiple definition of `handle_Fm2rpms'
> agentx.o:agentx.c:(.text+0x2190): first defined here

seems like you've got lots of code duplicated in fan.c and agentx.c.

> /usr/bin/ld: skipping incompatible /home/sychoi/install/usr/lib/libnetsnmp.so when searching for -lnetsnmp

are you cross-compiling? or did you copy libraries from some other system?

 




미아찾기 캠페인
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to