Author Topic: Help running a custom compiled build  (Read 3181 times)

0 Members and 1 Guest are viewing this topic.

Offline Fraoch

Help running a custom compiled build
« on: January 25, 2013, 03:46:56 PM »
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:

Code: [Select]
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!

Offline Markohs

  • DevTeam, Coder/patcher
  • Devotee
  • *
  • Posts: 1559
  • Total likes: 2
  • Helpful: 86
  • Languages: EN,ES,CAT
Re: Help running a custom compiled build
« Reply #1 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.

Offline Fraoch

Re: Help running a custom compiled build
« Reply #2 on: January 25, 2013, 04:07:39 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

Offline Markohs

  • DevTeam, Coder/patcher
  • Devotee
  • *
  • Posts: 1559
  • Total likes: 2
  • Helpful: 86
  • Languages: EN,ES,CAT
Re: Help running a custom compiled build
« Reply #3 on: January 25, 2013, 04:10:55 PM »
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.

Offline Fraoch

Re: Help running a custom compiled build
« Reply #4 on: January 25, 2013, 04:16:19 PM »
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.

Offline Markohs

  • DevTeam, Coder/patcher
  • Devotee
  • *
  • Posts: 1559
  • Total likes: 2
  • Helpful: 86
  • Languages: EN,ES,CAT
Re: Help running a custom compiled build
« Reply #5 on: January 25, 2013, 04:28:21 PM »
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.

Offline Fraoch

Re: Help running a custom compiled build
« Reply #6 on: January 25, 2013, 04:46:01 PM »
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.

Offline Markohs

  • DevTeam, Coder/patcher
  • Devotee
  • *
  • Posts: 1559
  • Total likes: 2
  • Helpful: 86
  • Languages: EN,ES,CAT
Re: Help running a custom compiled build
« Reply #7 on: January 25, 2013, 04:51:24 PM »
and the program exits? or keeps working? Gives a segmentation fault?

Offline Fraoch

Re: Help running a custom compiled build
« Reply #8 on: January 25, 2013, 04:55:16 PM »
Just nothing.  It outputs the text I listed:

Code: [Select]
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8821
  • Total likes: 322
  • Helpful: 229
  • Languages: De,EN,JP
Re: Help running a custom compiled build
« Reply #9 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.

Offline Fraoch

Re: Help running a custom compiled build
« Reply #10 on: January 25, 2013, 05:12:32 PM »
Guys, thanks for all the help!!

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:

Code: [Select]
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.

Offline Markohs

  • DevTeam, Coder/patcher
  • Devotee
  • *
  • Posts: 1559
  • Total likes: 2
  • Helpful: 86
  • Languages: EN,ES,CAT
Re: Help running a custom compiled build
« Reply #11 on: January 25, 2013, 05:17:52 PM »
Looks like the pak128 folder you installed misses files, download the full pack and put it on that directory.

Offline Fraoch

Re: Help running a custom compiled build
« Reply #12 on: January 25, 2013, 06:18:01 PM »
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?


Offline sdog

Re: Help running a custom compiled build
« Reply #13 on: January 25, 2013, 06:22:45 PM »
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
« Last Edit: January 25, 2013, 06:30:43 PM by sdog »

Offline Fraoch

Re: Help running a custom compiled build
« Reply #14 on: January 25, 2013, 06:30:38 PM »
Dangit, I still get:

Code: [Select]
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.

Offline Fraoch

Re: Help running a custom compiled build
« Reply #15 on: January 25, 2013, 06:36:23 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:

Code: [Select]
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)

Offline sdog

Re: Help running a custom compiled build
« Reply #16 on: January 25, 2013, 06:36:45 PM »
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

Offline Fraoch

Re: Help running a custom compiled build
« Reply #17 on: January 25, 2013, 06:54:34 PM »
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"?

Offline sdog

Re: Help running a custom compiled build
« Reply #18 on: January 25, 2013, 11:11:19 PM »
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