Menu

#1227 MinGW-w64/MSYS2 fails to build RC

v3.6
closed-fixed
nobody
None
Windows
Buildsystem
2021-12-30
2020-05-10
No

Hello,
when building vice, I got this error:

windres ../../../src/arch/sdl/icon.rc -O coff -o ../../../src/arch/sdl/icon.res
C:\msys64\mingw64\bin\windres.exe: impossibile aprire icon file "/c/cygwin64/home/Carlo/vice-emu-code/vice/data/common/icon.ico": No such file or directory
make[4]: *** [Makefile:1325: ../../../src/arch/sdl/icon.res] Errore 1

This happened because icon.rc has been created with /c/cygwin64/home/Carlo/vice-emu-code/vice/data/common/icon.ico inside and since this is an absolute path, WINDRES could not use it.
Actually, generating icon.rc from an icon.rc.proto is redundant, beside the fact the indtroduced this error. In my opinion, you could just provide an icon.rc file with this content:

id ICON "icon.ico"

and then, after you remove from src\arch\gtk3\data\Makefile.am and src\arch\sdl\Makefile.am the stuff for generating $(WINDRES_RC_TARGET), just add -I$(top_srcdir)/data/common to WINDRES.
I did it myself already on my local sources, it works and it made also things simpler.

Sincerely.

1 Attachments

Discussion

  • gpz

    gpz - 2020-05-10

    is this with trunk?
    (please post patches on the patches tracker)

     

    Last edit: gpz 2020-05-10
  • compyx

    compyx - 2020-05-10

    Something in this patch is off. First of all substituting $(top_builddir) with $(top_srcdir) seems wrong, that'll probably break out-of-tree building.
    That said, I don't have Windows anymore, so I cannot test this.

    But, at least set svn to use Unix by default, I'm seeing some ^M's that should not be there.

     
  • Greg King

    Greg King - 2020-05-10

    First of all, substituting $(top_builddir) with $(top_srcdir) seems wrong; that'll probably break out-of-tree building.

    The .RC file won't be built anymore. Instead, a permanent generic version of it will be substituted for the prototype file in the (repo's) source tree. (A -I command-line option, for include paths, will be used to find the common icon file.)

    But at least, set svn to use Unix by default; I'm seeing some ^M's that should not be there.

    Carlo,
    you must run your new "icon.rc" file (and maybe, the files that you editted) through the dos2unix command. And, you must use the chmod command to remove the eXecute permission flags from "icon.rc". (Those things were put there by a Windows text editor.)

     
    • Carlo Bramini

      Carlo Bramini - 2020-05-11

      Hello,
      thanks for the replies.
      Yes, I downloaded sources with SVN and the patch had been created from trunk.
      I will also do these correction and I will create a new ticket under the patches tracker for posting updated patch as requested.

      Sincerely.

       
  • compyx

    compyx - 2020-08-11

    Can we close this? I think this got fixed a while ago?

     
    • Carlo Bramini

      Carlo Bramini - 2020-08-12

      Hello,
      no, unfortunately it has not been fixed yet.
      However, this issue could be safely closed because the same patch with correct line endings has been posted to the patches tracker as requested:

      https://sourceforge.net/p/vice-emu/patches/229/

       
  • compyx

    compyx - 2020-10-02

    Should be fixed with commit r38655, please check.

     
  • Carlo Bramini

    Carlo Bramini - 2020-10-02

    It seems fixed here. Thank you very much!

     
  • compyx

    compyx - 2020-10-03
    • status: open --> closed-fixed
     
  • compyx

    compyx - 2020-10-03

    Good, closing then.

     

Log in to post a comment.

MongoDB Logo MongoDB