Problem with Linux Compile. Help please.
Ok. I've got a problem compiling EQEMU on Linux.
I'm running Redhat 9.0 and have the following MySQL RPM's installed. MySQL-client-4.0.12-0 MySQL-shared-4.0.12-0 perl-DBD-MySQL-2.1021-3 MySQL-embedded-4.0.12-0 MySQL-devel-4.0.12-0 MySQL-server-4.0.12-0 I'm running gcc-3.2.2-5 and I'm getting the following error(s) gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Wcomment -Wcast-align -Winline -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD -DDEBUG=1 -DSHAREMEM -DCATCH_CRASH -I/usr/include/mysql ../common/EQNetwork.o ../common/timer.o ../common/database.o ../common/packet_dump.o ../common/races.o ../common/unix.o ../common/Mutex.o ../common/MiscFunctions.o ../common/serverinfo.o ../common/packet_functions.o ../common/classes.o ../common/TCPConnection.o ../common/eqtime.o ../common/crc32.o client.o net.o console.o zoneserver.o LoginServer.o ../common/md5.o ../common/dbcore.o ../common/dbasync.o ../common/EMuShareMem.o .obj/debug.o -rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -lmysqlclient -ldl -o world /usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0xaa): In function `my_uncompress': : undefined reference to `uncompress' /usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x13c): In function `my_compress_alloc': : undefined reference to `compress' collect2: ld returned 1 exit status make: *** [world] Error 1 (I'm getting for both of the world and zone compiles but I'm only putting one up since they look basically the same). This is my makefile (Below) APP=world SF=../common/EQNetwork.o \ ../common/timer.o ../common/database.o ../common/packet_dump.o ../common/races.o ../common/unix.o \ ../common/Mutex.o ../common/MiscFunctions.o ../common/serverinfo.o ../common/packet_functions.o \ ../common/classes.o ../common/TCPConnection.o ../common/eqtime.o ../common/crc32.o \ client.o net.o console.o zoneserver.o LoginServer.o ../common/md5.o ../common/dbcore.o \ ../common/dbasync.o ../common/EMuShareMem.o .obj/debug.o CC=gcc LINKER=gcc DFLAGS=-DDEBUG=1 -DSHAREMEM -DCATCH_CRASH WFLAGS=-Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Wcomment -Wcast-align -Winline -Wno-deprecated COPTS=$(WFLAGS) -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD $(DFLAGS) -I/usr/include/mysql LINKOPTS=-rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -lmysqlclient -ldl all: $(APP) $(APP): $(SF) $(LINKER) $(COPTS) $(OBJS) $^ $(LINKOPTS) -o $@ clean: rm -f $(SF) $(APP) %.o: %.cpp $(CC) -c $(COPTS) $< -o $@ .obj/debug.o: ../common/debug.cpp ../common/debug.h mkdir -p .obj $(CC) $(COPTS) -c ../common/debug.cpp -o .obj/debug.o So basically, can anyone tell me what I need to do to fix this? Thanks, Sandabus |
Nevermind.
Fixed the problem :) now onward and hopefully the rest will work w/o any issues :) Sandabus |
I would just like to point out that libz was not getting linked right, and one simple fix is to had -lz to the end of the
-rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -lmysqlclient -ldl *here lz* -o world |
I'm having the same problem with redhat 8.0
what line did you add that '-lz' to? 'LINKOPTS' from the makefile? i tried this and i still get a whorl of errors when compiling... :shock: any suggestions on things to try? Djinii |
LINKOPTS=-rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -lmysqlclient -lz -ldl
make sure you have the zlib*-dev installed. Oh makefiles were purchased from crack heads on the corner, if anyone wants to tackle and donate automake goodies feel free =) |
All times are GMT -4. The time now is 12:02 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.