I'm a noob with metin2 stuff, so please act like I'm one (sad)
I have this issue when building DB. I looked almost everywhere for answers but couldn't find any. Could you please help if you know the answer? Thank you.
I can build db in different bsd but in that I can't build game, so in some bsd I can't build only db and in other only game I can't build both of them.
Db makefile
I have this issue when building DB. I looked almost everywhere for answers but couldn't find any. Could you please help if you know the answer? Thank you.
I can build db in different bsd but in that I can't build game, so in some bsd I can't build only db and in other only game I can't build both of them.
Code:
linking ../db_r41025
/usr/local/bin/ld: /usr/local/lib/mysql/libmysqlclient.a(client.c.o): in function `ssl_verify_server_cert':
client.c:(.text+0x61c8): undefined reference to `SSL_get_peer_certificate'
/usr/local/bin/ld: /usr/local/lib/mysql/libmysqlclient.a(my_aes_openssl.cc.o): in function `my_aes_encrypt':
my_aes_openssl.cc:(.text+0x60): undefined reference to `EVP_CIPHER_iv_length'
/usr/local/bin/ld: /usr/local/lib/mysql/libmysqlclient.a(my_aes_openssl.cc.o): in function `my_aes_decrypt':
my_aes_openssl.cc:(.text+0x224): undefined reference to `EVP_CIPHER_iv_length'
/usr/local/bin/ld: /usr/local/lib/mysql/libmysqlclient.a(my_aes_openssl.cc.o): in function `my_aes_get_size':
my_aes_openssl.cc:(.text+0x2fe): undefined reference to `EVP_CIPHER_block_size'
/usr/local/bin/ld: /usr/local/lib/mysql/libmysqlclient.a(my_aes_openssl.cc.o): in function `my_aes_needs_iv':
my_aes_openssl.cc:(.text+0x33a): undefined reference to `EVP_CIPHER_iv_length'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:77: ../db_r41025] Error 1
Db makefile
Code:
CC = g++9
DB_VERSION = $(shell cat ../../__REVISION__)
INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = .obj
SRVDIR = /usr/game/srv1
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)
# LIST_OF_CONSTANTS BEGIN
ENABLE_GCC_AUTODEPEND = 1
ENABLE_STATIC = 0
# LIST_OF_CONSTANTS END
# Depend Path File
ifneq ($(ENABLE_GCC_AUTODEPEND), 1)
DEPFILE = Depend
endif
# Project Flags
CFLAGS = -m32 -g -Wall -O2 -pipe -fno-rtti -fno-exceptions -Wno-long-long -pthread -D_THREAD_SAFE
CFLAGS += -Wno-deprecated-declarations -Wno-nonnull-compare -Wno-deprecated-declarations -Wno-array-bounds -Wno-address
CFLAGS += -Wno-int-in-bool-context -Wno-format-truncation
CXXFLAGS = -std=c++2a -Wl,-rpath=/usr/local/lib/gcc9
ifeq ($(ENABLE_STATIC), 1)
CFLAGS += -static
endif
# Version defines
CFLAGS += -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__DB_VERSION__=\"$(DB_VERSION)\"
# Boost
INCDIR += -I../../../Extern/include/boost
# MySQL
INCDIR += -I/usr/local/include/mysql
LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a
# Project Libraries
INCDIR += -I/usr/local/include
INCDIR += -I../../../Extern/include
LIBDIR += -I../../../Extern/lib
LIBDIR += -L../../libthecore/lib -L../../libsql -L../../libpoly -L../../libgame/lib
LIBS += -lthecore -lsql -lpoly -lgame -lm
# OpenSSL
LIBS += -lssl -lcrypto
# PROJECT_SRC_FILES BEGIN
CPPFILE = 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
# PROJECT_SRC_FILES END
# PROJECT_OBJ_FILES BEGIN
CPPOBJS = $(CPPFILE:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
CPPDEPS = $(CPPOBJS:%.o=%.d)
endif
# PROJECT_OBJ_FILES END
# Target Paths
MAIN_TARGET = $(BINDIR)/db_r$(DB_VERSION)
default: $(MAIN_TARGET)
$(MAIN_TARGET): $(CPPOBJS)
@echo linking $(MAIN_TARGET)
@$(CC) $(CFLAGS) $(CXXFLAGS) $(LIBDIR) $(CPPOBJS) $(LIBS) -o $(MAIN_TARGET)
$(OBJDIR)/%.o: %.cpp
@echo compiling $<
@$(CC) $(CFLAGS) $(CXXFLAGS) $(INCDIR) -c $< -o $@
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
@$(CC) -MM -MG -MP $(CFLAGS) $(CXXFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
@sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif
$(OBJDIR):
@mkdir $(OBJDIR)
symlink:
@ln -fs db_r$(DB_VERSION) $(BINDIR)/db_symlink
strip:
@cp $(BINDIR)/db_r$(DB_VERSION) $(BINDIR)/db_r
@strip $(BINDIR)/db_r
install:
rm -rf $(SRVDIR)/share/bin/db
cp $(MAIN_TARGET) $(SRVDIR)/share/bin/db
clean:
@rm -f $(CPPOBJS) $(BINDIR)/db_r*
dep:
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
@echo "Note: gcc autodepend is autodetected, so target dep skipped"
else
makedepend -f $(DEPFILE) $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) 2> /dev/null > $(DEPFILE)
endif
# AUTO_DEPEND_CHECK BEGIN
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
sinclude $(CPPDEPS)
else
sinclude $(DEPFILE)
endif
# AUTO_DEPEND_CHECK END
Last edited:

