FAQ
Build for version 1.4 fails on Windows. I have MinGW with gcc installed.

C:\go\src>all.bat
# Building C bootstrap tool.
cmd/dist
cmd/dist/build.c:21:16: unknown escape sequence '\g'
cmd/dist/build.c:22:22: unknown escape sequence '\g'

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Brainman at Jan 14, 2015 at 10:55 pm
    Please, show us the output of

    set | find "GO"

    command. Thank you.

    Alex

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Tad Vizbaras at Jan 14, 2015 at 11:22 pm
    This is it:

    C:\>set | find "GO"
    LOGONSERVER=\\HPX

    Not sure how is it helpful.

    There is what I did:
    1. Installed Windows 7.
    2. Executed this in command line:
    hg clone -r go1.4 https://code.google.com/p/go
    3. At this point I have C:\go folder with subfolders all the Go bat files
    like make.bat and all.bat, etc.

    On Wednesday, January 14, 2015 at 5:55:54 PM UTC-5, brainman wrote:

    Please, show us the output of

    set | find "GO"

    command. Thank you.

    Alex
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Brainman at Jan 15, 2015 at 12:07 am

    On Thursday, 15 January 2015 10:21:24 UTC+11, Tad Vizbaras wrote:
    C:\>set | find "GO"
    LOGONSERVER=\\HPX

    Not sure how is it helpful.
    Your original report was:

    C:\go\src>all.bat
    # Building C bootstrap tool.
    cmd/dist
    cmd/dist/build.c:21:16: unknown escape sequence '\g'
    cmd/dist/build.c:22:22: unknown escape sequence '\g'

    If you look at cmd/dist/build.c:21, you will see it it says:

    char *goroot = GOROOT_FINAL;

    where GOROOT_FINAL is set in make.bash

    gcc -O2 -Wall -Werror -o cmd/dist/dist.exe -Icmd/dist %DEFGOROOT%
    cmd/dist/buf.c ...

    where

    set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""

    where

    if "x%GOROOT_FINAL%"=="x" set GOROOT_FINAL=%GOROOT%

    where

    set GOROOT=%CD%

    So the value of GOROOT_FINAL or GOROOT seems to be the problem. Or the CD
    value (current directory). But you say that none of GO... variables are
    set. So it is puzzling.

    Perhaps you can change make.bat to print DEFGOROOT value before calling
    gcc. It might give you some clues about what is happening.
    There is what I did:
    1. Installed Windows 7.
    2. Executed this in command line:
    hg clone -r go1.4 https://code.google.com/p/go
    3. At this point I have C:\go folder with subfolders all the Go bat files
    like make.bat and all.bat, etc.

    Just tried that and make.bat runs without any problems here.

    Alex

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Tad Vizbaras at Jan 15, 2015 at 1:01 am
    Question is: what gcc compiler should I use to build Go 1.4 on Windows?
    I am trying MinGW gcc.

    On Wednesday, January 14, 2015 at 7:07:29 PM UTC-5, brainman wrote:
    On Thursday, 15 January 2015 10:21:24 UTC+11, Tad Vizbaras wrote:
    C:\>set | find "GO"
    LOGONSERVER=\\HPX

    Not sure how is it helpful.
    Your original report was:

    C:\go\src>all.bat
    # Building C bootstrap tool.
    cmd/dist
    cmd/dist/build.c:21:16: unknown escape sequence '\g'
    cmd/dist/build.c:22:22: unknown escape sequence '\g'

    If you look at cmd/dist/build.c:21, you will see it it says:

    char *goroot = GOROOT_FINAL;

    where GOROOT_FINAL is set in make.bash

    gcc -O2 -Wall -Werror -o cmd/dist/dist.exe -Icmd/dist %DEFGOROOT%
    cmd/dist/buf.c ...

    where

    set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""

    where

    if "x%GOROOT_FINAL%"=="x" set GOROOT_FINAL=%GOROOT%

    where

    set GOROOT=%CD%

    So the value of GOROOT_FINAL or GOROOT seems to be the problem. Or the CD
    value (current directory). But you say that none of GO... variables are
    set. So it is puzzling.

    Perhaps you can change make.bat to print DEFGOROOT value before calling
    gcc. It might give you some clues about what is happening.
    There is what I did:
    1. Installed Windows 7.
    2. Executed this in command line:
    hg clone -r go1.4 https://code.google.com/p/go
    3. At this point I have C:\go folder with subfolders all the Go bat
    files like make.bat and all.bat, etc.

    Just tried that and make.bat runs without any problems here.

    Alex
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Brainman at Jan 15, 2015 at 1:27 am

    On Thursday, 15 January 2015 12:01:39 UTC+11, Tad Vizbaras wrote:
    Question is: what gcc compiler should I use to build Go 1.4 on Windows?
    I am trying MinGW gcc.
    I use mingw too.

    C:\>gcc --version
    gcc (GCC) 4.8.1
    Copyright (C) 2013 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Alex

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Tad Vizbaras at Jan 15, 2015 at 1:52 am
    Mine says:

    C:\>gcc --version
    gcc (GCC) 3.4.4 (msys special)
    Copyright (C) 2004 Free Software Foundation, Inc.

    Where did you get version 4.8.1 from? I keep on stumbling on some
    auto-downloaders.
    Is there simple standalone install/setup.exe package for gcc?

    On Wednesday, January 14, 2015 at 8:27:54 PM UTC-5, brainman wrote:
    On Thursday, 15 January 2015 12:01:39 UTC+11, Tad Vizbaras wrote:
    Question is: what gcc compiler should I use to build Go 1.4 on Windows?
    I am trying MinGW gcc.
    I use mingw too.

    C:\>gcc --version
    gcc (GCC) 4.8.1
    Copyright (C) 2013 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Alex
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Ian Lance Taylor at Jan 15, 2015 at 2:03 am

    On Wed, Jan 14, 2015 at 5:52 PM, Tad Vizbaras wrote:
    Mine says:

    C:\>gcc --version
    gcc (GCC) 3.4.4 (msys special)
    Copyright (C) 2004 Free Software Foundation, Inc.
    That is over ten years old.

    Where did you get version 4.8.1 from? I keep on stumbling on some
    auto-downloaders.
    Is there simple standalone install/setup.exe package for gcc?
    Have you looked at http://mingw.org ?

    Ian

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Tad Vizbaras at Jan 15, 2015 at 2:07 am
    Got it. Thank you.
    On Wednesday, January 14, 2015 at 9:03:21 PM UTC-5, Ian Lance Taylor wrote:

    On Wed, Jan 14, 2015 at 5:52 PM, Tad Vizbaras <tadvi...@gmail.com
    <javascript:>> wrote:
    Mine says:

    C:\>gcc --version
    gcc (GCC) 3.4.4 (msys special)
    Copyright (C) 2004 Free Software Foundation, Inc.
    That is over ten years old.

    Where did you get version 4.8.1 from? I keep on stumbling on some
    auto-downloaders.
    Is there simple standalone install/setup.exe package for gcc?
    Have you looked at http://mingw.org ?

    Ian
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Peter Howard at Jan 15, 2015 at 3:41 pm
    Is your Windows 64 bit?
    I found a few weeks ago that the gcc bundled with the MinGW from mingw.org
      would not compile the Go 1.4 source.
    Although in my case it arose from incompatible header files.
    I was advised (in this forum) to use instead use the 64 bit MinGW from
    here: (http://tdm-gcc.tdragon.net/)


    (see the original thread
    here: https://groups.google.com/forum/#!topic/golang-nuts/hQrANA7C92U)

    Pete

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • JussiJ at Jan 16, 2015 at 1:05 pm

    On Friday, January 16, 2015 at 2:41:16 AM UTC+11, Peter Howard wrote:
    I found a few weeks ago that the gcc bundled with the MinGW from mingw.org
    would not compile the Go 1.4 source.
    I too ran into similar build issues using the latest MinGW bundle and
    similarly I was able to build Go fine when I instead used the TDM-GCC
    compiler.


    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 14, '15 at 10:43p
activeJan 16, '15 at 1:05p
posts11
users5
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase