Page 1 of 1
Error in the Build script
Posted: 09 Oct 2008, 12:28
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)
Re: Error in the Build script
Posted: 09 Oct 2008, 20:42
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

Re: Error in the Build script
Posted: 09 Oct 2008, 20:48
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
Re: Error in the Build script
Posted: 09 Oct 2008, 23:52
by Cremuss
I just post here because you linked this thread on my post
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

Re: Error in the Build script
Posted: 10 Oct 2008, 00:16
by Auswaschbar
does not help, please upload the complete log.
Re: Error in the Build script
Posted: 10 Oct 2008, 00:57
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
Re: Error in the Build script
Posted: 10 Oct 2008, 01:12
by imbaczek
HAARP: this looks like a compiler that either misrepresents itself or is too old/new. which one do you use?
Re: Error in the Build script
Posted: 10 Oct 2008, 14:15
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.