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

cmd/cgo: linker cannot find __mingw_fprintf on Windows #5986

Closed
gopherbot opened this issue Jul 29, 2013 · 20 comments
Closed

cmd/cgo: linker cannot find __mingw_fprintf on Windows #5986

gopherbot opened this issue Jul 29, 2013 · 20 comments
Milestone

Comments

@gopherbot
Copy link

by trink@mozilla.com:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. go run linkerror.go


What is the expected output?
Program compiles and runs.


What do you see instead?
# command-line-arguments
__mingw_fprintf(0): not defined


Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
mingw - gcc version 4.7.1 (tdm64-1)


Which operating system are you using?
Windows 7 x64


Which version are you using?  (run 'go version')
go version devel +4d9c3095de9d Thu Jul 25 09:53:57 2013 -0400 windows/amd64
and
go version go1.1.1 windows/amd64


Please provide any additional information below.

Attachments:

  1. linkerror.go (454 bytes)
@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 1:

Labels changed: added priority-later, go1.2, removed priority-triage.

Status changed to Accepted.

@ianlancetaylor
Copy link
Contributor

Comment 3:

For the record, this works fine on GNU/Linux (Ubuntu Precise).
Can you run "go run -ldflags -v linkerror.go" and paste the output here?
I think we need somebody familiar with mingw.  Where is __mingw_fprintf defined? 
Building this should invoke the external linker; why is that unable to find
__mingw_fprintf?

Labels changed: added os-windows.

Status changed to HelpWanted.

@alexbrainman
Copy link
Member

Comment 4:

It fails on windows-amd64 here too:
c:\a\code\src\issue5986>go run -ldflags -v linkerror.go
# command-line-arguments
HEADER = -H15 -T0x401000 -D0x0 -R0x1000
searching for runtime.a in $WORK/runtime.a
searching for runtime.a in c:\mingw64\go/pkg/windows_amd64/runtime.a
 0.00 ldpe $WORK\command-line-arguments.a(_all.o)
 0.00 ldpe c:\mingw64\go/pkg/windows_amd64/runtime/cgo.a(_all.o)
 0.00 deadcode
 0.00 mkfwd
 0.00 patch
 0.00 follow
 0.00 span
 0.00 pclntab=117700 bytes, funcdata total 5768 bytes
 0.00 symsize = 0
 0.00 dodata
 0.00 reloc
 0.00 reloc
 0.00 asmb
 0.00 codeblk
 0.00 datblk
 0.00 sym
 0.00 dwarf
 0.00 symsize = 0
 0.00 dwarf pass 2.
 0.00 headr
__mingw_fprintf(0): not defined
 0.00 cpu time
10523 symbols
24 sizeof adr
104 sizeof prog
c:\a\code\src\issue5986>gcc --version
gcc (GCC) 4.7.0 20111220 (experimental)
Copyright (C) 2011 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.
But it compiles on windows-386
C:\go\path\mine\src\issue5986>go run -ldflags -v linkerror.go
# command-line-arguments
HEADER = -H0x15 -T0x401000 -D0x0 -R0x1000
searching for runtime.a in $WORK/runtime.a
searching for runtime.a in c:\go\root/pkg/windows_386/runtime.a
 0.00 ldpe $WORK\command-line-arguments.a(_all.o)
 0.00 ldpe c:\go\root/pkg/windows_386/runtime/cgo.a(_all.o)
 0.00 deadcode
 0.00 mkfwd
 0.00 patch
 0.00 follow
 0.00 span
 0.00 pclntab=100582 bytes, funcdata total 5716 bytes
 0.00 symsize = 0
 0.00 dodata
 0.00 reloc
 0.00 reloc
 0.00 asmb
 0.00 datblk
 0.00 sym
 0.00 dwarf
 0.00 symsize = 0
 0.00 dwarf pass 2.
 0.00 headr
 0.00 cpu time
10397 symbols
20 sizeof adr
76 sizeof prog
sqrt is: 0
C:\go\path\mine\src\issue5986>gcc --version
gcc (tdm-1) 4.5.2
Copyright (C) 2010 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

@alexbrainman
Copy link
Member

Comment 5:

But, if I make small change,
c:\a\code\src\issue5986>hg diff
diff -r 7ca9bfcdd58b linkerror.go
--- a/linkerror.go      Thu Sep 05 10:24:06 2013 +1000
+++ b/linkerror.go      Thu Sep 05 10:24:20 2013 +1000
@@ -16,7 +16,7 @@
         ++row_count;
     }
     while (current_row++ != 1);
-    double d = sqrt(sum_squares / row_count);
+    double d = sum_squares / row_count;
     printf("sqrt is: %g\n", d);
 }
 */
It runs fine:
 
c:\a\code\src\issue5986>go run linkerror.go
sqrt is: 0

@ianlancetaylor
Copy link
Contributor

Comment 6:

I don't understand why it is not doing an external link.  Which version of Go are you
using?  What happens if you do "go run -ldflags -linkmode external linkerror.go"?

@alexbrainman
Copy link
Member

Comment 7:

