News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Linux/Ubuntu 9.10 compiling x64

Started by cacsar, December 16, 2009, 07:41:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cacsar

I'm trying to compile standard simutrans checked out from the svn according to the instructions on the wiki (http://en.wiki.simutrans.com/index.php/Source_Code). I believe I have satisfied the dependencies (including libbz2 which isn't mentioned). I've set config.default to use BACKEND=sdl, OSTYPE=linux. Using either COLOUR_DEPTH=16 or =8 gives me an error when building simgraph16.cc or simgraph8.cc respectively.
For simgraph8.cc I get the following
"simgraph8.cc: In function 'int display_calc_proportional_string_len_width(const char*, int)':
simgraph8.cc:2056: error: cannot convert 'int*' to 'size_t*' for argument '2' to 'utf16 utf8_to_utf16(const utf8*, size_t*)'
simgraph8.cc: In function 'int display_text_proportional_len_clip(KOORD_VAL, KOORD_VAL, const char*, int, PLAYER_COLOR_VAL, int)':
simgraph8.cc:2198: error: cannot convert 'int*' to 'size_t*' for argument '2' to 'utf16 utf8_to_utf16(const utf8*, size_t*)'"

For simgraph16.cc (after make clean)
"simgraph16.cc: Assembler messages:
simgraph16.cc:1943: Error: suffix or operands invalid for `jmp'"
However I suspect this line number is inaccurate as it varies with other options, as jmp only seems to appear on line 1943 (which I suspect again was different with other options).

Any advice on how to compile this? I tried this on the trunk and also on the rc102-2-1 tag.

i was mostly hoping that if I compiled it myself that it would be faster so that I could get above 5 frames per second in the second game year (Core 2 duo 2.2 GHz, 2GB ram). Since I haven't found any posts immediately obvious about game speed, I'm assuming for now that it is some sort of local problem possibly with using the x86 pre compiled version.

Incidentally I did test that I could compile OpenTTD as sort of suggested on the wiki article, and that compiled fine.

Any advice would be appreciated.


Dwachs

either compile with compile flag USE_C (add -DUSE_C in the last line in config.default) then the asm-Code is not used

or change the jmp statement in simgraph16.cc, line 1791 to "jmp * (%2)\n\t". But I suspect, the assembler code will crash for you (as it does for me on opensuse).
Parsley, sage, rosemary, and maggikraut.

jonasbb

I don't have 64bit, but I can tell you what things i use to compile simutrans for Ubuntu 9.04.

I installed these paketes libsdl1.2-dev, libsdl-mixer1.2-dev, libbz2-dev
and use this as config.default
BACKEND = sdl
COLOUR_DEPTH = 16
OSTYPE = linux
DEBUG = 3
OPTIMISE = 1
FLAGS =  -DSTEPS16