EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=588)
-   -   Compile problems under RHEL (https://www.eqemulator.org/forums/showthread.php?t=28434)

RequiemTCE 06-03-2009 05:08 AM

Compile problems under RHEL
 
System:
2.6.24.5-grsec #1 SMP Thu Dec 18 18:11:30 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

gcc version 4.3.2 20081007 (Red Hat 4.3.2-7) (GCC)

I run into this when attempting to build most of the directories in the source checked out via SVN (Rev 619):

Code:

common/TCPConnection.cpp -o ../common/TCPConnection.o
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
../common/TCPConnection.cpp: In member function bool TCPConnection::GetSockName(char*, uint16*):
../common/TCPConnection.cpp:148: error: cannot convert size_t* to socklen_t* for argument 3 to int getsockname(int, sockaddr*, socklen_t*)
make: *** [../common/TCPConnection.o] Error 1
make: Leaving directory `/home/eqemu/incoming/EQEmuServer/zone'

I made some light modifications to the makefiles in each directory to specify an alternate compiler/linker and to remove "-march=i686" from COPTS to prevent: "../common/timer.cpp:1: error: CPU you selected does not support x86-64 instruction set"

Any ideas?

RequiemTCE 06-03-2009 05:21 AM

I selected GCC 4.3.2 per: http://www.eqemulator.net/forums/sho...89&postcount=7

RequiemTCE 06-03-2009 06:04 AM

Ok, I've got it compiled now. Here's what I did to make it compile under RHEL/x86_64.

Install GCC 4.3.2:
Code:

yum install gcc43 gcc43-c++
----------------

Modify the following files:

Code:

EMuShareMem/makefile
world/makefile
zone/makefile
eqlaunch/makefile
mailserver/makefile
chatserver/makefile

In each of these, replace all instances of "gcc" with "gcc43", and remove "-march=i686" from the COPTS section(if present).

----------------

Modify utils/Makefile:
Replace all occurances of "g++" with "g++43".

----------------

Modify common/TCPConnection.h as follows:
Code:

#else
        size_t addrlen;
#endif

becomes
Code:

#else
        socklen_t addrlen;
#endif

----------------

Modify common/crc32.cpp as follows:
Code:

//#if !defined(i386)
//#define i386  // If you are on a non-Intel based platform (Sparc/HP/NEC/etc), you will want$
//#endif

becomes
Code:

//#if !defined(i386)
//#define i386  // If you are on a non-Intel based platform (Sparc/HP/NEC/etc), you will want$
//#endif
#undef i386


gaeorn 06-03-2009 07:49 AM

Based on the errors you ran into compiling, I'm guessing you are running a 64bit system. There are other changes needed to get 64bit working properly (and it's still a work in progress). Let me know if I am correct and I'll post some patches for you.

RequiemTCE 06-03-2009 08:52 AM

Quote:

Originally Posted by gaeorn (Post 171186)
Based on the errors you ran into compiling, I'm guessing you are running a 64bit system. There are other changes needed to get 64bit working properly (and it's still a work in progress). Let me know if I am correct and I'll post some patches for you.

I am running it on a 64-bit server yes. The issue I'm having right now is that it times out attempting to load items from the database when launching the world or zone servers.

Also, addendum to above: Copy libEMuShareMem.so into /lib64.

Code:

[Debug] [WORLD__INIT] Loading items..
[Status] libEMuShareMem.so loaded


Error: EMuShareMem: DLLLoadItems: !ItemsMMF.IsLoaded() (timeout)
[Debug] [WORLD__INIT_ERR] Error: Could not load item data.  But ignoring


gaeorn 06-03-2009 12:25 PM

Did you increase the shared memory size for the system? If not, add:

kernel.shmmax = 134217728

to /etc/sysctl.conf and reboot. Otherwise, I have no idea why you would be having problems reading in the items.

RequiemTCE 06-16-2009 11:43 PM

I just got back to trying to get this working.

From /etc/sysctl.conf:
Code:

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296

You had mentioned some patches, is there a suggested method for going about getting a codebase that will work in 64-bit?

gaeorn 06-17-2009 01:10 PM

If you look in these forums under development: code submissions, there is a list of patches for 64bit systems I have submitted to be included in the code base.


All times are GMT -4. The time now is 09:04 PM.

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