EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=588)
-   -   EQEmu compile fail - inflateInit2_, defalteInit_ (https://www.eqemulator.org/forums/showthread.php?t=36121)

scerion 12-18-2012 05:12 PM

EQEmu compile fail - inflateInit2_, defalteInit_
 
Greetings,
I'm trying to set up EQEmu on my linux server. It's an already exisiting webserver running the following:
CENTOS 6.3 x86_64
Cpanel 11

I've been following the various Linux guides, and adjustments for x64. I'm currently in the process of compiling the code, but it generates the following error:
Code:

./common/packet_functions.o: In function `InflatePacket(unsigned char const*, unsigned int, unsigned char*, unsigned int, bool)':
/home/eqemu/source/EQEmuServer/world/../common/packet_functions.cpp:245: undefined reference to `inflateInit2_'
/home/eqemu/source/EQEmuServer/world/../common/packet_functions.cpp:250: undefined reference to `inflate'
/home/eqemu/source/EQEmuServer/world/../common/packet_functions.cpp:253: undefined reference to `inflateEnd'
/home/eqemu/source/EQEmuServer/world/../common/packet_functions.cpp:272: undefined reference to `inflateEnd'
../common/packet_functions.o: In function `DeflatePacket(unsigned char const*, int, unsigned char*, int)':
/home/eqemu/source/EQEmuServer/world/../common/packet_functions.cpp:155: undefined reference to `deflateInit_'
/home/eqemu/source/EQEmuServer/world/../common/packet_functions.cpp:158: undefined reference to `deflate'
/home/eqemu/source/EQEmuServer/world/../common/packet_functions.cpp:162: undefined reference to `deflateEnd'
/home/eqemu/source/EQEmuServer/world/../common/packet_functions.cpp:167: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
make[1]: *** [zone] Error 1
make[1]: Leaving directory `/home/eqemu/source/EQEmuServer/zone'
make: *** [all] Error 2

any suggestions?

lerxst2112 12-18-2012 10:06 PM

You are missing zlib-devel.

scerion 12-18-2012 10:30 PM

thought that might have been it too... but according to cpanel and trying to update it manually though yum...

Package zlib-devel-1.2.3-27.el6.x86_64 already installed and latest version

also have unzip zip zlib and zlib-static

tried to update them all and all appear up to date :-/
maybe its referencing the wrong location for zlib-devel?

lerxst2112 12-18-2012 11:23 PM

There generally aren't locations for files that you need to manage in Linux. either the system library is installed or it isn't.

You can try running ldconfig -v as root and see if zlib is listed. You should also verify that -lz is on the linker line in the makefile. It's there in the default makefile, but if you modified anything perhaps it went missing.

scerion 12-19-2012 02:18 PM

was was comparing the world makefile to the zone makefile and came across that it was missing -lm -lz from the LINKOPTS line. here they are below:

world makefile
Code:

COPTS=$(WFLAGS) -g -O -pthread -pipe -I../common/SocketLib \
  -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -lm -lz -ldl \
  $(MYSQL_LIB) $(PERL_LIB)

zone makefile
Code:

COPTS=$(WFLAGS) -O -g -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -ldl $(MYSQL_LIB) $(PERL_LIB)

So it looks like that portion compiled correctly...the fix by adding "-lm -lz" before "-ldl" in the zone makefile.

Now I got
Code:

make[1]: Leaving directory `/home/eqemu/source/EQEmuServer/queryserv'
make -C utils
make[1]: Entering directory `/home/eqemu/source/EQEmuServer/utils'
g++ cleanipc.cpp -o cleanipc
make[1]: Leaving directory `/home/eqemu/source/EQEmuServer/utils'

at the end of the compilation.
are these errors?

lerxst2112 12-19-2012 03:45 PM

Hmm, the default makefile from SVN is missing -lz for zone as well, so it isn't something you accidentally tweaked. I had only checked the world makefile since it looked like that might be where you were having the issue.

I don't regularly compile on Linux, so I'm not sure if everyone has the issues, or if zlib gets picked up by some other library on a different distribution.

The stuff at the end isn't errors. You should have executables in the output directory.

scerion 12-19-2012 04:24 PM

yeah I hadn't tweaked that part of the lines.. had only removed the -march flag to compile on x64.
Good to know it wasn't my fault tho ;)
Submitted a thread to the Bug Report forum.

very much thanks for the help lerxst2112


All times are GMT -4. The time now is 06:51 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.