yukuku / golang

Automatically exported from code.google.com/p/golang
0 stars 0 forks source link

[PATCH] build with mingw-w64 toolchains on Win7 32bit #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. C:\DevKit-mblds\devkitvars.bat
2. cd C:\Apps\go-hg\src
3. all.bat

What is the expected output? What do you see instead?

+++ Expected +++

C:\Apps\go-hg\src>gcc --version
gcc (rev10, Built by MinGW-builds project) 4.7.2

C:\Apps\go-hg\src>all.bat
...
ALL TESTS PASSED

---
Installed Go for windows/386 in C:\Apps\go-hg
Installed commands in C:\Apps\go-hg\bin
*** You need to add C:\Apps\go-hg\bin to your PATH.

+++ Actual +++

# Building compilers and Go bootstrap tool.
lib9
In file included from C:\Apps\go-hg\src\lib9\cleanname.c:28:0:
C:\Apps\go-hg\include/libc.h:312:8: error: redefinition of 'struct timespec'
In file included from 
c:\devkit-mblds\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../..
/../i686-w64-mingw32/include/process.h:12:0,
                 from c:\devkit-mblds\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../..
/../i686-w64-mingw32/include/unistd.h:11,
                 from C:\Apps\go-hg\include/u.h:61,
                 from C:\Apps\go-hg\src\lib9\cleanname.c:27:
c:\devkit-mblds\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64
-mingw32/i
nclude/sys/types.h:89:8: note: originally defined here
In file included from C:\Apps\go-hg\src\lib9\cleanname.c:28:0:
C:\Apps\go-hg\include/libc.h:320:12: error: conflicting types for 'nanosleep'
In file included from 
c:\devkit-mblds\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../..
/../i686-w64-mingw32/include/time.h:285:0,
                 from C:\Apps\go-hg\include/u.h:72,
                 from C:\Apps\go-hg\src\lib9\cleanname.c:27:
c:\devkit-mblds\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64
-mingw32/i
nclude/pthread_time.h:84:28: note: previous declaration of 'nanosleep' was 
hereIn file inc
luded from C:\Apps\go-hg\src\lib9\_p9dir.c:28:0:
C:\Apps\go-hg\include/libc.h:312:8: error: redefinition of 'struct timespec'In 
file includ
ed from C:\Apps\go-hg\src\lib9\atoi.c:27:0:
C:\Apps\go-hg\include/libc.h:312:8: error: redefinition of 'struct timespec'In 
file includ
ed from C:\Apps\go-hg\src\lib9\_exits.c:27:0:
C:\Apps\go-hg\include/libc.h:312:8: error: redefinition of 'struct timespec'

...

What version of the product are you using? On what operating system?

C:\Apps\go-hg\src>hg id
cc6264adc22b+ tip

Windows 7 32bit

Please provide any additional information below.

Succesfully tested patch with mingwbuilds gcc 4.7.2 (mingw-w64), rubenvb gcc 
4.7.2 (mingw-w64), and mingw gcc 4.6.2 (mingw.org).

FYI: I also had to remove the following from my %USERPROFILE%/.hgrc as it 
caused compile failures because it corrupted the content of 
%GOROOT%\VERSION.cache. It caused the first line of the file to be 
"develwarning: failed to set color mode to win32" followed by a second line of 
version info.

  [color]
  mode = win32

Original issue reported on code.google.com by jon.for...@gmail.com on 14 Mar 2013 at 2:53

Attachments:

GoogleCodeExporter commented 9 years ago
Posted to the wrong list; please close.

Original comment by jon.for...@gmail.com on 14 Mar 2013 at 9:46