PDA

View Full Version : AMD64, Gentoo = Compile Errors


creiss
01-16-2007, 04:13 AM
Greetings all,

I am running amd64 and Gentoo, and I seem to have this problem during compiling (latest version):

gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wcomment -Wcast-align -Wno-deprecated -g -march=i686 -O -pthread -pipe -I../common/SocketLib -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD -DDEBUG=5 -DEQDEBUG=5 -DSHAREMEM -DCATCH_CRASH -DNO_PIDLOG -DFIELD_ITEMS -DIRC -Di386 -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/include/mysql -DHAVE_ERRNO_AS_DEFINE=1 -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux/CORE ../common/timer.cpp -o ../common/timer.o
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
../common/timer.cpp:1: error: CPU you selected does not support x86-64 instruction set
../common/timer.cpp:1: error: CPU you selected does not support x86-64 instruction set
make: *** [../common/timer.o] Error 1


This happens when i "make" in the world dir, EMuShareMem compiled without a glitch. When I attempt to compile zone i get a whole truckload of

cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
guild_mgr.cpp:0: error: CPU you selected does not support x86-64 instruction set
guild_mgr.cpp:0: error: CPU you selected does not support x86-64 instruction set


errors.

Any help would be greatly appreciated.

-Chris.

bleh
01-17-2007, 08:43 AM
Try removing "-march=i686". If it compiles, try more specific ones from gcc man page. Also try option -m64.

edit: I haven't compiled 64-bit version ;)

creiss
01-17-2007, 02:35 PM
Heh,

Yeah i figured as much, and just built a 32 bit binary, works :)
Who am I to argue with results. And I actually bet its faster for my
1-client setup :D (at the very least the performance gain is negligible).

-Chris.

gernblan
07-31-2007, 12:48 PM
Yeah, have to watch those CFLAGS ;)

I myself only add one at a time and run a test compile... add another, repeat... etc. as I tweak out my Gentoo systems.

cubber
08-01-2007, 03:55 AM
I think the proper gcc -march flag for amd64 would be -march=k8. At least that is what I use in my /etc/make.conf for all my amd64 gentoo servers at work. My gentoo box that I run eqemu on is an old 1 Gig athlon-tbird. I make sure to change all of the makefiles to reflect this by switching -march=i686 to -march=athon-tbird and -O to -O2. The same settings that I use in make.conf. I also make sure to remove the -pg flags while I am in the makefiles. I have yet to have a compile error "knock no wood"...

Here is a helpful guide on the gentoo wiki about cflags http://gentoo-wiki.com/Safe_Cflags

gernblan
08-01-2007, 12:04 PM
Sounds like a good balance, Cubber