The International Simutrans Forum

 

Author Topic: r5899 nightly fails to start  (Read 23921 times)

0 Members and 1 Guest are viewing this topic.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5531
  • Languages: EN, NO
Re: r5899 nightly fails to start
« Reply #105 on: October 02, 2012, 04:41:07 AM »
I have a Windows machine and it runs there, so Wine doesn't help much with testing. The main problems seem to be to convince gcc to target an old enough CPU. I would need a virtual machine and a copy of Windows XP for that. Or I need to find a way to grep an executable for specific instructions.

It is possible that the pre-compiled mingw for Windows is configured to target old enough architectures, but mine is also set up to link dynamically (or worse, half dynamically and half statically), so one also needs a bunch of DLLs. It also gives a big load of ugly warnings during linking.
 
EDIT:
I found a way to grep an executable (though in the end, I didn't use grep). The fisttp instructions seemed to originate from the mingw-runtime, which for some reasons get compiled using host settings rather than target settings (if I got my cross compilation nomenclature right). After googling a way to override host settings for that particular package (I can't downgrade my entire system to pentium2), I got an executable with no signs of fisttp. I've updated http://simutrans-germany.com/files/upload/simgdi_r5961.zip with this fix. If it works, wernieman can try to do the same to his setup.
« Last Edit: October 02, 2012, 05:29:34 AM by Ters »

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #106 on: October 02, 2012, 05:53:58 AM »
When you can give me a "white Paper", I could try it .... and I test with my PC, because it is quicker than the Server

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #107 on: October 02, 2012, 10:58:58 AM »
EDIT:
I found a way to grep an executable (though in the end, I didn't use grep). The fisttp instructions seemed to originate from the mingw-runtime, which for some reasons get compiled using host settings rather than target settings (if I got my cross compilation nomenclature right). After googling a way to override host settings for that particular package (I can't downgrade my entire system to pentium2), I got an executable with no signs of fisttp. I've updated http://simutrans-germany.com/files/upload/simgdi_r5961.zip with this fix. If it works, wernieman can try to do the same to his setup.
This version of 5961 runs - at first glance. Game started right. I shall see what I shall see later - if there is something wrong.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5531
  • Languages: EN, NO
Re: r5899 nightly fails to start
« Reply #108 on: October 07, 2012, 01:31:11 PM »
In case anyone is wondering, I sent wernieman my recipe for apparent success a few days ago. It's not exactly trivial, so I don't know how long it will take to put into effect (or even if it has been already).

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #109 on: October 07, 2012, 05:03:59 PM »
Thanks to Ters for the Info ... but the last Day I was not at Home (Holliday :o) )

Today I make the mingw32 with the Info from Ters ... so we could loog for the next Version. But only GDI! The SDL is at the moment an old Version auf the mingw32 Cross-Compiler

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #110 on: October 26, 2012, 10:06:45 AM »
Some days passed ... and still no new nightly works. So I have to use nightly by Ters.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5531
  • Languages: EN, NO
Re: r5899 nightly fails to start
« Reply #111 on: October 26, 2012, 02:45:27 PM »
That's not really a nightly, just a random snapshot. And one that by now is older than the latest stable release.

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #112 on: October 26, 2012, 02:55:54 PM »
I downloaded latest available nightly - 6006 and there game crashes with the same log as in the beginning - bz_.... but I did not know about stable release. So I am going to test it ... and I shall see what I shall see.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #113 on: October 28, 2012, 11:37:47 AM »
WinSDL or WinGDI?

