Fork me on GitHub
  February 23, 2018, 10:13:28 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: lighting.cpp Build Error  (Read 3908 times)
Matt - Kerplunc
Newbie
*
Posts: 11


Founder of Kerplunc and MinecraftGSP


View Profile WWW
« 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?
Logged

thegk01
Newbie
*
Posts: 39



View Profile
« Reply #1 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 Wink )

-- 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 Wink
« Last Edit: May 04, 2011, 09:07:55 pm by thegk01 » Logged

// A wild INCONSISTENCY appears!
//
//  --------------
// | >FIGHT  PkMn |
// |  ITEM   RUN  |
//  --------------
//
// deoxxa uses MACRO ATTACK!

from plugin.h
ellisgl
Newbie
*
Posts: 6


View Profile
« Reply #2 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
Logged
ellisgl
Newbie
*
Posts: 6


View Profile
« Reply #3 on: May 07, 2011, 12:48:54 am »

I changed to k8 from x86_64
Logged
thegk01
Newbie
*
Posts: 39



View Profile
« Reply #4 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 Wink
Logged

// A wild INCONSISTENCY appears!
//
//  --------------
// | >FIGHT  PkMn |
// |  ITEM   RUN  |
//  --------------
//
// deoxxa uses MACRO ATTACK!

from plugin.h
Fador
Administrator
Full Member
*****
Posts: 126


View Profile
« Reply #5 on: May 07, 2011, 11:41:14 am »

Lighting.cpp isn't actually even used so you can just remove it from the build =)
Logged
thegk01
Newbie
*
Posts: 39



View Profile
« Reply #6 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.
Logged

// A wild INCONSISTENCY appears!
//
//  --------------
// | >FIGHT  PkMn |
// |  ITEM   RUN  |
//  --------------
//
// deoxxa uses MACRO ATTACK!

from plugin.h
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!