Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Build fails with syntax error on git.rc #14

Closed

Description

@mcknz

Appears to be related to issue #10 bd81699 -- not sure what the issue is, but I just commented out lines 2 and 3 and it built fine on Windows 8 x64.

Activity

  1. sschuberth commented on May 30, 2012

    @sschuberth

    Please copy & paste the exact error message here, and comment on whether you're using GCC or MSVC to compile (we are aware that the latter is currently broken with respect to adding the version information to the RC file; patches welcome).

  2. mcknz commented on May 30, 2012

    @mcknz
    Author

    I'm getting the following when running msysGit-netinstall-1.7.10-preview20120409:

        CC xdiff/xhistogram.o
        AR xdiff/lib.a
        RC git.res
    C:\msysgit\mingw\bin\windres.exe: git.rc:2: syntax error
    make: *** [git.res] Error 1
    

    When I remove these lines from git.rc and run msys.bat, the build completes:

    //FILEVERSION     MAJOR,MINOR,PATCH,0
    //PRODUCTVERSION  MAJOR,MINOR,PATCH,0
    

    I can submit a patch with those lines removed but not sure if that completely solves the problem. Are those just MSVC artifacts?

  3. dscho commented on May 30, 2012

    @dscho
    Member

    @mcknz no. Something else is going on on your side. MAJOR, MINOR and PATCH are expected to be replaced by the make process. You need to dig much deeper, probably using "make V=1".

  4. mcknz commented on May 30, 2012

    @mcknz
    Author

    thanks -- will dig.

  5. patthoyts commented on May 30, 2012

    @patthoyts
    Member

    Try
    $ rm -f git.res && make V=1 git.res
    windres -O coff
    -DMAJOR=1 -DMINOR=7 -DPATCH=11
    -DGIT_VERSION="\"1.7.11.rc0.6836.gdf573d9\"" git.rc -o git.res

  6. dscho commented on May 30, 2012

    @dscho
    Member

    @mcknz Thanks, very very much appreciated!

  7. postiffm commented on May 31, 2012

    @postiffm

    I'm a newbie, sorry if this is not very relevant.
    @patthoyts If -DPATCH=11, the build works. If -DPATCH=11-rc0, the build fails.
    I guess PATCH wants an integer?

    $ make V=1 git.res
    windres -O coff
    -DMAJOR=1 -DMINOR=7 -DPATCH=11-rc0
    -DGIT_VERSION="\"1.7.11-rc0\"" git.rc -o git.res
    C:\msysgit\mingw\bin\windres.exe: git.rc:2: syntax error
    make: *** [git.res] Error 1

    (I downloaded msysGit-netinstall-1.7.10-preview20120409.exe earlier today; building on Windows 7).

  8. dscho commented on May 31, 2012

    @dscho
    Member

    @postiffm I think you identified the problem, alright. Could you replace the line in the Makefile

    $(join -DMAJOR= -DMINOR= -DPATCH=, $(wordlist 1,3,$(subst ., ,$(GIT_VERSION))))

    with this and test again?

    $(join -DMAJOR= -DMINOR= -DPATCH=, $(wordlist 1,3,$(subst ., ,$(firstword $(subst -, ,$(GIT_VERSION))))))

    Thanks!

  9. dscho commented on May 31, 2012

    @dscho
    Member

    Actually, I take that back... ;-)

    I just tested here and the GIT_VERSION is '1.7.11.rc0.6836.gdf573d9' as for you, which $(wordlist ...) should interpret as the (1/7/11) triplet that windres needs.

    How did your GIT_VERSION become '1.7.11-rc0' (note the dash)?

  10. postiffm commented on May 31, 2012

    @postiffm

    Hi--I don't know how the '-rc0' got into the GIT_VERSION. All I did was
    download the package from google code, run it, and it took off doing its
    own bootstrap thing. The build failed at windres and that's when I
    contacted you. I will be back at my desk later and can look into it
    further. --Matt

    On 5/31/2012 2:40 AM, dscho wrote:

    Actually, I take that back... ;-)

    I just tested here and the GIT_VERSION is '1.7.11.rc0.6836.gdf573d9' as for you, which $(wordlist ...) should interpret as the (1/7/11) triplet that windres needs.

    How did your GIT_VERSION become '1.7.11-rc0' (note the dash)?


    Reply to this email directly or view it on GitHub:
    #14 (comment)

  11. dscho commented on May 31, 2012

    @dscho
    Member

    @postiffm it should be fixed in this commit: e6ada76

    Thanks for reporting and working with us to fix the bug!

  12. postiffm commented on May 31, 2012

    @postiffm

    @dscho Thanks. I tested by doing another from-scratch install and it worked.

    I noticed during the build process:


    Building and Installing Git

    GIT_VERSION = 1.7.11-rc0
    * new build flags or prefix
    CC credential-store.o
    * new link flags
    CC abspath.o
    ...

    during the build, my GIT-VERSION-FILE has

    GIT_VERSION = 1.7.11-rc0

    but after the build, it has

    $ cat GIT-VERSION-FILE
    GIT_VERSION = 1.7.11.rc0.6837.ge6ada76

    and

    $ git --version
    git version 1.7.11-rc0

    So is the bug /really/ fixed?

  13. dscho commented on May 31, 2012

    @dscho
    Member

    @postiffm yep, I think this is due to Git not being installed yet when the initial build is running.

  14. 10 remaining items

  15. added a commit that references this issue on Nov 7, 2014
  16. added 3 commits that reference this issue on Mar 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions