News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Help running a custom compiled build

Started by Fraoch, January 25, 2013, 03:46:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fraoch

Following prissi's suggestion here:

http://forum.simutrans.com/index.php?topic=11358.msg111205#msg111205

I think I have successfully built an executable following a few false starts.

However I have two issues:

1.  How do I compile for "-march i686 respective x86_64" as prissi suggests?  Not quite sure how to do that.

2.  My executable looks like it wants to work but doesn't display anything.  Double-clicking on it in Nautilus (GUI file viewer) does nothing.  Executing it in a shell gives this:

Use work dir /home/mark/trunk/simutrans/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Preparing display ...
Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.


...aaaaand nothing else.  No game window.

Any suggestions?  Thank you!

Markohs

Wich options did you enable in config.default? DEPTH was =16? On the other ubuntu problem thread I posted some info.

Fraoch

Quote from: Markohs on January 25, 2013, 04:05:46 PM
Wich options did you enable in config.default? DEPTH was =16? On the other ubuntu problem thread I posted some info.

Yes actually I followed your exact instructions:

http://forum.simutrans.com/index.php?topic=11356.msg111157#msg111157

Markohs

try with backend=posix , do a "make clean; make -j4" after editing the file

And check the directory where you place the binary has pak directories and the axiliary simutrans files.

Fraoch

No change.

Is it conflicting with the settings of an existing Simutrans instance on my system?

I have the old version from the Ubuntu repos installed as well as the latest standalone executable.

Markohs

maybe it's missing language text files?

I'd:

1) copy trunk/simutrans to a new directory
2) copy trunk/get_lang_files.sh to that directory
3) on that directory, install one pakset, for example pak128/
4) copy the compiled binary there, and execute ./get_lang_files.
5) execute the binary, ./sim

If that doesn't work, "cd ~ ; mv simutrans simutrans.backup", so it doesn't pick the settings from your old simutrans.

Fraoch

Unfortunately I went through all those steps with still no change!

Hmm.

Renaming the old directory to simutrans.backup did work as the latest standalone can no longer find saved games, so that worked and this new compiled version shouldn't be using settings from it.

Markohs

and the program exits? or keeps working? Gives a segmentation fault?

Fraoch

Just nothing.  It outputs the text I listed:

Use work dir /home/mark/simutrans test/simutrans/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Preparing display ...
Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.


and nothing happens.  A game window does not open and I get a prompt again.

My other versions of simutrans work fine except for finding the savegames.

prissi

You build a server only with posix, which does not display anything. To see something you need the backend SDL and a color_depth of 16 (which is set there).
With Phenom, multhtreads = 6 might work better.

Fraoch

Guys, thanks for all the help!!

Quote from: prissi on January 25, 2013, 05:02:43 PM
You build a server only with posix, which does not display anything. To see something you need the backend SDL and a color_depth of 16 (which is set there).
With Phenom, multhtreads = 6 might work better.

Some progress here!  I get a window that opens briefly then exits.

Output is:

