Jump to content

Eroor to compile DB


Recommended Posts

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 $@

$(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

Link to comment
Share on other sites

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
Share on other sites

 

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
Share on other sites

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
Share on other sites

  • 1 year later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 60

      Inbuild GR2 Animation

    2. 2

      wait() function bug

    3. 0

      Remove Party Role Bonuses

    4. 1

      Fix CBar3D

    5. 2

      set_quest_state not working

    6. 1

      Fix CBar3D

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.