Error in the Build script

Error in the Build script

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Error in the Build script

Post by HAARP »

Spring fails to compile on my Gentoo.

Code: Select all

/var/tmp/portage/games-strategy/spring-0.77_p2/work/spring_0.77b2/rts/lib/hpiutil2/scrambledfile.cpp:1: error: bad value (native) for -march= switch
It's trying to use -march=native, that however is only possbile with GCC 4.2+ (correct me if I'm wrong), not with 4.1.2 like I use.

I didn't find anything regarding -march/-mtune in the ebuild, so it must be the fault of Spring's Build Script.
There should be a check to ensure that -march=native is supported. If not, the CFLAGS line in /etc/make.conf can be used to determine -march/-mtune (at least on Gentoo)
wryoung98
Posts: 7
Joined: 09 Oct 2008, 20:36

Re: Error in the Build script

Post by wryoung98 »

Code: Select all

CFLAGS="-mtune=k8 -march=k8 -O2 -pipe" emerge spring springlobby
and

Code: Select all

CFLAGS="-march=athlon64 athlon64 -O2 -pipe" emerge spring springlobby 
Give the same result.

Any other ideas. I'm using an amd64 chip of course by the way :-)
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Re: Error in the Build script

Post by HAARP »

This has nothing to do with your CFLAGS. The build script sets its own flags.

I just upgraded portage to 2.1.4.5. This magically seems to fix this bug.
edit: more likely this was the new Spring ebuild. Sorry I got this confused.
Of course another build error just had to appear..:

Code: Select all

/var/tmp/portage/games-strategy/spring-0.77_p2-r1/work/spring_0.77b2/rts/lib/luabind/luabind/class.hpp: In member function ├óÔé¼╦£luabind::class_<T, X1, X2, X3>& luabind::class_<T, X1, X2, X3>::def(luabind::detail::operator_<Derived>, const Policies&)├óÔé¼Ôäó:
/var/tmp/portage/games-strategy/spring-0.77_p2-r1/work/spring_0.77b2/rts/lib/luabind/luabind/class.hpp:1027: error: no matching function for call to ├óÔé¼╦£raw(boost::arg<1>&)├óÔé¼Ôäó
/var/tmp/portage/games-strategy/spring-0.77_p2-r1/work/spring_0.77b2/rts/lib/luabind/luabind/class.hpp: In member function ├óÔé¼╦£luabind::class_<T, X1, X2, X3>& luabind::class_<T, X1, X2, X3>::def(luabind::detail::operator_<Derived>)├óÔé¼Ôäó:
/var/tmp/portage/games-strategy/spring-0.77_p2-r1/work/spring_0.77b2/rts/lib/luabind/luabind/class.hpp:1037: error: no matching function for call to ├óÔé¼╦£raw(boost::arg<1>&)├óÔé¼Ôäó
make[2]: *** [rts/lib/CMakeFiles/luabind.dir/luabind/src/class_registry.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 30%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/__/__/rts/System/Platform/Linux/DataDirLocater.cpp.o
[ 30%] Building CXX object AI/CMakeFiles/KAIK-0.13.dir/__/rts/System/creg/Serializer.cpp.o
[ 30%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/System/FileSystem/Archive7Zip.cpp.o
[ 30%] /var/tmp/portage/games-strategy/spring-0.77_p2-r1/work/spring_0.77b2/rts/lib/luabind/luabind/class.hpp: In member function ├óÔé¼╦£luabind::class_<T, X1, X2, X3>& luabind::class_<T, X1, X2, X3>::def(luabind::detail::operator_<Derived>, const Policies&)├óÔé¼Ôäó:
/var/tmp/portage/games-strategy/spring-0.77_p2-r1/work/spring_0.77b2/rts/lib/luabind/luabind/class.hpp:1027: error: no matching function for call to ├óÔé¼╦£raw(boost::arg<1>&)├óÔé¼Ôäó
/var/tmp/portage/games-strategy/spring-0.77_p2-r1/work/spring_0.77b2/rts/lib/luabind/luabind/class.hpp: In member function ├óÔé¼╦£luabind::class_<T, X1, X2, X3>& luabind::class_<T, X1, X2, X3>::def(luabind::detail::operator_<Derived>)├óÔé¼Ôäó:
/var/tmp/portage/games-strategy/spring-0.77_p2-r1/work/spring_0.77b2/rts/lib/luabind/luabind/class.hpp:1037: error: no matching function for call to ├óÔé¼╦£raw(boost::arg<1>&)├óÔé¼Ôäó
Building CXX object AI/CMakeFiles/KAIK-0.13.dir/__/rts/System/creg/creg.cpp.o
make[2]: *** [rts/lib/CMakeFiles/luabind.dir/luabind/src/stack_content_by_name.cpp.o] Error 1
make[1]: *** [rts/lib/CMakeFiles/luabind.dir/all] Error 2
Last edited by HAARP on 10 Oct 2008, 00:47, edited 1 time in total.
User avatar
Cremuss
Posts: 364
Joined: 28 Oct 2006, 21:38

Re: Error in the Build script

Post by Cremuss »

I just post here because you linked this thread on my post :oops:

So with the new ebuild "spring-0.77_p2-r1", the compilation go further than with spring-0.77_p2 without doing any tweaking (no portage updating, nothing)
[...]
[ 40%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/LuaParserAPI.cpp.o
[ 40%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/Syncer.cpp.o
[ 40%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/SyncServer.cpp.o
[ 41%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/stdafx.cpp.o
[ 41%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Game/GameSetup.cpp.o
Linking CXX shared library libunitsync.so
[ 42%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Game/GameData.cpp.o
[ 42%] Built target unitsync
[ 42%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Game/PlayerBase.cpp.o
[ 42%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Game/GameVersion.cpp.o
[ 42%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Game/CommandMessage.cpp.o
[ 42%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Game/ChatMessage.cpp.o
[ 42%] [ 43%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Game/Action.cpp.o
Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Game/Console.cpp.o
[ 43%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Lua/LuaIO.cpp.o
[ 43%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Lua/LuaParser.cpp.o
[ 43%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Lua/LuaUtils.cpp.o
[ 43%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Map/MapParser.cpp.o
[ 43%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/Rendering/Textures/TAPalette.cpp.o
Linking CXX shared library libspringserver.so
[ 43%] Built target springserver
make: *** [all] Error 2
*
* ERROR: games-strategy/spring-0.77_p2-r1 failed.
* Call stack:
* ebuild.sh, line 49: Called src_compile
* environment, line 2797: Called cmake-utils_src_compile
* environment, line 599: Called cmake-utils_src_make
* environment, line 648: Called die
* The specific snippet of code:
* emake "$@" || die "Make failed!";
* The die message:
* Make failed!
Don't know if it can helps :roll:
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Error in the Build script

Post by Auswaschbar »

does not help, please upload the complete log.
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Re: Error in the Build script

Post by HAARP »

My paste already contains the relevant part, whereas Cremass' only seems to be the unfinished jobs after the actual error occured.
If that's not what you meant, here's a full paste of everything: http://pastebin.com/m37540717


btw. I noticed that it now detects Java and does not hard-depend on it anymore. If you want to do it the proper way tho, it should go into an USE-flag :P
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Error in the Build script

Post by imbaczek »

HAARP: this looks like a compiler that either misrepresents itself or is too old/new. which one do you use?
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Re: Error in the Build script

Post by HAARP »

GCC 4.1.2, as stated in the starting post.

edit: Oh joy, the new b3 ebuild depends on >=GCC 4.2. This blows.
Post Reply

Return to “Linux”