Can't Compile

12 replies [Last post]
bburke
User offline. Last seen 17 years 8 weeks ago. Offline
Joined: 2007-01-31
Posts: 3

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.

Displacer
User offline. Last seen 14 years 8 weeks ago. Offline
Joined: 2006-11-27
Posts: 29

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.

bburke
User offline. Last seen 17 years 8 weeks ago. Offline
Joined: 2007-01-31
Posts: 3

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.

unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576

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

bburke
User offline. Last seen 17 years 8 weeks ago. Offline
Joined: 2007-01-31
Posts: 3

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.

Displacer
User offline. Last seen 14 years 8 weeks ago. Offline
Joined: 2006-11-27
Posts: 29

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?

Fabioamd87
Fabioamd87's picture
User offline. Last seen 14 years 39 weeks ago. Offline
Joined: 2007-04-29
Posts: 121

i've got the same error with ubuntu

banana.boy
User offline. Last seen 14 years 44 weeks ago. Offline
Joined: 2008-02-03
Posts: 25

Fabioamd87 allegedly wrote:
i've got the same error with ubuntu

http://img525.imageshack.us/img525/5365/schermatafabioabusrchedtm4.th.png


sudo apt-get install libsdl-ttf2.0-dev

Tested on Gutsy.

kleeparthy
User offline. Last seen 15 years 38 weeks ago. Offline
Joined: 2008-07-08
Posts: 2

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?

unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576

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.

kleeparthy
User offline. Last seen 15 years 38 weeks ago. Offline
Joined: 2008-07-08
Posts: 2

but what about the debian powerpc package available?

unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576

It's made automatically, noone ever tested it

Atmostrophic
User offline. Last seen 15 years 19 weeks ago. Offline
Joined: 2008-05-02
Posts: 58

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

Copyright © 2004-2023 Hedgewars Project. All rights reserved. [ contact ]