wesnoth 1.6.5 on N900

This forum contains announcements of official releases of the game. This is also the place to get help for compiling or installing it.

Moderators: Forum Moderators, Developers

wesnoth 1.6.5 on N900

Postby gibrovacco » January 27th, 2010, 8:59 pm

Hi,

I just managed to compile wesnoth for N900, but right after starting its execution startup I get a segfault. According to GDB, it happens while parsing the font configuration:

Code: Select all
Starting program: /home/opt/maemo/usr/games/wesnoth --nosound -w
Battle for Wesnoth v1.6.5
Started on Wed Jan 27 22:40:27 2010


Data directory: /usr/share/games/wesnoth
User configuration directory: /home/user/.wesnoth1.6


Program received signal SIGSEGV, Segmentation fault.
0x005c8138 in tokenizer::tokenizer(std::istream&) ()
0x005c8138 <_ZN9tokenizerC1ERSi+108>:    ldr    r3, [r2, #20]
(gdb) bt
#0  0x005c8138 in tokenizer::tokenizer(std::istream&) ()
#1  0x005b32d4 in (anonymous namespace)::parser::parser(config&, std::istream&) ()
#2  0x005b7300 in read(config&, std::istream&, std::string*) ()
#3  0x0005e204 in font::load_font_config() ()
#4  0x00023e18 in do_gameloop(int, char**) ()
#5  0x00024df8 in main ()


Reading other cross-compilation threads and the Diablo (n810) records in the maemo community it appears I need the dejavu fonts or the whole freetype package, but I'm not sure about which folder will these fonts been searched into. Any ideas?
gibrovacco
 
Posts: 4
Joined: January 27th, 2010, 8:54 pm

Re: wesnoth 1.6.5 on N900

Postby Jozrael » January 27th, 2010, 9:24 pm

wesnoth/data/hardwired/fonts.cfg :).
Jozrael
 
Posts: 920
Joined: June 2nd, 2006, 1:39 pm
Location: NJ, USA.

Re: wesnoth 1.6.5 on N900

Postby ivanovic » January 28th, 2010, 11:46 am

@Jozrael
Not exactly, that is just the config file. The fonts itself are expected somewhere else.

@gibrovacco
How have you started Wesnoth? Have you copied over all the build folder? If you did so you will also have the font/ folder with DejaVu and the one used for chinese in there. Beside this: How have you compiled and started the game? Just to be sure you should start from the "root" of the wesnoth folder (the one where you find the subfolders "data/", "fonts/" and some others) with this command:
Code: Select all
wesnoth .

The stray '.' at the end notates where the game files are meant to be found. If started directly it just looks at the prefix/datadir path given when compiling and that's it. In general I also recommend that you use the --smallgui option since this one will make the game run in a resolution down to 800x480 (unless you use the tinygui build option which will also require you to run the install command so that imagemagick does some work on resizing images; I recommend going for --smallgui though!).

In general:
How have you compiled the game? Which build system and which parameters have you used?
User avatar
ivanovic
Lord of Translations
 
Posts: 959
Joined: September 28th, 2004, 10:10 pm
Location: Bergkamen, Germany

Re: wesnoth 1.6.5 on N900

Postby gibrovacco » January 28th, 2010, 6:52 pm

Thanks ivanovic, I'll try some of the suggestions asap. In general, wesnoth has been compiled used the scratchbox tool and porting the debian folder already available for the n810.

The application is launched from a random folder, but as you can see in the original dump I reported:

Code: Select all
Data directory: /usr/share/games/wesnoth
User configuration directory: /home/user/.wesnoth1.6


the program correctly detects the data directory. Trying to build the DejaVu font package and installing it on the N900 doesn't help that much.

I just wonder why the parsing of the fonts configuration fails on the N900 and works on other systems? may this be due to the external c++ libraries?

I think it's time to dive into the code and hack a little.. :D
gibrovacco
 
Posts: 4
Joined: January 27th, 2010, 8:54 pm

Re: wesnoth 1.6.5 on N900

Postby gibrovacco » January 28th, 2010, 7:42 pm

Unfortunately, none of the suggestions worked at the end. I even tried to copy the whole /usr/share/wesnoth folder on the target but the fault is still there.

Here is the configuration used to compile wesnoth:

Code: Select all
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -Os
endif

CONFIGURE_SWITCHES = --enable-lowmem --disable-editor --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --disable-rpath --prefix=/usr --mandir=\$${prefix}/share/man --bindir=\$${prefix}/games --with-datadir-name=wesnoth --with-desktopdir=\$${prefix}/share/applications/hildon --with-icondir=\$${prefix}/share/icons/hicolor/40x40/hildon --with-localedir=\$${prefix}/share/locale --with-fifodir=/var/run/wesnothd --datadir=\$${prefix}/share/games --disable-server --with-fribidi CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
gibrovacco
 
Posts: 4
Joined: January 27th, 2010, 8:54 pm

Re: wesnoth 1.6.5 on N900

Postby ivanovic » January 29th, 2010, 10:26 am

Instead of copying an installed folder from the debian install better get the source tarball and compile yourself using one of the normal build systems. For example I know that it is rather easy to use cmake inside the scratchbox. It should also be possible to build yourself with autotools and whatever. In general I'd guess that you do want to have -O2 as optimization level.
If you don't know how to build things yourself using one of the three available build systems, have a look at the compiling page in the wiki.
User avatar
ivanovic
Lord of Translations
 
Posts: 959
Joined: September 28th, 2004, 10:10 pm
Location: Bergkamen, Germany

Re: wesnoth 1.6.5 on N900

Postby gibrovacco » February 7th, 2010, 5:40 pm

After digging more I found a possible reason for the fault: it appears libstdc++ is compiled with different options (e.g. pic) in scratchbox and in the device. I cannot understand why, but maybe it is due to some optimizations. I'm now recompiling the libs (and thus the whole g++) and boost. This is one of the days of the year in which I'd like to have spent more money on my PC ;)
gibrovacco
 
Posts: 4
Joined: January 27th, 2010, 8:54 pm

Re: wesnoth 1.6.5 on N900

Postby eean » February 27th, 2010, 9:44 pm

How goes it? Still rebuilding the entire fremantle C++ toolchain? o.O
eean
 
Posts: 3
Joined: November 27th, 2004, 12:36 am


Return to Release Announcements, Compiling & Installation

Who is online

Users browsing this forum: No registered users and 3 guests