c:\a\code\src\issue5986>go version
go version devel +99056a2a8a9d Mon Sep 02 16:44:51 2013 +0900 windows/amd64
c:\a\code\src\issue5986>go run -ldflags -linkmode external linkerror.go
go run: no go files listed
c:\a\code\src\issue5986>go run -ldflags "-linkmode external" linkerror.go
# command-line-arguments
c:\mingw64\go\pkg\tool\windows_amd64\6l.exe: cannot use -linkmode=external with -H
windows
c:\a\code\src\issue5986>

@ianlancetaylor
Copy link
Contributor

Comment 8:

I forgot that external linking doesn't work on Windows yet.
Can you find out where __mingw_fprintf is coming from?  mingw uses GCC, right?  Try
gcc hello.c -Wl,-y,__mingw_fprintf

@alexbrainman
Copy link
Member

Comment 9:

c:\go\path\src\t>type hello.c
#include <stdio.h>
int main()
{
  printf("Hello world\n");
  return 0;
}
c:\go\path\src\t>gcc hello.c -Wl,-y,__mingw_fprintf
c:/go/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-merr.o):
reference to __mingw_fprintf
c:/go/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):
reference to __mingw_fprintf
c:/go/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingwex.a(lib64_libmingwex_a-mingw_fprintf.o):
definition of __mingw_fprintf
c:\go\path\src\t>

@ianlancetaylor
Copy link
Contributor

Comment 10:

What happens if you add -lmingwex to the #cgo LDFLAGS in the test case?

@alexbrainman
Copy link
Member

Comment 11:

It still fails the same way:
c:\go\path\src\issue5986>type linkerror.go
package main
/*
#cgo LDFLAGS: -lm -lmingwex
#include <stdio.h>
#include <math.h>
void output()
{
    int current_row = 0, row_count = 0;
    double sum_squares = 0;
    do {
        if (current_row == 10) {
            current_row = 0;
        }
        ++row_count;
    }
    while (current_row++ != 1);
    double d = sqrt(sum_squares / row_count);
    printf("sqrt is: %g\n", d);
}
*/
import "C"
func main() {
    C.output();
}
c:\go\path\src\issue5986>go run -x linkerror.go
WORK=C:\Users\brainman\AppData\Local\Temp\go-build575325643
mkdir -p $WORK\command-line-arguments\_obj\
mkdir -p $WORK\command-line-arguments\_obj\exe\
cd c:\go\path\src\issue5986
"c:\\go\\root\\pkg\\tool\\windows_amd64\\cgo.exe" -objdir
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\"
-- -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\"
linkerror.go
"c:\\go\\root\\pkg\\tool\\windows_amd64\\6c.exe" -F -V -w -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\"
-I "c:\\go\\root\\pkg\\windows_amd64" -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_defun.6"
-D GOOS_windows -D GOARCH_amd64
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_defun.c"
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -print-libgcc-file-name
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\"
-o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_main.o"
-c
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_main.c"
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\"
-o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_export.o"
-c
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_export.c"
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\"
-o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\linkerror.cgo2.o"
-c
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\linkerror.cgo2.c"
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_.o"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_main.o"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_export.o"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\linkerror.cgo2.o"
-lm -lmingwex
"c:\\go\\root\\pkg\\tool\\windows_amd64\\cgo.exe" -objdir
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\"
-dynimport
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_.o"
-dynout
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_import.c"
"c:\\go\\root\\pkg\\tool\\windows_amd64\\6c.exe" -F -V -w -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\"
-I "c:\\go\\root\\pkg\\windows_amd64" -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_import.6"
-D GOOS_windows -D GOARCH_amd64
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_import.c"
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_all.o"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_export.o"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\linkerror.cgo2.o"
-Wl,-r -nostdlib-lmingwex -lmingw32
c:/go/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/libgcc.a
"c:\\go\\root\\pkg\\tool\\windows_amd64\\6g.exe" -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_go_.6"
-p command-line-arguments -D _/c_/go/path/src/issue5986 -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_gotypes.go"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\linkerror.cgo1.go"
"c:\\go\\root\\pkg\\tool\\windows_amd64\\pack.exe" grcP
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments.a"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_go_.6"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_cgo_import.6"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\
command-line-arguments\\_obj\\_cgo_defun.6"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\_all.o"
cd .
"c:\\go\\root\\pkg\\tool\\windows_amd64\\6l.exe" -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments\\_obj\\exe\\linkerror.exe"
-L "C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build575325643\\command-line-arguments.a"
# command-line-arguments
__mingw_fprintf(0): not defined
c:\go\path\src\issue5986>

@ianlancetaylor
Copy link
Contributor

Comment 12:

Hmmm, I see that the LDFLAGS are not used by the final link, which of course makes sense
now that I think about it.
This is going to need some investigation by somebody familiar with mingw.  I'm happy to
advise but I'm not going to be able to track this down.

@rsc
Copy link
Contributor

rsc commented Sep 10, 2013

Comment 13:

It sounds like __mingw_fprintf is provided by a static library, not a dynamic one. I
doubt 6l can parse the appropriate static library to do the link. 
I don't believe this is going to work until we have external linking on Windows.
Hopefully for Go 1.3.