Use work dir /home/mark/simutrans test/simutrans/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Preparing display ...
Screen Flags: requested=10, actual=10
Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.
parse_simuconf() at pak128/config/simuconf.tab:
Reading simuconf.tab successful!
Reading compatibility sound data ...
Loaded /home/mark/simutrans test/simutrans/pak128/sound/engine-start-diesel-1.wav to sample 0.
Loaded /home/mark/simutrans test/simutrans/pak128/sound/engine-start-diesel_d.wav to sample 1.
Loaded /home/mark/simutrans test/simutrans/pak128/sound/train-horn-diesel-0.wav to sample 2.
Loaded /home/mark/simutrans test/simutrans/pak128/sound/train-horn-steam-0.wav to sample 3.
Loaded /home/mark/simutrans test/simutrans/pak128/sound/click.wav to sample 4.
Loaded /home/mark/simutrans test/simutrans/pak128/sound/boing.wav to sample 5.
Loaded /home/mark/simutrans test/simutrans/pak128/sound/jackhammer.wav to sample 6.
Loaded /home/mark/simutrans test/simutrans/pak128/sound/gavel.wav to sample 7.
Loaded /home/mark/simutrans test/simutrans/pak128/sound/dock.wav to sample 8.
Loaded /home/mark/simutrans test/simutrans/pak128/sound/explosion.wav to sample 9.
Loaded /home/mark/simutrans test/simutrans/pak128/sound/cash.wav to sample 10.
could not load wav (Couldn't open /home/mark/simutrans test/simutrans/pak128/sound/beaches.wav)
could not load wav (Couldn't open /home/mark/simutrans test/simutrans/pak128/sound/forest.wav)
could not load wav (Couldn't open /home/mark/simutrans test/simutrans/pak128/sound/Water.wav)
could not load wav (Couldn't open /home/mark/simutrans test/simutrans/pak128/sound/desert.wav)
could not load wav (Couldn't open /home/mark/simutrans test/simutrans/pak128/sound/tropic.wav)
could not load wav (Couldn't open /home/mark/simutrans test/simutrans/pak128/sound/mediterran.wav)
could not load wav (Couldn't open /home/mark/simutrans test/simutrans/pak128/sound/temperate.wav)
could not load wav (Couldn't open /home/mark/simutrans test/simutrans/pak128/sound/tundra.wav)
could not load wav (Couldn't open /home/mark/simutrans test/simutrans/pak128/sound/rocky.wav)
could not load wav (Couldn't open /home/mark/simutrans test/simutrans/pak128/sound/arctic.wav)
Aborted (core dumped)


It's asking for files that don't exist.

Markohs

Looks like the pak128 folder you installed misses files, download the full pack and put it on that directory.

Fraoch

Odd, the pakset just does not have these files.  I wonder why it's looking for them, they're not there.

I got the pakset from here:

http://forum.simutrans.com/index.php?topic=11136.0

A fresh download is exactly like my saved pakset and does not contain these files.

Are there nightly paksets?  Maybe the latest Simutrans version I checked out is looking for the very latest (development/nightly) pakset?


sdog

#13
you could also try to start the binary with
-nosound -nomidi
it shouldn't look for the wave files then. Also there used to be some problems with sound a few years back, you turn off another possible cause of error.



nightly pak-sets:
http://simutrans-germany.com/~nightly/simutrans/en.html#_NPaks



you can get the sound files also directly from the pak128 svn on sourceforge or github:
https://github.com/pak128svn/simutrans-pak128/tree/master/pak128.prototype/sound



on a second glance, can you check if you have addons installed, that require those sounds? sounds for beaches, water, forest, etc aren't mentioned in pak128 sound.tab file

Fraoch

Dangit, I still get:

mark@Sauron:~/simutrans test/simutrans$ ./sim -nosound -nomidi
Use work dir /home/mark/simutrans test/simutrans/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Preparing display ...
Screen Flags: requested=10, actual=10
Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.
parse_simuconf() at pak128/config/simuconf.tab:
Reading simuconf.tab successful!
Aborted (core dumped)


A window appears and exits.

Fraoch

Quote from: sdog on January 25, 2013, 06:22:45 PM
on a second glance, can you check if you have addons installed, that require those sounds? sounds for beaches, water, forest, etc aren't mentioned in pak128 sound.tab file

I have no addons.

I tried a nightly pakset mentioned in your signature (openPAK128), but it's still not running:

mark@Sauron:~/simutrans test/simutrans$ ./sim -nosound -nomidi
Use work dir /home/mark/simutrans test/simutrans/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Preparing display ...
Screen Flags: requested=10, actual=10
Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.
parse_simuconf() at pak128.open.r1142/config/simuconf.tab:
Reading simuconf.tab successful!
Aborted (core dumped)

sdog

check with debugger:

$ gdb simutrans

at (gdb) prompt
run -nosound -nomidi

after program abort, get a backtrace with
bt

you can leave gdb with
q


if gdb is not installed already:  sudo apt-get install gdb

Fraoch

Aha!

When I ran the program through gdb, it paused the window.

The window was indicating a fatal error, that it could not find any language files (good call Markohs!)

I had run get_lang_files before and my directory was populated with languages so I'm not sure why that didn't work.  The second fix was to copy a working "text" directory.

I copied it from the latest executable.  It had 53 objects, the compiled version had 21, so obviously something went wrong here.  I deleted the compiled version and put in the prebuilt version and it works fine!  "-nosound -nomidi" is not required, it doesn't complain about sound files anymore.

Thank you for your help everyone!

One last question for completeness: prissi, how do I compile with "-march i686 respective x86_64"?

sdog

in your config default, add a line

FLAGS += -march i686

see the comment, with example, in the config.template:

# In order to use the flags, add a line like this: (-Dxxx)
# FLAGS = -DUSE_C