Mineserver Community

Mineserver => Support => Topic started by: Matt - Kerplunc on April 11, 2011, 09:08:26 am



Title: lighting.cpp Build Error
Post by: Matt - Kerplunc on April 11, 2011, 09:08:26 am
Code:
[  1%] Building CXX object CMakeFiles/mineserver.dir/src/lighting.cpp.o
/root/build/src/lighting.cpp:1: error: bad value (native) for -march= switch
/root/build/src/lighting.cpp:1: error: bad value (native) for -mtune= switch
make[2]: *** [CMakeFiles/mineserver.dir/src/lighting.cpp.o] Error 1
make[1]: *** [CMakeFiles/mineserver.dir/all] Error 2
make: *** [all] Error 2


Running CentOS 5 64bit on an OpenVZ VPS. Has built just fine previously, recent issue (Since the 1.4 Beta patch time ish). Any ideas?


Title: Re: lighting.cpp Build Error
Post by: thegk01 on May 02, 2011, 09:41:45 pm
Hey,

The problem is that "-march" is setted to "switch". This should contain the CPU type, but it does not. I don't know why I could build mineserver before without this problem, but I could.

You must execute the "cmake ." command, and then, replace "-march=switch" with "-march=x86-64" * in these files:
"mineserverdirectory/CMakeFiles/mineserver.dir/flags.make"
"mineserverdirectory/plugins/CMakeFiles/binlog.dir/flags.make"
"mineserverdirectory/plugins/CMakeFiles/commands.dir/flags.make"
"mineserverdirectory/plugins/CMakeFiles/crapmops.dir/flags.make" (Even if we could delete this one, sadly)
"mineserverdirectory/plugins/CMakeFiles/curseui.dir/flags.make"
"mineserverdirectory/plugins/CMakeFiles/filelog.dir/flags.make"
"mineserverdirectory/plugins/CMakeFiles/flatpermissions.dir/flags.make"
"mineserverdirectory/plugins/CMakeFiles/nBreak.dir/flags.make"
"mineserverdirectory/plugins/CMakeFiles/nether.dir/flags.make"
"mineserverdirectory/plugins/CMakeFiles/passiveMobs.dir/flags.make"

Okay. After that, you can run the "make all install" command without problems (hopefully ;) )

-- thegk01


* I have an Intel Core 2 Duo 1,83 GHz Processor... Maybe it is not the right text in the "-march=" variable for you, but go try it ;)


Title: Re: lighting.cpp Build Error
Post by: ellisgl on May 07, 2011, 12:23:03 am
Yeah - I did "find . -type f -exec sed -i 's/march=native/march=x86_64/g' {} \;"
Says that "x86_64" is a bad value


Title: Re: lighting.cpp Build Error
Post by: ellisgl on May 07, 2011, 12:48:54 am
I changed to k8 from x86_64


Title: Re: lighting.cpp Build Error
Post by: thegk01 on May 07, 2011, 10:54:32 am
I can't look up what I had, but it was either "x86-64" or "x86_64". Try both ;)


Title: Re: lighting.cpp Build Error
Post by: Fador on May 07, 2011, 11:41:14 am
Lighting.cpp isn't actually even used so you can just remove it from the build =)


Title: Re: lighting.cpp Build Error
Post by: thegk01 on May 07, 2011, 12:21:11 pm
It is not the lighting.cpp which causes the error. The problem are the incorrect CMake-Files... I think if lighting.cpp is removed, "make all install" stops with the same error at the next file.
It seems that cmake does'nt set the CPU type correctly and puts a wrong value into the flags.