ѕeмa™ 308 Posted March 14, 2014 Share Posted March 14, 2014 Hi, i have a problem when i compile the db: compile ClientManagerHorseName.cpp gmake: *** [.obj/DBManager.o] Error 1 gmake: *** Waiting for unfinished jobs.... ClientManagerPlayer.cpp: In member function 'char* CClientManager::GetCommand(char*)': ClientManagerPlayer.cpp:433: warning: address of local variable 'command' returned BUILD FAILED (exit value 2, total time: 4m 20s) a friend say me the problem is in makefile, and here my makefile (/usr/src/novaline/Srcs/Server/db/src) MAKE = gmake CC = g++ INCDIR = LIBDIR = BINDIR = .. OBJDIR = .obj GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3 | cut -d'.' -f1) BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1) P4_VERSION = 40146 $(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi) TARGET = $(BINDIR)/db_r$(P4_VERSION) CFLAGS = -g -Wall -O2 -pipe -fno-rtti -fno-exceptions -pthread -D_THREAD_SAFE ifeq ($(GCC_VERSION), 4) CFLAGS += -mtune=i686 else CFLAGS += -mcpu=i686 endif # boost INCDIR += -I../../boost LIBDIR += -L../../libthecore/lib -L../../libsql -L../../libpoly -L../../libgame/lib ifeq ($(BSD_VERSION), 7) INCDIR += -I../../libmysql/7.x-5.1.35 LIBDIR += -L../../libmysql/7.x-5.1.35 else INCDIR += -I../../libmysql/5.x-5.1.35 LIBDIR += -L../../libmysql/5.x-5.1.35 endif LIBS = -lthecore -lmysqlclient -lsql -lpoly -lgame -lm -lz SRCS = Config.cpp NetBase.cpp Peer.cpp PeerBase.cpp Main.cpp Lock.cpp DBManager.cpp Cache.cpp LoginData.cpp ClientManager.cpp ClientManagerPlayer.cpp ClientManagerLogin.cpp ClientManagerBoot.cpp ClientManagerParty.cpp ClientManagerGuild.cpp GuildManager.cpp HB.cpp PrivManager.cpp MoneyLog.cpp ItemAwardManager.cpp ClientManagerEventFlag.cpp Marriage.cpp Monarch.cpp BlockCountry.cpp ItemIDRangeManager.cpp ClientManagerHorseName.cpp version.cpp AuctionManager.cpp ProtoReader.cpp CsvReader.cpp OBJS = $(SRCS:%.cpp=$(OBJDIR)/%.o) default: $(TARGET) $(TARGET): $(OBJS) @echo linking ... @$(CC) $(CFLAGS) $(LIBDIR) $(OBJS) $(LIBS) -o $(TARGET) @touch version.cpp $(OBJDIR)/%.o: %.cpp @echo compile $< @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@ $(OBJDIR)/version.o: version.cpp @$(CC) $(CFLAGS) -D__USER__="$(USER)" -D__HOSTNAME__="$(HOSTNAME)" -D__PWD__="$(PWD)" -D__P4_VERSION__="$(P4_VERSION)" -c $< -o $@ @echo compile $< $(OBJDIR): @mkdir $(OBJDIR) clean: @rm -f $(OBJS) $(BINDIR)/db_r* dep: @touch Depend makedepend -fDepend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(SRCS) 2> /dev/null sinclude Depend If you can say me where is the problem I will be very grateful. Thanks and sorry my bad english. https://m2admin.net/ Link to comment Share on other sites More sharing options...
Originale 134 Posted March 14, 2014 Share Posted March 14, 2014 Your error is gmake: *** [.obj/DBManager.o] Error 1 Should you give any indication when it compiles the files in question. Your Makefile seems correct If you want you can use mine MAKE = gmake CC = g++ BINDIR = .. OBJDIR = .obj DB_VERSION = 40146 TARGET = $(BINDIR)/_db_r$(DB_VERSION) INCDIR += -I/usr/local/include LIBDIR += -L../../libthecore/lib -L../../libmysql/7.x-5.1.35 -L../../libsql -L../../libpoly -L../../libgame/lib LIBS = -lthecore -lmysqlclient -lsql -lpoly -lgame -lm -lz CFLAGS = -g -Wall -O2 -mtune=i686 -pipe -fno-rtti -fno-exceptions -pthread -D_THREAD_SAFE SRCS = Config.cpp NetBase.cpp Peer.cpp PeerBase.cpp Main.cpp Lock.cpp DBManager.cpp Cache.cpp LoginData.cpp ClientManager.cpp ClientManagerPlayer.cpp ClientManagerLogin.cpp ClientManagerBoot.cpp ClientManagerParty.cpp ClientManagerGuild.cpp GuildManager.cpp HB.cpp PrivManager.cpp MoneyLog.cpp ItemAwardManager.cpp ClientManagerEventFlag.cpp Marriage.cpp Monarch.cpp BlockCountry.cpp ItemIDRangeManager.cpp ClientManagerHorseName.cpp version.cpp AuctionManager.cpp ProtoReader.cpp CsvReader.cpp OBJS = $(SRCS:%.cpp=$(OBJDIR)/%.o) default: $(TARGET) #@strip -s $(TARGET) $(TARGET): $(OBJS) @echo linking ... @$(CC) $(CFLAGS) $(LIBDIR) $(OBJS) $(LIBS) -o $(TARGET) @touch version.cpp $(OBJDIR)/%.o: %.cpp @echo compile $< @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@ $(OBJDIR)/version.o: version.cpp @$(CC) $(CFLAGS) -D__DB_VERSION__="$(DB_VERSION)" -c $< -o $@ @echo compile $< $(OBJDIR): @mkdir $(OBJDIR) clean: @rm -f $(OBJS) $(BINDIR)/_db_r* dep: @touch Depend makedepend -fDepend $(INCDIR) -I/usr/include/c++/4.2 -p$(OBJDIR)/$(SRCS) 2> /dev/null sinclude Depend It also requires that you change __P4_VERSION__ or __ SVN_VERSION__ in your version.cpp file __ DB_VERSION__ . Link to comment Share on other sites More sharing options...
ѕeмa™ 308 Posted March 14, 2014 Author Share Posted March 14, 2014 (edited) with you'r makefile: Makefile:25: *** missing separator. Stop. CLEAN FAILED (exit value 2, total time: 214ms) Here a image Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal https://m2admin.net/ Link to comment Share on other sites More sharing options...
Originale 134 Posted March 14, 2014 Share Posted March 14, 2014 Or resume your Makefile and made the command "gmake dep" Link to comment Share on other sites More sharing options...
ѕeмa™ 308 Posted March 14, 2014 Author Share Posted March 14, 2014 (edited) here with gmak dep Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal https://m2admin.net/ Link to comment Share on other sites More sharing options...
Originale 134 Posted March 14, 2014 Share Posted March 14, 2014 Yes it squeezes redo all the paths for files Depend Repeat compiling with gmake-j20 Link to comment Share on other sites More sharing options...
ѕeмa™ 308 Posted March 14, 2014 Author Share Posted March 14, 2014 i try to compile again, and the same problem https://m2admin.net/ Link to comment Share on other sites More sharing options...
Originale 134 Posted March 14, 2014 Share Posted March 14, 2014 Send Me Full Errors by MP or accepts the invitation I send your skype ^^ Link to comment Share on other sites More sharing options...
Dennis 167 Posted March 15, 2014 Share Posted March 15, 2014 Use the DBManager.cpp from mainline_released Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now