Can't Compile
I've been trying to compile the hedgewars source under a UNIX bash shell in Mac OS X on my Power Mac G4. Everything compiles fine until hwengine, which fails every time. I have the Apple developer tools (gcc), QT 4.2.2, SDL, Cmake, and FPC as prescribed by the build instructions. Here I will post screenshots of the stages in the build process.
First, Cmake runs without any problems:
Then, the hedgewars executable is compiled:
But then, hwengine fails to link:
I would be greatly indebted to anyone who may know what is going haywire. This game is the only decent worms clone I can find that isn't Windows-only. Any help in this matter would be greatly appreciated. Thank you.
Note: The hedgewars executable still compiles and runs under Darwin, but I can't start a game because hwengine will not compile.
This problem is noexecstack option seems not supported by linker included in Apple developer tools (gcc). It would be helpful, if you provide a version info about this compiler linker (gcc --version and ld --version). And if you wish this sources to be simply compiled right now, remove "-k-z" "-knoexecstack" from hedgewars/CMakeLists.txt at line 64 and recompile sources. Anyway, we will think about an automated test for this case in cmake scripts for future release.
gcc: gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)
ld: Apple Computer, Inc. version cctools-576.obj~23
Still getting the same errors when I try to compile after removing those two flags. Let me know if you need any more information. Thanks.
It seems, CMake cached all compile commands. You could try to delete CMakeCache.txt and compile again. Also, you may want to manually run
fpc "-B" "-Sd" "-Xs" "-OG" "-O2" "../bin" "-Cs2000000" hwengine.dpr
I tried re-downloading the sources and compiling from scratch, but still no luck on hwengine, and when I try to manually compile hwengine.dpr as above, I get fatal errors concerning uConst.pas. I would venture to guess that perhaps it is not working because I am not under an i386 environment. On second thought though, there is a powerpc Debian package linked to from the downloads section. Regretably, however, I can't test compile under a powerpc linux environment, so if anyone has the ability to do that I would be interested in learning the results. Thanks.
Interesting, your first compilation with your screenshots ended at linking stage. It means it was compiled successfully. But your second compilation from scratch without unsupported linking flags failed at compilation stage. Something seems wrong here. Maybe you can provide additional information about this fatal errors with uConst.pas?
i've got the same error with ubuntu
sudo apt-get install libsdl-ttf2.0-dev
Tested on Gutsy.
when adding the following lines to hwengine.dpr, the engine compiles fine on ppc..
$linklib sdl
$linklib sdl_net
$linklib sdl_ttf
$linklib sdl_image
$linklib sdl_mixer
but still i couldn't manage to play, because after compiling the game starts okay, but then it says "unable to run engine :1 (/usr/local/bin/hwengine".. any thoughts on that?
Most probably, hwengine fails due to issues related to architecture endianess... Hedgewars haven't ever been tested on big-endian machines, as developers don't have access to any.
but what about the debian powerpc package available?
It's made automatically, noone ever tested it
Hello everyone.
Fabio, you're missing the sdl-net library.
If you want to compile under Ubuntu, running the script located under http://hedgewars.org/node/590 runs well.
On 7.10 it runs well. Never tried on 8.04, but that should work, too...
Regards
Atmostrophic