Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gopherbot opened this issue Mar 14, 2013 · 4 comments
Closed

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

gopherbot opened this issue Mar 14, 2013 · 4 comments

Comments

@gopherbot
Copy link

by jon.forums:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. C:\DevKit-mblds\devkitvars.bat
2. cd C:\Apps\go-hg\src
3. all.bat

What is the expected output?

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.

What do you see instead?

# 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'

...

Which compiler are you using (5g, 6g, 8g, gccgo)?

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

Which operating system are you using?

Windows 7 32bit

Which version are you using?  (run 'go version')

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

Please provide any additional information below.

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


diff --git a/include/libc.h b/include/libc.h
--- a/include/libc.h
+++ b/include/libc.h
@@ -308,7 +308,7 @@
 
 #ifdef _WIN32
 
-#ifndef _WIN64
+#if !defined(_WIN64) && !defined(__MINGW64_VERSION_MAJOR)
 struct timespec {
    int tv_sec;
    long tv_nsec;
@davecheney
Copy link
Contributor

Comment 1:

Thank you. Please follow the contribution guidelines here,
http://golang.org/doc/contribute.html

@gopherbot
Copy link
Author

Comment 2 by jon.forums:

I do not wish to become a contributor at this time.

@rsc
Copy link
Contributor

rsc commented Mar 15, 2013

Comment 3:

This is a trivial fix. I'll handle it. Thanks for the report.

@rsc
Copy link
Contributor

rsc commented Mar 15, 2013

Comment 4:

This issue was closed by revision 0f1b488.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants