Author Topic: Disabled windres command  (Read 2574 times)

0 Members and 1 Guest are viewing this topic.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4577
  • Total likes: 167
  • Helpful: 106
  • Languages: EN, NO
Disabled windres command
« 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).

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8698
  • Total likes: 300
  • Helpful: 228
  • Languages: De,EN,JP
Re: Disabled windres command
« Reply #1 on: October 06, 2013, 08:57:02 PM »
I thing truelight did this, so I have no information on that either.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4164
  • Total likes: 147
  • Helpful: 147
  • Languages: EN, DE, AT
Re: Disabled windres command
« Reply #2 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 ;)
Parsley, sage, rosemary, and maggikraut.

Offline Tron

Re: Disabled windres command
« Reply #3 on: April 04, 2014, 11:07:48 AM »
Fixed in r7131.

Offline TurfIt

Re: Disabled windres command
« Reply #4 on: April 16, 2014, 02:52:58 PM »
r7131 breaks things again...

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

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4577
  • Total likes: 167
  • Helpful: 106
  • Languages: EN, NO
Re: Disabled windres command
« Reply #5 on: April 16, 2014, 03:06:38 PM »
"/build"? That doesn't look right, unless you have a rather strange project setup.

Offline TurfIt

Re: Disabled windres command
« Reply #6 on: April 16, 2014, 03:12:11 PM »
Code: [Select]
BUILDDIR = /build
in config.default.  /build maps to RAM drive.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4577
  • Total likes: 167
  • Helpful: 106
  • Languages: EN, NO
Re: Disabled windres command
« Reply #7 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".

Offline TurfIt

Re: Disabled windres command
« Reply #8 on: April 16, 2014, 04:18:46 PM »
The default does work, but this beaks the BUILDDIR= ability.
Code: [Select]
===> 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

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4577
  • Total likes: 167
  • Helpful: 106
  • Languages: EN, NO
Re: Disabled windres command
« Reply #9 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?

Offline TurfIt

Re: Disabled windres command
« Reply #10 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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4577
  • Total likes: 167
  • Helpful: 106
  • Languages: EN, NO
Re: Disabled windres command
« Reply #11 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.