The International Simutrans Forum

Development => Technical Documentation => Topic started by: Ters on October 06, 2013, 03:03:44 PM

Title: Disabled windres command
Post by: Ters on October 06, 2013, 03:03:44 PM
I just noticed that simres.d is generated in the project root directory rather than in build/default like all the other .d files. As far as I can tell, this means that dependency evaluation for simres.rc don't work, so the entire .d file generation could as well be turned off.
The change (r5750) that disabled correct placement of simres.d has the comment "Fixes for compiling with Mingw GCC 4.x (current)". Does anyone remember any details about the problem? GCC 4.8.1 doesn't appear to have any problems if I uncomment the old command (and comment out the current).
Title: Re: Disabled windres command
Post by: prissi on October 06, 2013, 08:57:02 PM
I thing truelight did this, so I have no information on that either.
Title: Re: Disabled windres command
Post by: Dwachs on October 07, 2013, 06:42:19 AM
Ters means this commit I guess:

https://github.com/aburch/simutrans/commit/d2c4406bed6af20f85dbc6475fd65ec25a184640

Imho its worth to try to revert the change on common.mk ;)
Title: Re: Disabled windres command
Post by: Tron on April 04, 2014, 11:07:48 AM
Fixed in r7131.
Title: Re: Disabled windres command
Post by: TurfIt on April 16, 2014, 02:52:58 PM
r7131 breaks things again...


$ make
===> RES simres.rc
windres --preprocessor "g++ -E -xc -DRC_INVOKED -MMD -MF /build/simres.d -MT /build/simres.o" -O COFF simres.rc /build/simres.o
simres.rc:4:0: fatal error: opening dependency file /build/simres.d: No such file or directory
compilation terminated.
c:\MinGW\bin\windres.exe: preprocessing failed.
make: *** [/build/simres.o] Error 1
Title: Re: Disabled windres command
Post by: Ters on April 16, 2014, 03:06:38 PM
"/build"? That doesn't look right, unless you have a rather strange project setup.
Title: Re: Disabled windres command
Post by: TurfIt on April 16, 2014, 03:12:11 PM

BUILDDIR = /build

in config.default.  /build maps to RAM drive.
Title: Re: Disabled windres command
Post by: Ters on April 16, 2014, 03:30:49 PM
I deleted by build directory and started a build. There were no problems. My only difference is that I use the default BUILDDIR of "build/default" rather than "/build".
Title: Re: Disabled windres command
Post by: TurfIt on April 16, 2014, 04:18:46 PM
The default does work, but this beaks the BUILDDIR= ability.

===> RES simres.rc
windres --preprocessor "g++ -E -xc -DRC_INVOKED -MMD -MF build/default/simres.d -MT build/default/simres.o" -O COFF simr
es.rc build/default/simres.o
===> LD  build/default/sim
Title: Re: Disabled windres command
Post by: Ters on April 16, 2014, 04:43:11 PM
It is strange, because the command seems like it's interpreted correctly, since the error message shows a correct path. According to the error message, it seems it just can't open/create a file under /build. Perhaps the RAM-disk is full or something. Does it still fail if simres is moved earlier in the list of files to link?
Title: Re: Disabled windres command
Post by: TurfIt on April 16, 2014, 06:22:53 PM
Disk isn't full, and the order doesn't matter. I tried symlinks of trunk/build to the RAM disk, and mounting it under trunk/build instead of /build, but then none of the dependencies work. Limitations of MSYS I presume. But as long as the simres.d file is created in trunk/, it's happy with a nondefault BUILDDIR. Otherwise the simres.d just isn't created.
Title: Re: Disabled windres command
Post by: Ters on April 16, 2014, 07:38:55 PM
I would think the prime reason for setting a non-default builddir is because one doesn't want the build to happen in trunk (or subdirectory thereof) at all.