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 09-25-2008, 08:16 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

This is good stuff, thanks for clearing this topic out for me, I've searched, but never got this far.
My newest distro will not let me uninstall the latest GCC, as it says it's used for other compiles and would break too much. I've gotten away with installing multiple versions of GCC or for the user only.
This is much better and should solve a lot.

Quote:
Originally Posted by AndMetal View Post
I know I've come across this before, possibly while I was trying to compile some custom code, but here's your answer to the original problem:
http://gcc.gnu.org/gcc-4.3/porting_to.html

It's not listed here, but malloc() is also in the <cstdlib> library.

So, in short, just add an #include <cstdlib> at the beginning of common/dbcore.cpp, common/EQPacket.cpp, and any other files that give those kinds of errors and you should be good. Imo, I think it might be a good idea to get this ultimately updated into the source, as well as resolve any other incompatibilities between 4.1 & 4.3.

Hope this helps.
Reply With Quote
  #2  
Old 10-13-2008, 07:27 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default Now they clobber me!

I wonder if anyone might know what or why the cause for this. I tried other versions of gcc with the same results, and this only happens on on of my pcs, and even will sometimes go through with the compile.
Quote:
../common/crc32.cpp:106:2: warning: #warning "Comment out i386 define if your arch isn't x86"
../common/crc32.cpp: In static member function ‘static uint32 CRC32::Update(const int8*, uint32, uint32)’:
../common/crc32.cpp:239: error: PIC register ‘bx’ clobbered in ‘asm’
make: *** [../common/crc32.o] Error 1
[angelox@drake world]$

Here's two ways to use other versions of gcc (have to install them first);
Code:
#cd /usr/bin
#unlink gcc
#ln -sf gcc-VERSIONTHATYOUWANT gcc
Or use EXPORT
Code:
export CC=/usr/bin/gcc-3.4
Reply With Quote
  #3  
Old 10-14-2008, 12:52 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

[QUOTE=Angelox;158252]I wonder if anyone might know what or why the cause for this. I tried other versions of gcc with the same results, and this only happens on on of my pcs, and even will sometimes go through with the compile.

[CODE]
../common/crc32.cpp: In static member function
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #4  
Old 10-14-2008, 06:45 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
I wonder if anyone might know what or why the cause for this. I tried other versions of gcc with the same results, and this only happens on on of my pcs, and even will sometimes go through with the compile.

[CODE]
../common/crc32.cpp: In static member function
I think you got your reply cut in half - happened to me on this very same thread
Reply With Quote
  #5  
Old 10-14-2008, 01:17 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by Angelox View Post
I think you got your reply cut in half - happened to me on this very same thread
Yeah, lol. Let's try this again...

Quote:
Originally Posted by Angelox View Post
I wonder if anyone might know what or why the cause for this. I tried other versions of gcc with the same results, and this only happens on on of my pcs, and even will sometimes go through with the compile.

Code:
../common/crc32.cpp: In static member function ‘static uint32 CRC32::Update(const int8*, uint32, uint32)’:
../common/crc32.cpp:239: error: PIC register ‘bx’ clobbered in ‘asm’
make: *** [../common/crc32.o] Error 1
Teh intertubes indicates it's an issue specific to GCC 3.4. This is the suspect code:
Code:
__asm __volatile (
		"xorl	%%ebx, %%ebx\n"
		"movl	%1, %%esi\n" 
		"movl	%2, %%ecx\n" 
		"movl	$CRC32Table, %%edi\n"
		"shrl	$2, %%ecx\n"
		"jz	1f\n"

		".align 4\n"
		"0:\n"
		"movb	%%al, %%bl\n"
		"movl	(%%esi), %%edx\n"
		"shrl	$8, %%eax\n"
		"xorb	%%dl, %%bl\n"
		"shrl	$8, %%edx\n"
		"xorl	(%%edi,%%ebx,4), %%eax\n"

		"movb	%%al, %%bl\n"
		"shrl	$8, %%eax\n"
		"xorb	%%dl, %%bl\n"
		"shrl	$8, %%edx\n"
		"xorl	(%%edi,%%ebx,4), %%eax\n"

		"movb	%%al, %%bl\n"
		"shrl	$8, %%eax\n"
		"xorb	%%dl, %%bl\n"
		"movb	%%dh, %%dl\n" 
		"xorl	(%%edi,%%ebx,4), %%eax\n"

		"movb	%%al, %%bl\n"
		"shrl	$8, %%eax\n"
		"xorb	%%dl, %%bl\n"
		"addl	$4, %%esi\n"
		"xorl	(%%edi,%%ebx,4), %%eax\n"

		"decl	%%ecx\n"
		"jnz	0b\n"

		"1:\n"
		"movl	%2, %%ecx\n"
		"andl	$3, %%ecx\n"
		"jz	2f\n"

		"movb	%%al, %%bl\n"
		"shrl	$8, %%eax\n"
		"xorb	(%%esi), %%bl\n"
		"xorl	(%%edi,%%ebx,4), %%eax\n"

		"decl	%%ecx\n"
		"jz	2f\n"

		"movb	%%al, %%bl\n"
		"shrl	$8, %%eax\n"
		"xorb	1(%%esi), %%bl\n"
		"xorl	(%%edi,%%ebx,4), %%eax\n"

		"decl	%%ecx\n"
		"jz	2f\n"

		"movb	%%al, %%bl\n"
		"shrl	$8, %%eax\n"
		"xorb	2(%%esi), %%bl\n"
		"xorl	(%%edi,%%ebx,4), %%eax\n"
	"2:\n"
		:
		: "a" (val), "g" (buf), "g" (bufsize)
		: "bx", "cx", "dx", "si", "di"
	);
	
	return val;
}
My only recommendation if it's happening with multiple versions of GCC is to completely get rid of them, then start over from scratch, since it looks like there's something from 3.4 that's getting shared w/ everything else.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #6  
Old 11-22-2008, 03:46 AM
llaarn
Fire Beetle
 
Join Date: Nov 2008
Location: QLD australia
Posts: 4
Angry atoi

for some strange reason my database is throwing wobblies about the atoi not being declared in the scope. Am i doing something wrong or is it a programing error?
Reply With Quote
  #7  
Old 11-22-2008, 10:27 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

That's just the newer version GCC you are using. I just tried something on this newer OS I have, since it gave me an assortment of errors, which most point to same two references (after Googling) -
In every error you see, for example you get an error in 'EQPacket.cpp' open the file up and add these two lines(might be better to add to *.h files) ;
Code:
#include <cstdlib>
#include <cstring>
It will be either one or the other, so I always added both.
I had to do this to around 20 files, so it takes a while.
Then finally I got a big 'zone.o' error , which I fixed by adding -fpermissive to WFLAGS in makefiles for zone.
After that it all compiled.
Reply With Quote
Reply

Thread Tools
Display Modes

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 10:07 AM.


 

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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3