[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Help porting net-snmp agent

You shouldn't use any files from /usr/local/.

The Makefile may look something like this (not tested):

include $(AXIS_TOP_DIR)/tools/build/Rules.axis
PROGS = snmpd
OBJS  = snmpd.o
LDLIBS = -lnetsnmpagent -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp -ldl -lcrypto -lm

        $(CC) $^ $(LDLIBS) -o $@

        rm -f $(PROGS) *.o core

(This requires that you have already compiled and installed all the libs
in your tree). I will also you send a Makefile from net-snmp/agent that we
are using internally (the list rejects email with too large attachements).


-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com">mailto:owner-dev-etrax@xxxxxxx.com] On Behalf Of Daniel Fraile Vergel
Sent: Thursday, June 26, 2003 12:11 PM
To: dev-etrax
Subject: Help porting net-snmp agent

        I'm trying to use the net-snmp agent with the dev-board LX. I'm new using Linux, so I have a lack of knowledge about working with it. I am able to compile and link the code on a PC platform, but I can't create an executable for the Etrax board. I suppose that I use the wrong options with gcc-cris compiler. 
I'm using this Makefile:

include $(APPS)/Rules.elinux

PROGS = snmpd

compilerflags := -g -O2 -Dlinux -I. -I/usr/local/include netsnmpflags := -L/usr/local/lib -lnetsnmpagent -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp -ldl -lcrypto -lm

OBJS          = snmpd.o

        $(CC) $^ $(netsnmpflags) -o $@

        rm -f $(PROGS) *.o core

And when I run it with make snmpd, all I have is this error message:

[daniel@Terminus snmpd]$ make snmpd
gcc-cris -mlinux -isystem /home/daniel/axis/devboard_lx/target/cris-axis-linux-gnu/include snmpd.o -L/usr/local/lib -lnetsnmpagent -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp -ldl -lcrypto -lm -o snmpd
/usr/local/lib/libnetsnmpagent.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [snmpd] Error 1

Could you help me, making that executable?.
Thanks in advance
Daniel Fraile Vergel
W-Onesys S.L.
Tel. 93 590 11 49 Fax. 93 590 11 57