Jump to content
  • 0

Eroor to compile DB


antrax16

Question

Hey .

Im try to compile db on mainline , but i am this eroor .

compile Config.cpp
compile NetBase.cpp
compile Peer.cpp
compile PeerBase.cpp
compile Main.cpp
compile Lock.cpp
compile DBManager.cpp
compile Cache.cpp
compile LoginData.cpp
compile ClientManager.cpp
compile ClientManagerPlayer.cpp
compile ClientManagerLogin.cpp
compile ClientManagerBoot.cpp
compile ClientManagerParty.cpp
compile ClientManagerGuild.cpp
compile GuildManager.cpp
compile HB.cpp
compile PrivManager.cpp
compile MoneyLog.cpp
compile ItemAwardManager.cpp
compile ClientManagerEventFlag.cpp
compile Marriage.cpp
compile Monarch.cpp
compile BlockCountry.cpp
compile ItemIDRangeManager.cpp
compile ClientManagerHorseName.cpp
compile version.cpp
compile AuctionManager.cpp
compile ProtoReader.cpp
compile CsvReader.cpp
linking ...
/usr/bin/ld: skipping incompatible ../../libthecore/lib/libthecore.a when searching for -lthecore
/usr/bin/ld: cannot find -lthecore
Makefile:47: recipe for target '../db_r40146' failed
gmake: *** [../db_r40146] Error 1

My make file  with DB.

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 -w -pipe -fno-rtti -fno-exceptions -pthread -D_THREAD_SAFE

ifeq ($(GCC_VERSION), 4)
CFLAGS += -mtune=i686
else
CFLAGS += -mcpu=i686
endif

# boost
INCDIR += -I../../../Extern/include

LIBDIR += -L../../libthecore/lib -L../../libsql -L../../libpoly -L../../libgame/lib

#MySQL
INCDIR += -I../../../Extern/include/mysql
LIBDIR += -L../../../Extern/lib

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 [email protected]

$(OBJDIR)/version.o: version.cpp
	@$(CC) $(CFLAGS) -D__USER__="$(USER)" -D__HOSTNAME__="$(HOSTNAME)" -D__PWD__="$(PWD)" -D__P4_VERSION__="$(P4_VERSION)" -c $< -o [email protected]
	@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

Link to comment

6 answers to this question

Recommended Posts

  • 0

cd /usr/src/Server/libthecore/src

gmake clean

gmake -j20

First problem is solved but i am this eroor now .

/usr/bin/ld: skipping incompatible ../../../Extern/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
Makefile:47: recipe for target '../db_r40146' failed
gmake: *** [../db_r40146] Error 1

Link to comment
  • 0

 

cd /usr/src/Server/libthecore/src

gmake clean

gmake -j20

First problem is solved but i am this eroor now .

/usr/bin/ld: skipping incompatible ../../../Extern/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
Makefile:47: recipe for target '../db_r40146' failed
gmake: *** [../db_r40146] Error 1

add to libdir -L/usr/local/lib/mysql

and go to /server/libsql

gmake clean

gmake

  • Love 1
Link to comment
  • 0
  • VIP

Go to /usr/src/mainline_released/mainline_sg/Srcs/Server delete folder libmysql, and go to /usr/src/novaline/Srcs/Server folder libmysql to  /usr/src/mainline_released/mainline_sg/Srcs/Server  

 

Kind Regards,

iStark

Link to comment
  • 0

Go to /usr/src/mainline_released/mainline_sg/Srcs/Server delete folder libmysql, and go to /usr/src/novaline/Srcs/Server folder libmysql to  /usr/src/mainline_released/mainline_sg/Srcs/Server  

 

Kind Regards,

iStark

*insults removed* -- Rumor

 

only use gmake usr/src/mainline_released/mainline_sg/Srcs/Server/libsql 

i solved it why you give noob solved? he noo need to copy paste 

  • Love 1
Link to comment
  • 0

Why not

<code>

mv /usr/home/metin2/metin2/dev/Srcs/Extern/lib/libmysqlclient.a /usr/home/metin2/metin2/dev/Srcs/Extern/lib/libmysqlclient.a.BACKUP

ln -s /usr/local/lib/mysql/libmysqlclient.a /usr/home/metin2/metin2/dev/Srcs/Extern/lib/libmysqlclient.a

</code>

For my this is the simplest solution.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.