Labels changed: added go1.3, removed go1.2.

@minux
Copy link
Member

minux commented Sep 11, 2013

Comment 14:

alex, try the following hacky patch:
diff -r ecc9ab36456e src/cmd/go/build.go
--- a/src/cmd/go/build.go   Tue Sep 10 14:54:55 2013 -0400
+++ b/src/cmd/go/build.go   Tue Sep 10 22:36:03 2013 -0400
@@ -2034,7 +2034,7 @@
    var staticLibs []string
    if goos == "windows" {
        // libmingw32 and libmingwex might also use libgcc, so libgcc must come last
-       staticLibs = []string{"-lmingwex", "-lmingw32"}
+       staticLibs = []string{"-lmingwex", "-lmingw32", "-lmingwex"}
    }
    if cgoLibGccFile != "" {
        staticLibs = append(staticLibs, cgoLibGccFile)
cgo tries to statically link in mingw32 and mingwex, but the order is not correct.
if the above path works, we can use --start-group and --end-group to handle the general
case.

@alexbrainman
Copy link
Member

Comment 15:

minux,
Still not good. Here is the output:
c:\go\path\src\issue5986>go run -x linkerror.go
WORK=C:\Users\brainman\AppData\Local\Temp\go-build330303619
mkdir -p $WORK\command-line-arguments\_obj\
mkdir -p $WORK\command-line-arguments\_obj\exe\
cd c:\go\path\src\issue5986
"c:\\go\\root\\pkg\\tool\\windows_amd64\\cgo.exe" -objdir
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\"
-- -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\"
linkerror.go
"c:\\go\\root\\pkg\\tool\\windows_amd64\\6c.exe" -F -V -w -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\"
-I "c:\\go\\root\\pkg\\windows_amd64" -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_defun.6"
-D GOOS_windows -D GOARCH_amd64
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_defun.c"
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -print-libgcc-file-name
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\"
-o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_main.o"
-c
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_main.c"
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\"
-o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_export.o"
-c
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_export.c"
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\"
-o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\linkerror.cgo2.o"
-c
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\linkerror.cgo2.c"
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_.o"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_main.o"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_export.o"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\linkerror.cgo2.o"
-lm
"c:\\go\\root\\pkg\\tool\\windows_amd64\\cgo.exe" -objdir
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\"
-dynimport
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_.o"
-dynout
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_import.c"
"c:\\go\\root\\pkg\\tool\\windows_amd64\\6c.exe" -F -V -w -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\"
-I "c:\\go\\root\\pkg\\windows_amd64" -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_import.6"
-D GOOS_windows -D GOARCH_amd64
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_import.c"
gcc -I "c:\\go\\path\\src\\issue5986" -g -O2 -m64 -mthreads -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_all.o"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_export.o"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\linkerror.cgo2.o"
-Wl,-r -nostdlib -lmingwex -lmingw32 -lmingwex
c:/go/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/libgcc.a
"c:\\go\\root\\pkg\\tool\\windows_amd64\\6g.exe" -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_go_.6"
-p command-line-arguments -D _/c_/go/path/src/issue5986 -I
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_gotypes.go"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\linkerror.cgo1.go"
"c:\\go\\root\\pkg\\tool\\windows_amd64\\pack.exe" grcP
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments.a"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_go_.6"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_import.6"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_cgo_defun.6"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\_all.o"
cd .
"c:\\go\\root\\pkg\\tool\\windows_amd64\\6l.exe" -o
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments\\_obj\\exe\\linkerror.exe"
-L "C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619"
"C:\\Users\\brainman\\AppData\\Local\\Temp\\go-build330303619\\command-line-arguments.a"
# command-line-arguments
atexit(0): not defined
__mingw_get_msvcrt_handle(0): not defined
Alex

@minux
Copy link
Member

minux commented Sep 16, 2013

Comment 16:

it seems to only happen on amd64, but i don't have a windos/amd64 machine atm.
alex, do you have samples that make this happen on windows/386?
that will be easier for me to test.

@alexbrainman
Copy link
Member

Comment 17:

minux,
> ... do you have samples that make this happen on windows/386?
No, I don't. Sorry. But you could jump on our windows/amd64 builder. It is easily
reproducible there. Send me email privately, if you like. I'll tell you how to connect.
Alex

@minux
Copy link
Member

minux commented Sep 18, 2013

Comment 18:

please test https://golang.org/cl/13261055/.
i verified that linkerror.go could compile and run without problem on windows/amd64
builder at least.

@alexbrainman
Copy link
Member

Comment 19:

Works for me on both windows/386 and windows/amd64. Please, send it for review. We'll
see what happens.
Alex

@minux
Copy link
Member

minux commented Sep 19, 2013

Comment 20:

Owner changed to @minux.

Status changed to Started.

@minux
Copy link
Member

minux commented Sep 19, 2013

Comment 21:

This issue was closed by revision db71e15.

Status changed to Fixed.

@rsc rsc added this to the Go1.3 milestone Apr 14, 2015
@rsc rsc removed the go1.3 label Apr 14, 2015
@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

5 participants