[Bug go/90665] New: undefined C type 'int' with gcc 9.1.0 on solaric
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90665 Bug ID: 90665 Summary: undefined C type 'int' with gcc 9.1.0 on solaric Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: thorsten.knieling at googlemail dot com CC: cmang at google dot com Target Milestone: --- I built gcc 9.1.0 on Solaris 11 (SPARC) from sources (GNU). The build went well and CGO free Go code can be compiled and works. With CGO code the gccgo build does not compile. go code referencing any C standard type like C.int returns an error: sh> go build ./... ./main.go:18:2: call of non-function C.f ./main.go:18:6: invalid conversion to C.int: undefined C type 'int' Here is the simple example code which does not build. package main /* #include void f(int i) { fprintf(stdout,"INT: %d\n",i); } */ import "C" import ( "fmt" ) func main() { // Simple C function call. C.f(C.int(1)) fmt.Println("ABC") }
[Bug go/90665] undefined C type 'int' with gcc 9.1.0 on solaric
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90665 --- Comment #2 from Thorsten A. Knieling --- May be I use the wrong configure options. I used a gcc compiler rather then an Solaris compiler to build gcc 9.1.0. My configure looks like this ../configure --prefix=/gcc-solaris-9.1.0 --enable-languages=c,c++,go,objc,lto Could you give an hint?