Metin2 게임의 게임 및 데이터베이스 소스를 사용하여 FreeBsd 12.1..에서 컴파일하려고 합니다. 나는 gcc+6.5와 gnu gmake -j20 명령을 사용하고 있습니다.
모든 파일이 컴파일되는 것과 같지만 마지막 순간에 다음 오류가 발생합니다.
linking ../game
ld: error: undefined symbol: ERR_free_strings
>>> referenced by vio.c
>>> vio.c.o:(vio_end) in archive ../../../extern/mysql/lib/libmysqlclient.a
ld: error: undefined symbol: EVP_CIPHER_CTX_cleanup
>>> referenced by my_aes_openssl.cc
>>> my_aes_openssl.cc.o:(my_aes_decrypt) in archive ../../../extern/mysql/lib/libmysqlclien t.a
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:228: ../game] Error
이것은 내 Makefile입니다.
CC = c++
INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = .obj
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)
### CFLAGS
CFLAGS = -w -O3 -ggdb -g -gdwarf -std=c++14 -pipe -mtune=i386 -fstack-protector -m32 -static -D_THREAD_SAFE
### END
### LIBS FROM ../EXTERN and LOCAL/INCLUDE
# boost (for boost, you need to install boost from PuTTY. Example: pkg install boost-libs).
INCDIR += -I/usr/local/include
# GSL: Guideline Support Library
INCDIR += -I../../../extern/gsl/include
# cryptopp (if cryptopp doesn't work, you need download src cryptopp 5.6.5 from https://github.com/weidai11/cryptopp/releases/tag/CRYPTOPP_5_6_5 and recompile with your actually compiller (g++/c++).
INCDIR += -I../../../extern/cryptopp
LIBDIR += -L../../../extern/cryptopp/lib
LIBS += -lcryptopp
# devil (for that, you need to install devIL from PuTTY. Example: pkg install devil).
INCDIR += -I../../../local/include
LIBDIR += -L/usr/local/lib
LIBS += -lil -lpng -ltiff -lmng -llcms -ljpeg -ljbig -llzma
# minilzo
INCDIR += -I../../../extern/minilzo
LIBDIR += -L../../../extern/minilzo/lib
LIBS += -lminilzo -lmd
# mysql
INCDIR += -I/usr/local/include/mysql
LIBDIR += -L../../../extern/mysql/lib
LIBS += -lmysqlclient -lz -pthread -lm -lssl -lcrypto
### END
### LIBS FROM ../SOURCE/LIB
# libgame
INCDIR += -I../../lib/libgame
LIBDIR += -L../../lib/libgame/lib
LIBS += -lgame
# libpoly
INCDIR += -I../../lib/libpoly
LIBDIR += -L../../lib/libpoly/lib
LIBS += -lpoly
# libsql
INCDIR += -I../../lib/libsql
LIBDIR += -L../../lib/libsql/lib
LIBS += -lsql
# libthecore
INCDIR += -I../../lib/libthecore
LIBDIR += -L../../lib/libthecore/lib
LIBS += -lthecore
# lua
INCDIR += -I../../../extern/lua/lua
LIBDIR += -L../../../extern/lua/lib
LIBS += -llua
### END
CPP = abuse.cpp\
activity.cpp\
affect.cpp\
ani.cpp\
arena.cpp\
banword.cpp\
battle.cpp\
BattleArena.cpp\
blend_item.cpp\
BlueDragon.cpp\
BlueDragon_Binder.cpp\
buff_on_attributes.cpp\
buffer_manager.cpp\
building.cpp\
char.cpp\
char_affect.cpp\
char_battle.cpp\
char_change_empire.cpp\
char_dragonsoul.cpp\
char_gaya.cpp\
char_horse.cpp\
char_item.cpp\
char_manager.cpp\
char_quickslot.cpp\
char_resist.cpp\
char_skill.cpp\
char_state.cpp\
cmd.cpp\
cmd_emotion.cpp\
cmd_general.cpp\
cmd_gm.cpp\
cmd_oxevent.cpp\
config.cpp\
constants.cpp\
crc32.cpp\
cube.cpp\
damage_top.cpp\
db.cpp\
desc.cpp\
desc_client.cpp\
desc_manager.cpp\
desc_p2p.cpp\
dragon_soul_table.cpp\
DragonLair.cpp\
DragonSoul.cpp\
dungeon.cpp\
empire_text_convert.cpp\
entity.cpp\
entity_view.cpp\
event.cpp\
event_queue.cpp\
exchange.cpp\
file_loader.cpp\
fishing.cpp\
FSM.cpp\
gm.cpp\
group_text_parse_tree.cpp\
guild.cpp\
guild_manager.cpp\
guild_war.cpp\
horse_rider.cpp\
horsename_manager.cpp\
input.cpp\
input_api.cpp\
input_auth.cpp\
input_db.cpp\
input_login.cpp\
input_main.cpp\
input_p2p.cpp\
inventory.cpp\
item.cpp\
item_addon.cpp\
item_attribute.cpp\
item_manager.cpp\
item_manager_idrange.cpp\
item_manager_read_tables.cpp\
locale.cpp\
locale_service.cpp\
log.cpp\
login_data.cpp\
lzo_manager.cpp\
main.cpp\
map_location.cpp\
MarkConvert.cpp\
MarkImage.cpp\
MarkManager.cpp\
marriage.cpp\
MeleyLair.cpp\
messenger_manager.cpp\
mining.cpp\
mob_manager.cpp\
motion.cpp\
MountSystem.cpp\
nearby_scanner.cpp\
New_PetSystem.cpp\
OXEvent.cpp\
p2p.cpp\
packet_info.cpp\
party.cpp\
PetSystem.cpp\
polymorph.cpp\
priv_manager.cpp\
pvp.cpp\
questevent.cpp\
questlua.cpp\
questlua_affect.cpp\
questlua_arena.cpp\
questlua_battleArena.cpp\
questlua_building.cpp\
questlua_danceevent.cpp\
questlua_dragonlair.cpp\
questlua_dragonsoul.cpp\
questlua_dungeon.cpp\
questlua_game.cpp\
questlua_global.cpp\
questlua_guild.cpp\
questlua_horse.cpp\
questlua_item.cpp\
questlua_marriage.cpp\
questlua_MeleyLair.cpp\
questlua_npc.cpp\
questlua_oxevent.cpp\
questlua_party.cpp\
questlua_pc.cpp\
questlua_pet.cpp\
questlua_petnew.cpp\
questlua_quest.cpp\
questlua_support.cpp\
questlua_target.cpp\
questlua_TempleOchao.cpp\
questmanager.cpp\
questnpc.cpp\
questpc.cpp\
reborn.cpp\
refine.cpp\
regen.cpp\
safebox.cpp\
sectree.cpp\
sectree_manager.cpp\
shop.cpp\
shop_manager.cpp\
shopEx.cpp\
skill.cpp\
skill_power.cpp\
snow_flake_flr.cpp\
start_position.cpp\
SupportSystem.cpp\
target.cpp\
TempleOchao.cpp\
text_file_loader.cpp\
trigger.cpp\
utils.cpp\
vector.cpp\
war_map.cpp\
wedding.cpp\
whisper_admin.cpp\
cipher.cpp\
CPPOBJS = $(CPP:%.cpp=$(OBJDIR)/%.o)
GAME_TARGET = $(BINDIR)/game
default: $(GAME_TARGET)
$(OBJDIR)/%.o: %.cpp
@echo -e "\033[0;32m [OK] \033[0m" $<
@$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
$(GAME_TARGET): $(CPPOBJS)
@echo linking $(GAME_TARGET)
@$(CC) $(CFLAGS) $(LIBDIR) $(CPPOBJS) $(LIBS) -o $(GAME_TARGET)
clean:
@rm -f $(CPPOBJS)
@rm -f $(BINDIR)/game* $(BINDIR)/conv
tag:
ctags *.cpp *.h
답변1
OpenSSL 버전이 코드에 비해 너무 새롭습니다.
이 기능은 Openssl 1.1.0에서 제거되었습니다.
변경 로그에 따르면:
EVP_MD_CTX_cleanup(), EVP_CIPHER_CTX_cleanup() and
HMAC_CTX_cleanup() were removed. HMAC_CTX_reset() and
EVP_MD_CTX_reset() should be called instead to reinitialise
an already created structure.
업스트림에 새 버전의 프로그램을 요청하거나 직접 코드를 변경해 보세요.