cmd/cgo: fails with gcc 4.4.1
gopherbot opened this issue · 12 comments
gopherbot commented
What steps will reproduce the problem? 1. Run build on Ubuntu 9.10, which uses gcc 4.4.1 What is the expected output? What do you see instead? Cgo fails with the following error: {{{ go/misc/cgo/stdio$ make cgo file.go could not determine kind of name for C.CString could not determine kind of name for C.puts could not determine kind of name for C.fflushstdout could not determine kind of name for C.free throw: sys·mapaccess1: key not in map panic PC=0x2b01c2b96a08 throw+0x33 /media/scratch/workspace/go/src/pkg/runtime/runtime.c:71 throw(0x4d2daf, 0x0) sys·mapaccess1+0x74 /media/scratch/workspace/go/src/pkg/runtime/hashmap.c:769 sys·mapaccess1(0xc2b51930, 0x2b01) main·*Prog·loadDebugInfo+0xa67 /media/scratch/workspace/go/src/cmd/cgo/gcc.go:164 main·*Prog·loadDebugInfo(0xc2bc0000, 0x2b01) main·main+0x352 /media/scratch/workspace/go/src/cmd/cgo/main.go:68 main·main() mainstart+0xf /media/scratch/workspace/go/src/pkg/runtime/amd64/asm.s:55 mainstart() goexit /media/scratch/workspace/go/src/pkg/runtime/proc.c:133 goexit() make: *** [file.cgo1.go] Error 2 }}} Please use labels and text to provide additional information.
agl commented
agl commented
gopherbot commented
i still have a similar error: --- cd ../misc/cgo/stdio rm -rf *.[568vqo] *.a [568vq].out *.cgo[12].go *.cgo[34].c *.so _obj _test _testmain.go hello fib chain run.out cgo file.go could not determine kind of name for C.puts could not determine kind of name for C.CString could not determine kind of name for C.fflushstdout could not determine kind of name for C.free failed to interpret gcc output: cc1: warnings being treated as errors cgo-test: In function ‘f’: cgo-test:0: erreur: déclaration sans effet cgo-test:1: erreur: déclaration sans effet cgo-test:2: erreur: déclaration sans effet cgo-test:3: erreur: déclaration sans effet make: *** [file.cgo1.go] Erreur 2 using gcc 4.4.2
gopherbot commented
rsc commented
Labels changed: removed type-defect, priority-medium.
Owner changed to r...@golang.org.
Status changed to Duplicate.
Merged into issue #21.
gopherbot commented
CL https://golang.org/cl/9696 mentions this issue.
gopherbot commented
CL https://golang.org/cl/13022 mentions this issue.
gopherbot commented
CL https://golang.org/cl/13380 mentions this issue.
gopherbot commented
CL https://golang.org/cl/14473 mentions this issue.
gopherbot commented
CL https://golang.org/cl/16475 mentions this issue.
gopherbot commented
CL https://golang.org/cl/24743 mentions this issue.