Menu

#86 mhmake compilation error

v1.0_(example)
open
nobody
None
5
2018-09-02
2018-08-29
laur
No

Tried compiling the project but got only as far as compling mhmake, which appears to be failing because of missing headers; have near-zero experience with developing on windows, any pointers? VS2017 is installed with JDK, so all deps should be there.

error output

Discussion

  • marha

    marha - 2018-08-29

    You need to have the following tools installed: flex, bison and python. I am using the ones of cygwin (buildall.sh)

     
  • laur

    laur - 2018-08-30

    Ah, wasn't obvious from the error.
    Got to new error now:

    Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
    Build started 30/08/2018 01:44:22.
    Project "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmakevc10.sln" on node 1 (Build target(s)).
    ValidateSolutionConfiguration:
      Building solution configuration "Release|x64".
    Project "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmakevc10.sln" (1) is building "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj" (2) on node 1 (default targets).
    InitializeBuildStatus:
      Touching "Release64\mhmake.tlog\unsuccessfulbuild".
    CustomBuild:
      Performing Custom Build Tools
      Performing Custom Build Tools
      /usr/bin/m4:src/bisondata/lalr1.cc:389: ERROR: end of file in string
    src\mhmakeParser.y : fatal error : invalid @ in skeleton: @ [C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj]
      Error reading input file Release64\mhmakeparser.cpp
    Done Building Project "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj" (default targets) -- FAILED.
    Done Building Project "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmakevc10.sln" (Build target(s)) -- FAILED.
    
    Build FAILED.
    
    "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmakevc10.sln" (Build target) (1) ->
    "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj" (default target) (2) ->
    (CustomBuild target) ->
      src\mhmakeParser.y : fatal error : invalid @ in skeleton: @ [C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj]
    
        0 Warning(s)
        1 Error(s)
    
    Time Elapsed 00:00:02.70
    Error compiling mhmake for release
    Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
    Build started 30/08/2018 01:44:22.
    Project "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmakevc10.sln" on node 1 (Build target(s)).
    ValidateSolutionConfiguration:
      Building solution configuration "Release|x64".
    Project "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmakevc10.sln" (1) is building "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj" (2) on node 1 (default targets).
    InitializeBuildStatus:
      Touching "Release64\mhmake.tlog\unsuccessfulbuild".
    CustomBuild:
      Performing Custom Build Tools
      Performing Custom Build Tools
      /usr/bin/m4:src/bisondata/lalr1.cc:389: ERROR: end of file in string
    src\mhmakeParser.y : fatal error : invalid @ in skeleton: @ [C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj]
      Error reading input file Release64\mhmakeparser.cpp
    Done Building Project "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj" (default targets) -- FAILED.
    Done Building Project "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmakevc10.sln" (Build target(s)) -- FAILED.
    
    Build FAILED.
    
    "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmakevc10.sln" (Build target) (1) ->
    "C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj" (default target) (2) ->
    (CustomBuild target) ->
      src\mhmakeParser.y : fatal error : invalid @ in skeleton: @ [C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj]
    
        0 Warning(s)
        1 Error(s)
    
    Time Elapsed 00:00:02.70
    Error compiling mhmake for release
    

    note

      /usr/bin/m4:src/bisondata/lalr1.cc:389: ERROR: end of file in string
    src\mhmakeParser.y : fatal error : invalid @ in skeleton: @ [C:\Users\layr\Documents\dev\vcxsrv-code\tools\mhmake\mhmake.vcxproj]
    

    line 389 is this:
    b4_defines_if(
    can't see anything wrong with it.

     
  • marha

    marha - 2018-08-30

    Are you sure you are using the correct versions of bison and flex (versions currently in cygwin):
    ❯❯❯ bison --version bison (GNU Bison) 3.0.4
    Geschreven door Robert Corbett en Richard Stallman.
    ❯❯❯ flex --version flex 2.6.4

     
  • laur

    laur - 2018-09-01

    Yes, can confirm I have exact same versions of flex & bison.

     
  • laur

    laur - 2018-09-01

    How important is it to have perl installed exactly under C:? Already had required perl on my PATH, but just noticed instructions say it needs to be a portable edition and living right under C.

    Edit: tried now also w/ portable ver insalled, still the same:

    $ ls -lt /cygdrive/c/perl
    total 36
    drwxrwx---+ 1 layr Domain Users     0 Sep  1 12:41 win32
    drwxrwx---+ 1 layr Domain Users     0 Sep  1 12:40 perl
    drwxrwx---+ 1 layr Domain Users     0 Sep  1 12:40 licenses
    drwxrwx---+ 1 layr Domain Users     0 Sep  1 12:40 cpan
    drwxrwx---+ 1 layr Domain Users     0 Sep  1 12:40 data
    drwxrwx---+ 1 layr Domain Users     0 Sep  1 12:40 c
    -rwxrwx---+ 1 layr Domain Users  2747 Jun 23 15:30 portable.perl
    -rwxrwx---+ 1 layr Domain Users  1485 Jun 23 15:30 README.txt
    -rwxrwx---+ 1 layr Domain Users 12659 Jun 23 15:23 DISTRIBUTIONS.txt
    -rwxrwx---+ 1 layr Domain Users   808 Jan  2  2017 portableshell.bat
    
     

    Last edit: laur 2018-09-01
  • marha

    marha - 2018-09-01

    The place where perl is installed is not important (except for the fact that in buildall.sh currently the path is hard coded).
    The important thing is that not the perl of cygwin is used, but a windows version of perl. This is because of the makefiles of openssl are not compatible with the cygwin version of perl.

     
  • laur

    laur - 2018-09-01

    Yes, I had edited buildall.sh hot to require that installation path.

    Any suggestion re. that
    /usr/bin/m4:src/bisondata/lalr1.cc:389: ERROR: end of file in string

    exception?

     
  • marha

    marha - 2018-09-01

    I have no clue. I am running the compilation on a windows 10 pc and on a windows 7 pc, without any problem. Both are 64-bit.

    Maybe the version of m4 installed:
    ❯❯❯ /usr/bin/m4 --version
    m4 (GNU M4) 1.4.18
    Packaged by Cygwin (1.4.18-1)

    Could it be that the file lalr1.cc got converted from unix format to dos format?

     
  • laur

    laur - 2018-09-02

    m4 ver the same as well.
    Linefeed format is a good call. I do recall having to change buildall.sh to unix format.

    Do you have core.autocrlf explicitly configured in your gitconfig?

    Edit: that was it - on windows, git's core.autocrlf (check with git config --get core.autocrlf) is set to true, meaning files are checked-out in windows format.

    Either change git config, or convert all files to unix format via
    find . -type f -print0 | xargs -0 dos2unix

    mhmake compiles, can be closed now.

     

    Last edit: laur 2018-09-02

Log in to post a comment.

MongoDB Logo MongoDB