golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
120.44k stars 17.29k forks source link

cmd/cgo: fails with gcc 4.4.1 #1

Closed gopherbot closed 9 years ago

gopherbot commented 14 years ago

by rsc+personal@swtch.com:

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 14 years ago

Comment 1:

Owner changed to a...@chromium.org.

Status changed to Started.

agl commented 14 years ago

Comment 2:

This issue was closed by revision eea14bb9e8.

Status changed to Fixed.

Merged into issue #-.

rsc commented 14 years ago

Comment 3:

This issue was closed by revision 72ec930fa70c20ce69b21bf32a7916c04c2e9c2.

Merged into issue #-.

gopherbot commented 14 years ago

Comment 4 by solstice.dhiver:

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 14 years ago

Comment 5 by solstice.dhiver:

i was given the advice to run export LC_ALL="en_US.UTF-8" before building and it 
works.
so may i fill another bug for that or it's stil the same ?
rsc commented 14 years ago

Comment 6:

Labels changed: removed type-defect, priority-medium.

Owner changed to r...@golang.org.

Status changed to Duplicate.

Merged into issue #21.

gopherbot commented 9 years ago

CL https://golang.org/cl/9696 mentions this issue.

gopherbot commented 8 years ago

CL https://golang.org/cl/13022 mentions this issue.

gopherbot commented 8 years ago

CL https://golang.org/cl/13380 mentions this issue.

gopherbot commented 8 years ago

CL https://golang.org/cl/14473 mentions this issue.

gopherbot commented 8 years ago

CL https://golang.org/cl/16475 mentions this issue.

gopherbot commented 7 years ago

CL https://golang.org/cl/24743 mentions this issue.