View Full Version : crc32.cpp compile error
qwicfingers
07-02-2008, 08:07 PM
I'm getting a compile error when I try to compile the world. :sad: Any help would be greatly appreciated.
lets see..
Intel p4
Ubuntu8.4 server
EQEmu-0.7.0-1118
tried both g++4.1 and 4.2
make clean and make depend work fine, but errors when I make
../common/crc32.cpp:105:2: warning: #warning "Comment out i386 define if your arch isn't x86"
../common/crc32.cpp: In static member function
trevius
07-02-2008, 09:25 PM
Looks like that is just a warning to me. You can ignore warnings, there are always tons of them. As long as you don't get an actual error, you are ok.
qwicfingers
07-02-2008, 10:43 PM
hmm just noticed that for some reason copy and paste failed me...
this is the error bit
../common/crc32.cpp:238: error: PIC register \‘bx\’ clobbered in \‘asm\’
make[1]: *** [../common/crc32.o] Error 1
trevius
07-02-2008, 11:44 PM
I don't know much about Ubuntu (I run debian), but if the compile is thinking you don't have x86 architecture, then maybe you are running the wrong kernel. I would check into upgrading your kernel to the right one for your P4.
You might also want to look over some of the wikis on Linux Servers from this page:
http://www.eqemulator.net/wiki/wikka.php?wakka=CategoryServer
Remove the "-Di386" directive from the makefile and it should compile fine.
qwicfingers
07-03-2008, 09:53 AM
cool thanks, I'll give that a try.
Angelox
07-03-2008, 10:39 AM
I noticed the newer the version distro I have, harder it gets to make a working EqEmu compile - I have one machine that compiles the emulator fine. it's Mandriva and has been updated for a few years now - it still uses gcc-3.4.6 and I 'think' this is why it still compiles. I have a machine with a new Mandriva (2008.1) which carrys gcc ver 4.2.3, and I've seen this error you have and a few others (using the same source). It became a challenge (for a while), and I actually got everything to compile void world and the 'clobbered' error. I did a lot of Googling on this error and it usually pointed to the new gcc version. I tried installing the 3.4.6 on my newer machine but then got other errors, really wasn't that important to me (since I already can compile on the older -version machine), so I gave it up.
If you want to try my version ( gcc-3.4.6.tar.gz ), I can post it for you- It's source, and will compile just about anywhere (unlike EqEmu).
Andrew80k
07-03-2008, 11:21 AM
I noticed the newer the version distro I have, harder it gets to make a working EqEmu compile - I have one machine that compiles the emulator fine. it's Mandriva and has been updated for a few years now - it still uses gcc-3.4.6 and I 'think' this is why it still compiles. I have a machine with a new Mandriva (2008.1) which carrys gcc ver 4.2.3, and I've seen this error you have and a few others (using the same source). It became a challenge (for a while), and I actually got everything to compile void world and the 'clobbered' error. I did a lot of Googling on this error and it usually pointed to the new gcc version. I tried installing the 3.4.6 on my newer machine but then got other errors, really wasn't that important to me (since I already can compile on the older -version machine), so I gave it up.
If you want to try my version ( gcc-3.4.6.tar.gz ), I can post it for you- It's source, and will compile just about anywhere (unlike EqEmu).
Hmmm. I'm using Fedora Core 8 with gcc 4.1.2 and I compiled the emu without any problems, including the bot code. So I don't think it's 4.1, but it might be 4.2 that's causing some issues. I'm not planning to go to FC9 anytime soon, so hopefully mine will continue to work.
qwicfingers
07-03-2008, 03:17 PM
Gave removing -Di386 a go and I get the same error. Tried gcc3.4.6 compile fails much earlier at EMuShareMem with a different error. Everything other then the world compiles fine with 4.2
What about the -march=i686 flag? I know the ubuntu kernel version is i386.
Gave removing -Di386 a go and I get the same error. Tried gcc3.4.6 compile fails much earlier at EMuShareMem with a different error. Everything other then the world compiles fine with 4.2
What about the -march=i686 flag? I know the ubuntu kernel version is i386.
I am on a 64bit platform and use a i386 chroot environment to compile and use eqemu.
to compile the i have to add #undef i386 in crc32.cpp
#include "crc32.h"
#include <assert.h>
#include <memory.h>
#undef i386
int32 CRC32Table[256] =
{
...
qwicfingers
07-03-2008, 05:42 PM
adding #undef i386 to my crc32.cpp worked. Thank you.
opyrus
07-09-2008, 12:53 AM
adding #undef i386 to my crc32.cpp worked. Thank you.
this also worked for me.
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.