Problem compiling docsis 0.9.5 | docsis.org

You are here

Problem compiling docsis 0.9.5

3 posts / 0 new
Last post
Anonymous (not verified)
Problem compiling docsis 0.9.5
AttachmentSize
Plain text icon docsis_error.txt13.42 KB

Hi, please, could anybody help me, i can't compile docsis 0.9.5 in ubuntu 8.04 server, send a attach file with the report.

Thanks.

fadey
do you have libsnmp-dev

do you have libsnmp-dev installed?

t7206t (not verified)
Problem compiling docsis 0.9.5

The error looks like the following:
gcc -g -O2 -o docsis docsis.o ethermac.o md5.o docsis_encode.o docsis_decode.o docsis_snmp.o docsis_yy.o docsis_lex.o hmac_md5.o -L/usr/local/lib /usr/local/lib/libnetsnmp.so -lfl -lresolv -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
docsis.o: In function `add_eod_and_pad':
/root/docsis-0.9.5/src/docsis.c:77: undefined reference to `floor' ===> for some reasons, your make file may not have -lm (the math lib)
docsis_encode.o: In function `encode_hexstr':
/root/docsis-0.9.5/src/docsis_encode.c:337: undefined reference to `floor'
collect2: ld returned 1 exit status

to quick twist it, you can do
1. cd into the src directory
2. vi Makefile
3. serach for the LINK =....
then, add the following "-lm" into the LINK

LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -lm -o $@

4. then, make all again. it should work this time,

just in case, you may want to backup your Makefile under src

cheers,
t7206t

Log in or register to post comments