Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2010, 11:17 AM
number6
Sarnak
 
Join Date: Sep 2006
Posts: 62
Default Building the login server on CentOS 4.8

As subject, I am trying to build the SVN login server and having difficulties linking with the pre-compiled crypto libraries. I am using the gentoo 32-bit files, though the ubuntu ones also fail with more errors. The output from the link:
Code:
-bash-3.00$ make
gcc -o EQEmuLoginServer Client.o ClientManager.o Config.o 
DatabaseMySQL.o ErrorLog.o Main.o ServerManager.o WorldServer.o 
.obj/BasePacket.o .obj/Condition.o .obj/CRC16.o .obj/crc32.o .obj/debug.o
 .obj/emu_opcodes.o .obj/EmuTCPConnection.o .obj/EmuTCPServer.o 
.obj/EQPacket.o .obj/EQStream.o .obj/EQStreamFactory.o .obj/logsys.o 
.obj/logsys_eqemu.o .obj/misc.o .obj/MiscFunctions.o .obj/Mutex.o 
.obj/opcodemgr.o .obj/packet_dump.o .obj/packet_functions.o .obj/rdtsc.o 
.obj/TCPConnection.o .obj/TCPServer.o .obj/timeoutmgr.o .obj/timer.o 
.obj/unix.o -Wall -Wuninitialized -Wwrite-strings -Wcast-qual 
-Wno-deprecated  -Wcomment -Wcast-align -O -g -march=i686 -pthread 
-pipe -DEQLAUNCH -DEQDEBUG=5 -I/usr/include/mysql  -g -pipe -m32 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-fno-strict-aliasing -fwrapv  -rdynamic -L. -lstdc++ -ldl -rdynamic -L/usr
/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto 
-lEQEmuAuthCrypto -lcryptopp -fno-stack-protector

./libEQEmuAuthCrypto.a(EQEmuAuthCrypto.o)(.text+0x1488): 
In function `DecryptUsernamePassword(char const*, unsigned int, int)':

: undefined reference to `__stack_chk_fail'
./libEQEmuAuthCrypto.a(EQEmuAuthCrypto.o)(.text+0x1738): 
In function `Encrypt(char const*, unsigned int, unsigned int&)':

: undefined reference to `__stack_chk_fail'
./libEQEmuAuthCrypto.a(EQEmuAuthCrypto.o)(.text+0x18d4): 
In function `encSHA(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':

: undefined reference to `__stack_chk_fail'
./libEQEmuAuthCrypto.a(EQEmuAuthCrypto.o)(.text+0x1a55): 
In function `encSHA512(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':

: undefined reference to `__stack_chk_fail'
collect2: ld returned 1 exit status
make: *** [EQEmuLoginServer] Error 1
I added "-fno-stack-protector" to the link command after some googling but to no avail. I have a feeling this is a mismatch of gcc versions used to make the libraries and my own one.
Code:
-bash-3.00$ gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking

 --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions 
--enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)
Anyone got any ideas? I am at a bit of a loss!

Thanks

Paul.
Reply With Quote
  #2  
Old 04-13-2010, 11:55 AM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

One of the devs with the crypto source will probably have to build a new version of the library for it to work on a system that old. And I'm not sure anyone will want to bother since that is a rather old version of CentOS.

Have you tried building the login server under a more recent version of CentOS?
Reply With Quote
  #3  
Old 04-13-2010, 12:34 PM
number6
Sarnak
 
Join Date: Sep 2006
Posts: 62
Default

Quote:
Originally Posted by gaeorn View Post
Have you tried building the login server under a more recent version of CentOS?
I see what you mean. The trouble is that this is a managed server and I don't have a way to get it updated in the short term due to other stuff running on it that's critical.
Reply With Quote
  #4  
Old 04-14-2010, 05:16 PM
Kobaz
Hill Giant
 
Join Date: Nov 2008
Location: Gold Coast, Oz
Posts: 119
Default

you could try using alien and debbootstrap to build a minimal up-to-date version of debian that runs in a chroot and build your login server in that. Probably wise to test on a non-critical system 1st though.

Once you have the server built, put it in a directory with the libraries it depends upon and use the LD_PRELOAD variable to force it to use the right libraries, so you don't have to use a chroot if you don't want to (I would run it in a chroot, to minimise the risk to business applications).

The old-school businessman part of me wonders why you'd build a game server on a system that has a "mission critical" role. Seems like a great way to piss off bosses/shareholders.
Reply With Quote
  #5  
Old 04-15-2010, 03:34 AM
number6
Sarnak
 
Join Date: Sep 2006
Posts: 62
Default

Quote:
Originally Posted by Kobaz View Post
The old-school businessman part of me wonders why you'd build a game server on a system that has a "mission critical" role. Seems like a great way to piss off bosses/shareholders.
Well, I'm not at liberty to say except that the only person I'd piss off would be me. So that's alright then.

Thanks for the ideas, I'll ponder...

Paul.
Reply With Quote
  #6  
Old 04-19-2010, 08:47 AM
number6
Sarnak
 
Join Date: Sep 2006
Posts: 62
Default

A very quick update - I got it working! I compiled with Centos 5.4 and copied the binary and libraries over. The only extra thing was to launch the executable with ld-2.5.so - see the following script which also shows the various libraries that were copied. I simply put these in a subdirectory "lib". Anyway I hope this is of some use to someone.

Cheers

Paul.
Code:
#!/bin/sh
# noddy script to run login server with wrong libraries
# NB the LD_PRELOAD stuff is all on one line in the real file

cd /home/eq/server/loginserver
LD_PRELOAD="lib/libc-2.5.so:lib/libcrypto.so:lib/libcrypt.so:lib/libc.so.6:lib
/libdl.so:lib/libgcc_s.so:lib/libm.so:lib/libnsl.so:lib/libpthread.so.0:
lib/libssl.so:lib/libstdc++.so.6:lib/libz.so.1"
export LD_PRELOAD
./ld-2.5.so ./EQEmuLoginServer
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:39 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3