At the moment it i a different compilation!

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #114 on: October 28, 2012, 01:04:34 PM »
Both fail to start.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #115 on: October 29, 2012, 07:30:45 AM »
shid .... I don´t know to solve it :o(

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #116 on: October 29, 2012, 08:33:58 AM »
And how Ters solved it? That at least GDI was running (aside of minor problems of type that my monitor resize screen in wrong way* - but it is not something that is on side of game).

With SDL is no problem - but with GDI monitor resizes screen. And in own screen of monitor (Philips, 192E) is not visible all what should be visible. Mostly it is clear on status line - because coords or icon for time axis are not fully visible ... mostly after shutting down of game screen (with windows key or so). But as I wrote, it is not on side of game.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9516
  • Languages: De,EN,JP
Re: r5899 nightly fails to start
« Reply #117 on: October 29, 2012, 10:08:17 AM »
GDI switches the monitor to 16 bit only when using full screen. If the graphics card then changes its timing, then this is a bug in the driver of the graphics card. (Since 16 bit modes are not used much any more, those are often not really tested.)

Either use SDL or not the fullscreen mode and just maximize the window.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #118 on: November 06, 2012, 03:47:06 PM »
So ... at the moment ... did it work?

I could not test :o(

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #119 on: November 06, 2012, 03:59:38 PM »
It still does not run - 6029. I try (almost) all versions (as they appear on nightlies pages) - and as I tested number 6000 from nightlies pages, it does not run - while number 6000 published in stable ...

It is strange.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #120 on: November 06, 2012, 04:08:11 PM »
Is there a different between GDI and SDL?

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #121 on: November 06, 2012, 05:31:20 PM »
No. There is not any difference.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #122 on: November 08, 2012, 04:08:28 PM »
... but they are different Compiler :o(

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #123 on: November 08, 2012, 07:14:16 PM »
May it be ... it is all that is clear to me. I don't comprehend it.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5531
  • Languages: EN, NO
Re: r5899 nightly fails to start
« Reply #124 on: November 08, 2012, 08:06:58 PM »
Can VaclavMacurek report the address it crashes on this time, for both GDI and SDL? And can wernieman provide unstripped executables? I've disassembled both the SDL and the GDI executable, and the SDL version has fewer fisttp instructions than the GDI version, though both still have a few. I don't think I actually checked the entire files before. The ones both have are all localized in a small section of code, so it's probably just one source left.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #125 on: November 08, 2012, 08:15:00 PM »
You only need the unstriped exe?

Then I make a spezial Compiler run on next Weekend.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5531
  • Languages: EN, NO
Re: r5899 nightly fails to start
« Reply #126 on: November 08, 2012, 08:22:30 PM »
You only need the unstriped exe?

I think that should do. (No -s when linking.)

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #127 on: November 08, 2012, 08:42:24 PM »
Debug logs in attachment.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #128 on: November 11, 2012, 06:24:43 PM »
I make a spezial run
http://www.wernieman.de/6041.zip

But ... it is the Version r6041 .. and in th zip-File are the both unstriped exe

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #129 on: November 11, 2012, 06:37:25 PM »
Tested ... and result is in attachment.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5531
  • Languages: EN, NO
Re: r5899 nightly fails to start
« Reply #130 on: November 11, 2012, 07:34:39 PM »
It's exactly the same code in both, in the function __gdtoa. __gdtoa is part of the mingw-runtime, so unless there is another implementation of it coming in from some other source, mingw-runtime still isn't built with the correct target.

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #131 on: November 11, 2012, 07:39:01 PM »
correct target? what target do you speak about? this is something where I am lost.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4587
  • Languages: EN, DE, AT
Re: r5899 nightly fails to start
« Reply #132 on: November 11, 2012, 07:50:04 PM »
target = processor family / type. The post is directed at wernieman ;)

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #133 on: November 11, 2012, 07:59:14 PM »
Mhhh ..... In the last year Gentoo change the crossdev-skript ... :o(

At the Moment the make show:
Code: [Select]
CHOST=i686-pc-mingw32
CBUILD=x86_64-pc-linux-gnu
ARCH=x86

HOSTCC=x86_64-pc-linux-gnu-gcc
E_MACHINE=EM_386

ROOT=/usr/${CHOST}/

#ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_KEYWORDS="x86"

USE="${ARCH} zlib bindist make-symlinks minimal"

#MARCH_TUNE="-march=armv4t -mtune=arm9tdmi"     #arm-softfloat-linux-uclibc
#MARCH_TUNE="-march=armv5t -mtune=xscale"       #armv5teb-softfloat-linux-gnueabi

#CFLAGS="-Os -pipe ${MARCH_TUNE} -fomit-frame-pointer"
CFLAGS="-march=pentium3"
CXXFLAGS="${CFLAGS}"

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5531
  • Languages: EN, NO
Re: r5899 nightly fails to start
« Reply #134 on: November 12, 2012, 05:56:03 AM »
As I told you before in a private message, mingw-runtime is for some reason not compiled with the crossdev settings, but with your host settings. It's a bug in my opinion, and the workaround is to the set package specific settings in package.env.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #135 on: November 12, 2012, 03:07:23 PM »
Soo ...... I make a new try ... please check: http://www.wernieman.de/6043.zip

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5531
  • Languages: EN, NO
Re: r5899 nightly fails to start
« Reply #136 on: November 12, 2012, 04:45:54 PM »
Soo ...... I make a new try ... please check: http://www.wernieman.de/6043.zip
I still find the same fisstpl instructions.
 
EDIT:
It would perhaps be less time consuming if you ran i686-pc-mingw32-objdump -d sim.exe | grep fisttp yourself. If you get more or less than 8 hits, something has changed, for better or worse.
« Last Edit: November 12, 2012, 07:16:34 PM by Ters »

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #137 on: November 12, 2012, 08:29:32 PM »
I make at know different Versions ... but I get the same Problem :o (

Thanks for the Tip with
i686-pc-mingw32-objdump -d sim.exe | grep fisttp

Edit:
Tommorow a make a new try with some Information I get from some friends ..

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: r5899 nightly fails to start
« Reply #138 on: November 13, 2012, 12:13:58 PM »
O.K. next try: http://www.wernieman.de/6045.zip

Please test (I hope it works ....)

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: r5899 nightly fails to start
« Reply #139 on: November 13, 2012, 04:29:02 PM »
And you hope right. This runs right.