꾸벅.. 반갑습니다..
저는 리눅스 환경에서 네트웍크 관련 시뮬레이션을 구현하고자 하는 학생입니다.
제가 이렇게 글을 올리게 된 것은 다름이 아니라 시뮬레이션 프로그램이 유닉스, 리눅스
환경에서 동작하는 프로그램 인데 인스톨 과정에서 에러가 발생하여 이렇게 도움을 청합
니다. 아래에 에러 메세지는 make명령 실행시 발생된 에러 메세지 입니다..
make
rm -f version.o; gcc -o version.o -c -I. -DSIGRET=void -DNO_TK -O2 version.c
rm -f tcl2c
gcc -o tcl2c -I. -DSIGRET=void -DNO_TK -O2 tcl2c.c
rm -f ns_tcl.c
./tcl2c tcl_ns_default < ns_default.tcl >> ns_tcl.c
rm -f ns_tcl.o; gcc -o ns_tcl.o -c -I. -DSIGRET=void -DNO_TK -O2 ns_tcl.c
rm -f scheduler.o; c++ -o scheduler.o -c -I. -DSIGRET=void -DNO_TK -O2 scheduler.cc
rm -f link.o; c++ -o link.o -c -I. -DSIGRET=void -DNO_TK -O2 link.cc
rm -f lossy.o; c++ -o lossy.o -c -I. -DSIGRET=void -DNO_TK -O2 lossy.cc
rm -f ns_tclsh.o; c++ -o ns_tclsh.o -c -I. -DSIGRET=void -DNO_TK -O2 ns_tclsh.cc
rm -f Tcl.o; c++ -o Tcl.o -c -I. -DSIGRET=void -DNO_TK -O2 Tcl.cc
rm -f Tcl2.o; c++ -o Tcl2.o -c -I. -DSIGRET=void -DNO_TK -O2 Tcl2.cc
rm -f object.o; c++ -o object.o -c -I. -DSIGRET=void -DNO_TK -O2 object.cc
rm -f packet.o; c++ -o packet.o -c -I. -DSIGRET=void -DNO_TK -O2 packet.cc
rm -f node.o; c++ -o node.o -c -I. -DSIGRET=void -DNO_TK -O2 node.cc
rm -f agent.o; c++ -o agent.o -c -I. -DSIGRET=void -DNO_TK -O2 agent.cc
rm -f cbr.o; c++ -o cbr.o -c -I. -DSIGRET=void -DNO_TK -O2 cbr.cc
random.h: In function `static int Random::random()':
In file included from cbr.cc:43:
random.h:57: warning: implicit declaration of function `int random(...)'
rm -f misc.o; c++ -o misc.o -c -I. -DSIGRET=void -DNO_TK -O2 misc.cc
rm -f route.o; c++ -o route.o -c -I. -DSIGRET=void -DNO_TK -O2 route.cc
rm -f flow.o; c++ -o flow.o -c -I. -DSIGRET=void -DNO_TK -O2 flow.cc
flow.cc: In method `int FlowManager::command(int, const char *const *)':
flow.cc:163: warning: ANSI C++ forbids declaration `i' with no type
flow.cc:163: warning: ANSI C++ forbids declaration `j' with no type
flow.cc:198: warning: ANSI C++ forbids declaration `i' with no type
flow.cc:198: warning: ANSI C++ forbids declaration `j' with no type
flow.cc:234: warning: ANSI C++ forbids declaration `i' with no type
flow.cc:234: warning: ANSI C++ forbids declaration `j' with no type
flow.cc:234: warning: ANSI C++ forbids declaration `max' with no type
flow.cc:234: warning: ANSI C++ forbids declaration `drops' with no type
flow.cc:252: warning: ANSI C++ forbids declaration `i' with no type
flow.cc:252: warning: ANSI C++ forbids declaration `j' with no type
flow.cc:252: warning: ANSI C++ forbids declaration `max' with no type
flow.cc:252: warning: ANSI C++ forbids declaration `drops' with no type
flow.cc:270: warning: ANSI C++ forbids declaration `i' with no type
flow.cc:270: warning: ANSI C++ forbids declaration `j' with no type
flow.cc:270: warning: ANSI C++ forbids declaration `min' with no type
flow.cc:270: warning: ANSI C++ forbids declaration `drops' with no type
flow.cc:288: warning: ANSI C++ forbids declaration `i' with no type
flow.cc:288: warning: ANSI C++ forbids declaration `j' with no type
flow.cc:288: warning: ANSI C++ forbids declaration `min' with no type
flow.cc:288: warning: ANSI C++ forbids declaration `drops' with no type
flow.cc: In method `void FlowManager::freeflows()':
flow.cc:647: warning: ANSI C++ forbids declaration `i' with no type
flow.cc: In method `void Flow::resetcounters()':
flow.cc:951: warning: ANSI C++ forbids declaration `i' with no type
flow.cc:952: warning: ANSI C++ forbids declaration `j' with no type
rm -f tcp.o; c++ -o tcp.o -c -I. -DSIGRET=void -DNO_TK -O2 tcp.cc
rm -f tcp-reno.o; c++ -o tcp-reno.o -c -I. -DSIGRET=void -DNO_TK -O2 tcp-reno.cc
rm -f loss-monitor.o; c++ -o loss-monitor.o -c -I. -DSIGRET=void -DNO_TK -O2 loss-monitor.cc
rm -f ivs.o; c++ -o ivs.o -c -I. -DSIGRET=void -DNO_TK -O2 ivs.cc
rm -f data-source.o; c++ -o data-source.o -c -I. -DSIGRET=void -DNO_TK -O2 data-source.cc
rm -f red.o; c++ -o red.o -c -I. -DSIGRET=void -DNO_TK -O2 red.cc
random.h: In function `static int Random::random()':
In file included from red.cc:70:
random.h:57: warning: implicit declaration of function `int random(...)'
rm -f drop-tail.o; c++ -o drop-tail.o -c -I. -DSIGRET=void -DNO_TK -O2 drop-tail.cc
rm -f cbq.o; c++ -o cbq.o -c -I. -DSIGRET=void -DNO_TK -O2 cbq.cc
cbq.cc: In method `int CBQueue::command(int, const char *const *)':
cbq.cc:411: warning: ANSI C++ forbids declaration `i' with no type
cbq.cc: In method `struct PenaltyBoxEntry * CBQueue::findpbox(class Flow *)':
cbq.cc:847: warning: ANSI C++ forbids declaration `i' with no type
cbq.cc: In method `struct PenaltyBoxEntry * CBQueue::findpbox(class Packet *)':
cbq.cc:857: warning: ANSI C++ forbids declaration `i' with no type
rm -f trace.o; c++ -o trace.o -c -I. -DSIGRET=void -DNO_TK -O2 trace.cc
rm -f random.o; c++ -o random.o -c -I. -DSIGRET=void -DNO_TK -O2 random.cc
random.h: In function `static int Random::random()':
In file included from random.cc:40:
random.h:57: warning: implicit declaration of function `int random(...)'
random.cc: In function `static void Random::seed(int)':
random.cc:52: warning: implicit declaration of function `int srandom(...)'
rm -f tcp-newreno.o; c++ -o tcp-newreno.o -c -I. -DSIGRET=void -DNO_TK -O2 tcp-newreno.cc
rm -f scoreboard.o; c++ -o scoreboard.o -c -I. -DSIGRET=void -DNO_TK -O2 scoreboard.cc
rm -f scoreboardrh.o; c++ -o scoreboardrh.o -c -I. -DSIGRET=void -DNO_TK -O2 scoreboardrh.cc
rm -f tcp-sack1.o; c++ -o tcp-sack1.o -c -I. -DSIGRET=void -DNO_TK -O2 tcp-sack1.cc
rm -f loss-policy.o; c++ -o loss-policy.o -c -I. -DSIGRET=void -DNO_TK -O2 loss-policy.cc
random.h: In function `static int Random::random()':
In file included from loss-policy.cc:46:
random.h:57: warning: implicit declaration of function `int random(...)'
rm -f message.o; c++ -o message.o -c -I. -DSIGRET=void -DNO_TK -O2 message.cc
random.h: In function `static int Random::random()':
In file included from message.cc:43:
random.h:57: warning: implicit declaration of function `int random(...)'
rm -f tcplib-telnet.o; c++ -o tcplib-telnet.o -c -I. -DSIGRET=void -DNO_TK -O2 tcplib-telnet.cc
random.h: In function `static int Random::random()':
In file included from tcplib-telnet.cc:5:
random.h:57: warning: implicit declaration of function `int random(...)'
rm -f rtglib.o; c++ -o rtglib.o -c -I. -DSIGRET=void -DNO_TK -O2 rtglib.cc
rtglib.cc: In method `void rtObject::intf_changed()':
rtglib.cc:205: warning: ANSI C++ forbids declaration `i' with no type
rtglib.cc: In method `void rtObject::compute_LocRIB()':
rtglib.cc:260: warning: ANSI C++ forbids declaration `i' with no type
rtglib.cc: In method `void rtObject::dump_routes(class Trace *)':
rtglib.cc:297: warning: ANSI C++ forbids declaration `i' with no type
rtglib.cc: In method `void rtProto::init()':
rtglib.cc:429: warning: ANSI C++ forbids declaration `i' with no type
rtglib.cc: In method `void rtProto::send_update(struct rtPeer *)':
rtglib.cc:625: warning: ANSI C++ forbids declaration `i' with no type
rm -f tcp-vegas.o; c++ -o tcp-vegas.o -c -I. -DSIGRET=void -DNO_TK -O2 tcp-vegas.cc
rm -f fulltcp.o; c++ -o fulltcp.o -c -I. -DSIGRET=void -DNO_TK -O2 fulltcp.cc
random.h: In function `static int Random::random()':
In file included from fulltcp.cc:76:
random.h:57: warning: implicit declaration of function `int random(...)'
fulltcp.cc: In method `FullTcp::~FullTcp()':
fulltcp.cc:148: warning: ANSI C++ forbids declaration `i' with no type
rm -f srm.o; c++ -o srm.o -c -I. -DSIGRET=void -DNO_TK -O2 srm.cc
random.h: In function `static int Random::random()':
In file included from srm.cc:6:
random.h:57: warning: implicit declaration of function `int random(...)'
rm -f srm-ctl.o; c++ -o srm-ctl.o -c -I. -DSIGRET=void -DNO_TK -O2 srm-ctl.cc
rm -f tcp-fackrh.o; c++ -o tcp-fackrh.o -c -I. -DSIGRET=void -DNO_TK -O2 tcp-fackrh.cc
random.h: In function `static int Random::random()':
In file included from tcp-fackrh.cc:43:
random.h:57: warning: implicit declaration of function `int random(...)'
rm -f tcp-fack.o; c++ -o tcp-fack.o -c -I. -DSIGRET=void -DNO_TK -O2 tcp-fack.cc
random.h: In function `static int Random::random()':
In file included from tcp-fack.cc:43:
random.h:57: warning: implicit declaration of function `int random(...)'
rm -f tcp-sink.o; c++ -o tcp-sink.o -c -I. -DSIGRET=void -DNO_TK -O2 tcp-sink.cc
tcp-sink.cc: In method `void DelAckSink::recv(class Packet *)':
tcp-sink.cc:171: request for member `next_' is ambiguous in multiple inheritance lattice
tcp-sink.cc:187: request for member `next_' is ambiguous in multiple inheritance lattice
tcp-sink.cc: In method `void DelAckSink::timeout(int)':
tcp-sink.cc:197: request for member `next_' is ambiguous in multiple inheritance lattice
tcp-sink.cc: In method `void SackStack::reset()':
tcp-sink.cc:220: warning: ANSI C++ forbids declaration `i' with no type
tcp-sink.cc: In method `void SackStack::push(int = 0)':
tcp-sink.cc:229: warning: ANSI C++ forbids declaration `i' with no type
tcp-sink.cc: In method `void SackStack::pop(int = 0)':
tcp-sink.cc:235: warning: ANSI C++ forbids declaration `i' with no type
tcp-sink.cc: In method `SackStack::SackStack(int)':
tcp-sink.cc:247: warning: ANSI C++ forbids declaration `i' with no type
make: *** [tcp-sink.o] Error 1
[root@fgreen ns-1.4]#
그리고 여기는 Makefile의 내용 입니다...
.SUFFIXES:.cc $(.SUFFIXES)
.cc.o:
rm -f $@; $(C++) -o $@ -c $(CFLAGS) $*.cc
.c.o:
rm -f $@; $(CC) -o $@ -c $(CFLAGS) $*.c
CC = gcc
C++ = c++
CCOPT = -O2
MKDEP = ./mkdep
INCLUDE= -I.
MKDEP_FLAGS = -I/usr/lib/gcc-lib/i586-liko-linux/egcs-2.91.66/include
LIB = -ltcl7.5 -lm
# INCLUDE = -I.
DEFINE = -DSIGRET=void -DNO_TK
CFLAGS = $(INCLUDE) $(DEFINE) $(CCOPT)
STATIC =
OBJ1 = version.o ns_tcl.o
OBJ2 = scheduler.o link.o lossy.o ns_tclsh.o Tcl.o Tcl2.o object.o
packet.o node.o agent.o cbr.o misc.o route.o flow.o
tcp.o tcp-reno.o loss-monitor.o ivs.o
data-source.o red.o drop-tail.o cbq.o trace.o random.o
tcp-newreno.o scoreboard.o scoreboardrh.o tcp-sack1.o loss-policy.o
message.o tcplib-telnet.o rtglib.o
tcp-vegas.o fulltcp.o srm.o srm-ctl.o tcp-fackrh.o tcp-fack.o tcp-sink.o
OBJ = $(OBJ1) $(OBJ2)
SRC = $(OBJ1:.o=.c) $(OBJ2:.o=.cc)
ns: $(OBJ)
$(C++) $(STATIC) -o $@ $(CFLAGS) $(OBJ) $(LIB)
ns.dyn: $(OBJ)
$(C++) -o $@ $(CFLAGS) $(OBJ) $(LIB)
tcl2c: tcl2c.c
rm -f $@
$(CC) -o $@ $(CFLAGS) tcl2c.c
version.c: VERSION
rm -f version.c
cat VERSION | sed 's/.*/char version_string<> = "&";/' > version.c
clean:
rm -f ns *.o core core.ns tcl2c ns_tcl.c
config.log config.cache config.status
ns_tcl.c: tcl2c ns_default.tcl
rm -f $@
./tcl2c tcl_ns_default < ns_default.tcl >> $@
install: ns
install -m 775 ns $(BINDIR)/bin
tags: force
ctags -wt *.c *.h
depend: $(SRC)
$(MKDEP) $(MKDEP_FLAGS) $(CFLAGS) $(SRC)
tar: force
@cwd=`pwd` ; dir=`basename $$cwd` ;
name=ns-`cat VERSION | tr A-Z a-z` ;
tar=ns-`cat VERSION`.tar.gz ;
list="" ;
for i in `cat FILES` ; do list="$$list $$name/$$i" ; done;
echo
"(rm -f $$tar; cd .. ; ln -s $$dir $$name)" ;
(rm -f $$tar; cd .. ; ln -s $$dir $$name) ;
echo
"(cd .. ; tar cfh $$tar [lots of files])" ;
(cd .. ; tar cfh - $$list) | gzip -c > $$tar ;
echo
"rm ../$$name; chmod 444 $$tar" ;
rm ../$$name; chmod 444 $$tar
force:
혹시 여기에 대해서 아시는 분께서는 저에게 멜이라도...
아니면 관련 사이트 라도 갈켜주세여...
그럼, 언제난 행복하기를...
배움에 목말라 하는 학생이........