![gmake: *** [Makefile:228: ../game] 错误 1](https://linux22.com/image/173855/gmake%3A%20***%20%5BMakefile%3A228%3A%20..%2Fgame%5D%20%E9%94%99%E8%AF%AF%201.png)
我正在尝试在 FreeBsd 12.1 上编译..以及来自 Metin2 game 的游戏和数据库源。我正在使用 gcc+6.5 和 gnu gmake -j20 comand
就像所有文件都在编译一样,但在最后一秒它给了我这个错误:
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.
要么向上游索要新版本的程序,要么尝试自己更改代码