Since I did this today, the VERSION string inside reads "0.87". After some additions of dev-libraries I managed to get cmake to run without errors. So after creating a build directory and running
Code:
cmake $path_to_cmakelists.txt make
I got the following error:
Code:
CMakeFiles/engine-default.dir/__/__/System/Object.cpp.o: In function `Threading::AtomicCounterInt64::operator++()': ~/spring/rts/System/Platform/Threading.h:111: undefined reference to `__sync_fetch_and_add_8' ~/spring/rts/System/Platform/Threading.h:111: undefined reference to `__sync_fetch_and_add_8'
(note ~/spring is the directory of the git checkout)
I checked the file Threading.h and was slightly surprised that this function doesn't exist; the name is different. The line reads
sorry for the wrong zero positioning (0.87 -> 87.0).
It seems this:
jK wrote:
[...](there is a bug in the cmake files of 87.0, causing to not pass "-march=i686")
is actually "seen" by cmake. I noticed it during invocation:
Code:
-- Checking to see if CXX compiler accepts flag -march i686 -- Checking to see if CXX compiler accepts flag -march i686 - no INFO-march i686 flag not accepted
But it's only INFO level, not ERROR. On this machine I can't check whether the flag is passed or not, since its gcc can't handle it (for the reason given by abma).
Currently I'm trying to get another gcc version installed on the system (which fails for some other reason); when (or if...) that's done, I can try to compile spring again.
jK wrote:
[...](the guy here, will later no matter what use the official debian/ubuntu binary)
You're probably right, but still I'd like to be able to compile the thing myself and get my hands a little dirtier. I'd like to take a closer look at some things (e.g. like profiling, understand how the lua binding works)
reading, thinking and understanding helps sometimes.
First I tried to build 87.0 with a newer gcc version (4.6.3), simply to see if the flag works. It didn't, because the wrong syntax in the cmake file, as jk pointed out. I applied the change -- tada, it worked. Then I tried to build spring with the Ubuntu built-in compiler (4.4.3), which also worked; the cmake error disappeared, compilation and linking went fine. I could run spring.
So, everything's green now. There's only one thing I needed to tweak: I tried to run spring from the build directory (I didn't see right away how to change the install directory, so I refrained from `make instal`). It didn't work, since it still needed manual linking of the freefont (FreeSansBold.otf). This might be no problem, if `make install` is done; but I didn't see any (soft-)link command.
set INSTALL_DIR to where you want to install and.. yeah about liek that. i extracted these lines out of my build scripts.. not sure if this is really allyou need, but i think so. add your own special stuff of course.
ubuntu lts 10.04 here, had same problem: [...]/Threading.h:111: undefined reference to `__sync_fetch_and_add_8'
have i done that right:
first i entered "cmake ." then i edited "CMakeCache.txt" inserted "i686" on end of line: MARCH_FLAG:STRING=
then run "make" - and it worked.
after that i wondered "hey, i got an athlon. why optimize for i686?" so i changed to something else, i tried "k8" for an athlon all architecture options are found here: http://gcc.gnu.org/onlinedocs/gcc/i386- ... tions.html
worked too - but i haven't noticed any differences.
Some sse-optimizations are a damn lot faster when optimizing for with the correct athlon flag (mostly you want `amdfam10`), but it's nothing you will notice ingame (even when the code runs 10-100x faster, the code is just <1% of the total).
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum