소스와 Makefile좀 봐 주시겠습니까?
글쓴이: 사랑천사 / 작성시간: 수, 2005/12/21 - 5:45오후
안녕하세요? 소스와 Makefile좀 봐 주셨으면 합니다 음. 이게 제 소스도 아니고... 음... 서버에 올린 어떤 유저가 사용 하려고 컴파일 하려 하는 소스인데 문제가 생기는 군요. 컴파일 할 때 마다 음...
환경은 아래와 같고 데비안 3.1입니다.
Kernel:2.6.14.3-1LANET
CPU:i686 (Intel Celeron 1.7GHz)
MEM:512MB (DDR, 266MHz)
gcc는 3.3과 2.95를 모두 사용 해 봤고요. 음. 아래 내용은 2.95를 사용 해서 컴파일 시도시의 내용입니다.
그럼...
-- comm.h --
/* ************************************************************************ * File: comm.h Part of CircleMUD * * Usage: header file: prototypes of public communication functions * * * * All rights reserved. See license.doc for complete information. * * * * Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University * * CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. * ************************************************************************ */ #define NUM_RESERVED_DESCS 8 #define COPYOVER_FILE "copyover.dat" /* comm.c */ void new_send_to_all(char *messg); void send_to_all(char *messg); void send_to_except(char *messg, struct char_data *ch); void send_to_char(char *messg, struct char_data *ch); void other_to_all(char *messg, struct char_data *ch); void room_send_all(char *msg,int room); void fight_info_send(char *msg); void company_send_to_all(char *messg, int cnum); void send_to_club(char *messg, int num); void send_to_room(char *messg, int room); void send_to_outdoor(char *messg); void perform_to_all(char *messg, struct char_data *ch); void close_socket(struct descriptor_data *d); void brag(struct char_data *ch, struct char_data *victim); void perform_act(char *orig, struct char_data *ch, struct obj_data *obj, void *vict_obj, struct char_data *to); char *hit_graph(double maxhit, double hit); void act(char *str, int hide_invisible, struct char_data *ch, struct obj_data *obj, void *vict_obj, int type); #define TO_ROOM 1 #define TO_VICT 2 #define TO_NOTVICT 3 #define TO_CHAR 4 #define TO_SLEEP 128 /* to char, even if sleeping */ int write_to_descriptor(socket_t desc, char *txt); void write_to_q(char *txt, struct txt_q *queue, int aliased); void write_to_output(const char *txt, struct descriptor_data *d); void send_skip_message(const char *txt, struct descriptor_data *t); void page_string(struct descriptor_data *d, char *str, int keep_internal); #define SEND_TO_Q(messg, desc) write_to_output((messg), desc) /*#define SEND_TO_Q(messg, desc) send_skip_message((messg), desc)*/ #define USING_SMALL(d) ((d)->output == (d)->small_outbuf) #define USING_LARGE(d) (!USING_SMALL(d)) typedef RETSIGTYPE sigfunc(int); /* Function prototypes for brain-dead OS's */ #if defined(__COMM_C__) && defined(__GNUC__) #ifndef accept int accept(); #endif #ifndef bind int bind(); #endif #ifndef chdir int chdir(); #endif #ifndef close int close(); #endif /* #ifndef fcntl int fcntl(); #endif */ #ifndef getpeername int getpeername(); #endif #ifndef getrlimit int getrlimit(); #endif #ifndef getsockname int getsockname(); #endif #ifndef htonl u_long htonl(); #endif #ifndef htons u_short htons(); #endif #ifndef listen int listen(); #endif #ifndef ntohl u_long ntohl(); #endif #ifndef read int read(); #endif #ifndef select int select(); #endif #ifndef setitimer int setitimer(); #endif #ifndef setrlimit int setrlimit(); #endif #ifndef setsockopt int setsockopt(); #endif #ifndef socket int socket(); #endif #ifndef write int write(); #endif #endif /* __COMM_C__ */
-- Makefile --
# Generated automatically from Makefile.in by configure. # CircleMUD 3.0 Makefile.in - Makefile template used by 'configure' # # C compiler to use CC = gcc-2.95 # Any special flags you want to pass to the compiler MYFLAGS = -Wall -fno-strict-prototypes #flags for profiling (see hacker.doc for more information) PROFILE = ############################################################################## # Do Not Modify Anything Below This Line (unless you know what you're doing) # ############################################################################## CFLAGS = -g -O $(MYFLAGS) $(PROFILE) OBJFILES = comm.o act.comm.o act.informative.o act.movement.o act.item.o \ act.offensive.o act.other.o act.social.o act.wizard.o ban.o boards.o \ castle.o class.o config.o constants.o db.o fight.o company.o graph.o handler.o \ house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \ objsave.o olc.o shop.o spec_assign.o spec_procs.o spell_parser.o \ spells.o utils.o weather.o redit.o oedit.o zedit.o medit.o sedit.o clan.o \ hash.o default: .accepted $(MAKE) ../bin/circle .accepted: @./licheck more utils: .accepted $(MAKE) ../bin/autowiz $(MAKE) ../bin/delobjs $(MAKE) ../bin/listrent $(MAKE) ../bin/mudpasswd $(MAKE) ../bin/play2to3 $(MAKE) ../bin/purgeplay $(MAKE) ../bin/shopconv $(MAKE) ../bin/showplay $(MAKE) ../bin/sign $(MAKE) ../bin/split $(MAKE) ../bin/wld2html all: .accepted $(MAKE) ../bin/circle $(MAKE) utils circle: $(MAKE) ../bin/circle autowiz: $(MAKE) ../bin/autowiz delobjs: $(MAKE) ../bin/delobjs listrent: $(MAKE) ../bin/listrent mudpasswd: $(MAKE) ../bin/mudpasswd play2to3: $(MAKE) ../bin/play2to3 purgeplay: $(MAKE) ../bin/purgeplay shopconv: $(MAKE) ../bin/shopconv showplay: $(MAKE) ../bin/showplay sign: $(MAKE) ../bin/sign split: $(MAKE) ../bin/split wld2html: $(MAKE) ../bin/wld2html ../bin/autowiz: util/autowiz.c conf.h sysdep.h structs.h utils.h db.h $(CC) $(CFLAGS) -o ../bin/autowiz util/autowiz.c ../bin/delobjs: util/delobjs.c conf.h sysdep.h structs.h $(CC) $(CFLAGS) -o ../bin/delobjs util/delobjs.c ../bin/listrent: util/listrent.c conf.h sysdep.h structs.h $(CC) $(CFLAGS) -o ../bin/listrent util/listrent.c ../bin/mudpasswd: util/mudpasswd.c conf.h sysdep.h structs.h utils.h $(CC) $(CFLAGS) -o ../bin/mudpasswd util/mudpasswd.c ../bin/play2to3: util/play2to3.c $(CC) $(CFLAGS) -o ../bin/play2to3 util/play2to3.c ../bin/purgeplay: util/purgeplay.c conf.h sysdep.h structs.h utils.h $(CC) $(CFLAGS) -o ../bin/purgeplay util/purgeplay.c ../bin/shopconv: util/shopconv.c conf.h sysdep.h structs.h db.h utils.h shop.h $(CC) $(CFLAGS) -o ../bin/shopconv util/shopconv.c ../bin/showplay: util/showplay.c conf.h sysdep.h structs.h $(CC) $(CFLAGS) -o ../bin/showplay util/showplay.c ../bin/sign: util/sign.c conf.h sysdep.h $(CC) $(CFLAGS) -o ../bin/sign util/sign.c ../bin/split: util/split.c $(CC) $(CFLAGS) -o ../bin/split util/split.c ../bin/wld2html: util/wld2html.c $(CC) $(CFLAGS) -o ../bin/wld2html util/wld2html.c ../bin/circle : $(OBJFILES) $(CC) -o ../bin/circle $(PROFILE) $(OBJFILES) clean: rm -f *.o # Dependencies for the object files (automagically generated with # gcc -MM) act.comm.o: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ handler.h db.h screen.h $(CC) -c $(CFLAGS) act.comm.c act.informative.o: act.informative.c conf.h sysdep.h structs.h utils.h comm.h \ interpreter.h handler.h db.h spells.h screen.h $(CC) -c $(CFLAGS) act.informative.c act.item.o: act.item.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ handler.h db.h spells.h $(CC) -c $(CFLAGS) act.item.c act.movement.o: act.movement.c conf.h sysdep.h structs.h utils.h comm.h \ interpreter.h handler.h db.h spells.h house.h $(CC) -c $(CFLAGS) act.movement.c act.offensive.o: act.offensive.c conf.h sysdep.h structs.h utils.h comm.h \ interpreter.h handler.h db.h spells.h $(CC) -c $(CFLAGS) act.offensive.c act.other.o: act.other.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ handler.h db.h spells.h screen.h house.h $(CC) -c $(CFLAGS) act.other.c act.social.o: act.social.c conf.h sysdep.h structs.h utils.h comm.h \ interpreter.h handler.h db.h spells.h $(CC) -c $(CFLAGS) act.social.c act.wizard.o: act.wizard.c conf.h sysdep.h structs.h utils.h comm.h \ interpreter.h handler.h db.h spells.h house.h screen.h $(CC) -c $(CFLAGS) act.wizard.c ban.o: ban.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h db.h $(CC) -c $(CFLAGS) ban.c boards.o: boards.c conf.h sysdep.h structs.h utils.h comm.h db.h boards.h \ interpreter.h handler.h $(CC) -c $(CFLAGS) boards.c castle.o: castle.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ handler.h db.h spells.h $(CC) -c $(CFLAGS) castle.c class.o: class.c conf.h sysdep.h structs.h db.h utils.h spells.h interpreter.h $(CC) -c $(CFLAGS) class.c comm.o: comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \ db.h house.h clan.h $(CC) -c $(CFLAGS) comm.c config.o: config.c conf.h sysdep.h structs.h $(CC) -c $(CFLAGS) config.c constants.o: constants.c conf.h sysdep.h structs.h $(CC) -c $(CFLAGS) constants.c db.o: db.c conf.h sysdep.h structs.h utils.h db.h comm.h handler.h spells.h mail.h \ interpreter.h house.h clan.h $(CC) -c $(CFLAGS) db.c fight.o: fight.c conf.h sysdep.h structs.h utils.h comm.h handler.h interpreter.h \ db.h spells.h screen.h $(CC) -c $(CFLAGS) fight.c company.o: company.c conf.h sysdep.h structs.h utils.h comm.h handler.h \ interpreter.h db.h spells.h screen.h $(CC) -c $(CFLAGS) company.c graph.o: graph.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h \ db.h spells.h $(CC) -c $(CFLAGS) graph.c handler.o: handler.c conf.h sysdep.h structs.h utils.h comm.h db.h handler.h \ interpreter.h spells.h $(CC) -c $(CFLAGS) handler.c house.o: house.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \ utils.h house.h $(CC) -c $(CFLAGS) house.c interpreter.o: interpreter.c conf.h sysdep.h structs.h comm.h interpreter.h db.h \ utils.h spells.h handler.h mail.h screen.h clan.h $(CC) -c $(CFLAGS) interpreter.c limits.o: limits.c conf.h sysdep.h structs.h utils.h spells.h comm.h db.h \ handler.h $(CC) -c $(CFLAGS) limits.c magic.o: magic.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h db.h $(CC) -c $(CFLAGS) magic.c mail.o: mail.c conf.h sysdep.h structs.h utils.h comm.h db.h interpreter.h \ handler.h mail.h $(CC) -c $(CFLAGS) mail.c mobact.o: mobact.c conf.h sysdep.h structs.h utils.h db.h comm.h interpreter.h \ handler.h spells.h $(CC) -c $(CFLAGS) mobact.c modify.o: modify.c conf.h sysdep.h structs.h utils.h interpreter.h handler.h db.h \ comm.h spells.h mail.h boards.h clan.h $(CC) -c $(CFLAGS) modify.c objsave.o: objsave.c conf.h sysdep.h structs.h comm.h handler.h db.h \ interpreter.h utils.h spells.h $(CC) -c $(CFLAGS) objsave.c olc.o: olc.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h handler.h db.h \ olc.h screen.h $(CC) -c $(CFLAGS) olc.c random.o: random.c $(CC) -c $(CFLAGS) random.c shop.o: shop.c conf.h sysdep.h structs.h comm.h handler.h db.h interpreter.h \ utils.h shop.h $(CC) -c $(CFLAGS) shop.c spec_assign.o: spec_assign.c conf.h sysdep.h structs.h db.h interpreter.h \ utils.h $(CC) -c $(CFLAGS) spec_assign.c spec_procs.o: spec_procs.c conf.h sysdep.h structs.h utils.h comm.h \ interpreter.h handler.h db.h spells.h $(CC) -c $(CFLAGS) spec_procs.c spell_parser.o: spell_parser.c conf.h sysdep.h structs.h utils.h interpreter.h \ spells.h handler.h comm.h db.h $(CC) -c $(CFLAGS) spell_parser.c spells.o: spells.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h \ db.h $(CC) -c $(CFLAGS) spells.c utils.o: utils.c conf.h sysdep.h structs.h utils.h comm.h screen.h spells.h \ handler.h $(CC) -c $(CFLAGS) utils.c weather.o: weather.c conf.h sysdep.h structs.h utils.h comm.h handler.h \ interpreter.h db.h $(CC) -c $(CFLAGS) weather.c clan.o: clan.c conf.h sysdep.h structs.h db.h utils.h spells.h \ interpreter.h screen.h clan.h $(CC) -c $(CFLAGS) clan.c redit.o: redit.c conf.h sysdep.h structs.h utils.h comm.h boards.h \ db.c olc.h $(CC) -c $(CFLAGS) redit.c oedit.o: oedit.c conf.h sysdep.h structs.h utils.h comm.h boards.h spells.h \ db.h olc.h shop.h $(CC) -c $(CFLAGS) oedit.c zedit.o: zedit.c conf.h sysdep.h structs.h utils.h comm.h db.h olc.h $(CC) -c $(CFLAGS) zedit.c medit.o: medit.c conf.h sysdep.h structs.h utils.h comm.h spells.h shop.h \ db.h olc.h handler.h $(CC) -c $(CFLAGS) medit.c sedit.o: sedit.c conf.h sysdep.h structs.h utils.h comm.h db.h olc.h shop.h $(CC) -c $(CFLAGS) sedit.c hash.o :hash.c conf.h sysdep.h structs.h utils.h comm.h \ interpreter.h handler.h db.h $(CC) -c $(CFLAGS) hash.c
-- Error --
mud@lanet:~/dw/src$ make make ../bin/circle make[1]: Entering directory `/home/mud/dw/src' gcc-2.95 -c -g -O -Wall -fno-strict-prototypes comm.c In file included from comm.c:30: comm.h:55: parse error before `sigfunc' comm.h:55: warning: type defaults to `int' in declaration of `sigfunc' comm.h:55: warning: data definition has no type or storage class comm.c: In function `game_loop': comm.c:629: `errno' undeclared (first use in this function) comm.c:629: (Each undeclared identifier is reported only once comm.c:629: for each function it appears in.) comm.c:629: INTR' undeclared (first use in this function) comm.c: In function `heartbeat': comm.c:937: warning: unknown escape sequence )' comm.c: In function `make_prompt': comm.c:1211: warning: too many arguments for format comm.c: In function `write_to_descriptor': comm.c:1547: `errno' undeclared (first use in this function) comm.c:1547: AGAIN' undeclared (first use in this function) comm.c: In function `process_input': comm.c:1592: `errno' undeclared (first use in this function) comm.c:1592: AGAIN' undeclared (first use in this function) comm.c: In function `nonblock': comm.c:1891: warning: implicit declaration of function `fcntl' comm.c:1891: _GETFL' undeclared (first use in this function) comm.c:1892: `O_NDELAY' undeclared (first use in this function) comm.c:1893: _SETFL' undeclared (first use in this function) comm.c: At top level: comm.c:1905: parse error before `checkpointing' comm.c:1906: warning: return-type defaults to `int' comm.c: In function `checkpointing': comm.c:1912: warning: control reaches end of non-void function comm.c: At top level: comm.c:1915: parse error before `reread_wizlists' comm.c:1916: warning: return-type defaults to `int' comm.c: In function `reread_wizlists': comm.c:1921: warning: control reaches end of non-void function comm.c: At top level: comm.c:1924: parse error before `unrestrict_game' comm.c:1925: warning: return-type defaults to `int' comm.c: In function `unrestrict_game': comm.c:1934: warning: control reaches end of non-void function comm.c: At top level: comm.c:1937: parse error before `hupsig' comm.c:1938: warning: return-type defaults to `int' comm.c: In function `signal_setup': comm.c:1984: storage size of `itime' isn't known comm.c:1989: warning: passing arg 2 of `signal' from incompatible pointer type comm.c:1995: warning: passing arg 2 of `signal' from incompatible pointer type comm.c:2007: TIMER_VIRTUAL' undeclared (first use in this function) comm.c:2008: warning: passing arg 2 of `signal' from incompatible pointer type comm.c:2012: warning: passing arg 2 of `signal' from incompatible pointer type comm.c:2013: warning: passing arg 2 of `signal' from incompatible pointer type comm.c:2014: warning: passing arg 2 of `signal' from incompatible pointer type comm.c:1984: warning: unused variable `itime' make[1]: *** [comm.o] 오류 1 make[1]: Leaving directory `/home/mud/dw/src' make: *** [default] 오류 2 mud@lanet:~/dw/src$
comm.c는 첨부 하겠습니다. 내용이 잘리네요.
그리고... 어떻게 수정 하면 좋을지... 이게 제 코드도 아니고 음... 그래서 보니 머드 같긴 한데 잘 모르겠네요... 왜 에러가 날까요... 특히 comm.h 55번 라인을 잘 봐 주세요 음...
레드헷 계열의 리눅스가 설치 된 스팩 머신에서 이것이 아주 잘 돌아 갔다고 하는데 제 서버에선... 컴파일에서 부터 문제가 생기네요 음... 이게 한소프트 리눅스에선 잘 돌았거든요... 데비안에 오니까 저러네요 음... libc6, libc5가 설치 되어 있고 gcc도.. 위에 적었듯이 2.95, 3.3이 설치 되어 있습니다 음...
아.. 정리가 안 되네요...
아무튼 부탁좀 드립니다.
이여송 사도요한 드림.
File attachments:
첨부 | 파일 크기 |
---|---|
![]() | 69.67 KB |
Forums:
정말 아무도...
정말 아무도 답을 해 주실 만한 분이 없으신가요? (그렇진 않은것 같은데...) 제가 질문을 성의 없게 올렸나요? 음...
사람천사
머드가 맞는데요, 아마 써클류인듯한데, 소스 옮기고 나서 configur
머드가 맞는데요, 아마 써클류인듯한데, 소스 옮기고 나서 configure를 실행해 줬나요?
머드 홈계정에서 ./configure를 한번 실행해야만 다른곳에 옮겼을때 그 환경에
적응해서 컴파일이 가능할겁니다..
써클류가 아니라 써클 맞군요...Makefile에서 묶어 컴파일 하는 파일수가 뭐 저리 적지 ㅡ,.ㅡ::
내 마음속의 악마가 자꾸만 나를 부추겨.
늘 해왔던 것에 만족하지 말고 뭔가 불가능해 보이는 것을 하라고 말야.
그런데!!!
아... 네... 써클이군요... 시간의 문 같기도 한데요? 그게 문제가 아니라...
./configure를 실행하면 src/Makefile.in이 없다고 하는군요. 그래서 음... 뭐가 문젠가 해서 autoconf, automake 뭐.. 여러가지를 써써 configure 스크립트가 잘 돌아 가도록 어떻게든 만들어 보려고 했는데 안 되는 군요. 관리자가 이런 것 까지 하고 있으니 원...
혹시 configure와 conf.h.in, Makefile.in 등의 파일들을 모두 다시 만들어 낼 방법은 없을 까요?(손으로 만들어야 하는 건가... 음..)
어렵네요 흐흠... ./configure를 해야 한다는건 알지만 이전에 한소프트 리눅스 쓸 적에는 그런 오류가 난 적이 없어서 신경도 안 썼거든요. 그런데 이번에 갑자기 컴파일이 안 된다기에 봤더니 그러네요 음...
그 때 configure 스크립트를 실행 해 준 적이 없었습니다 음...
사람천사
소스가 타볼을 푼 소스라면 ./configure로 해결이 돼야 정상입니다
소스가 타볼을 푼 소스라면 ./configure로 해결이 돼야 정상입니다. 아니라면 소스를 다시 받아보면 어떨까요?
CVS 등에서 받은 소스면 ./autogen.sh를 먼저 하고 ./configure를 하면 아마 되지 않을까 싶습니다.
이 소스는...
1. 제가 가지고 있는 소스가 아니고 다른 사람이 받아 놓은 것을 컴파일 되게 해 달라는 부탁을 받아 보고 있는 중이고요.
2. 저도 대강은 알고 있지만 이 소스 자체를 대충 누군가가 건드리다 만 것이라 정확히 어떻게 해야 할 지 저도 모르겠습니다.
3. 소스 자체에 문제가 있는지에 대해서 잘 모르겠고요 음.
사람천사
시간의 문이였군요...시간의 문이라면 ./configure를 사용하지 말
시간의 문이였군요...시간의 문이라면 ./configure를 사용하지 말라고
설치설명서에 기입이 되어있을텐데요...ㅡ,.ㅡ:::
혹시 윈도우용을 설치하신건 아닌지 모르겠군요...
일반적으로 돌아당기는 시간의문이라면 configure설정 없이도 잘 설치되서
컴파일 될텐데 말이죠...
내 마음속의 악마가 자꾸만 나를 부추겨.
늘 해왔던 것에 만족하지 말고 뭔가 불가능해 보이는 것을 하라고 말야.
저는 잘 모르겠네요...
이 자료 출처를 몰라서요 음...
configure가 없어도 된다라.. XHOST 5.22 소스 같은 모양이군요. 처음에도 make를 그냥 했지만 안 되서어 다시 .. 음.. 그리고 윈도우즈용은 아닌것 같습니다. mail.silwel.or.kr 이라는 스팩으로 동작중인 레드헷 기본의 리눅스가 설치 된... 서버에서 잘 돌았다고 합니다. 음. 그쪽 환경운 libc5, gcc 2.95.2 뭐.. 대충 그렇습니다.
모르겠네요... 처음부터 다 다시 수정 하라고 해야 하는지. 제가 다루는 소스가 아니니 만큼 처리가 곤란이네요.. 처리 곤란.. 흠..
그럼 아무튼 감사합니다 모두... 행복하세요.
(근대 써클 계열의 머드들이 다 안되는것 같네요? 음.. 이상하군요. 혹시 컴파일에 필요한 라이브러리 같은게 필요한가요? 따로.)
사람천사
댓글 달기