Questions tagged [gccgo]

gccgo is a compiler for the Go language.

gccgo is a compiler for the Go language.

See http://golang.org/doc/install/gccgo

62 questions
0
votes
1 answer

gccgo build can not find custom pakage

when use the gccgo build one single go file is ok, but whn I build a large multi custom pacage go mod project, the project have some sub package(such as app/ app/core/server etc) not build success. how to fix this? anyhelp? I build with -x and see…
meto.cc
  • 11
  • 3
0
votes
0 answers

gccgo-cross-compile can't compile cgo

I am trying to compile a simple go program using gccgo. My code uses cgo thou, gccgo couldn't compile it. This is my code (which compiles using go compiler): package main // #include // #include // // static void myprint(char*…
TomE8
  • 546
  • 1
  • 4
  • 14
0
votes
0 answers

go race detector can't run because of import error. ports runtime/race: cannot find package "runtime/race" in any of GOROOT or GOPATH

my os is ubuntu18.04. my go compiler is gccgo. GOROOT is /usr/local/go it is report as: package testmain imports runtime/race: cannot find package "runtime/race" in any of: /usr/local/go/src/runtime/race (from $GOROOT) …
lizhengxian
  • 69
  • 12
0
votes
0 answers

Why does gccgo report such a strange error message?

It is just a simple "Hello World" program, with the source code: package main import "fmt" func main() { fmt.Println("Hello, World") } I compiled it, with go version go1.10.3 gccgo (GCC) 8.3.0 linux/amd64 and it reported the following error…
Victor
  • 1,303
  • 1
  • 10
  • 28
0
votes
1 answer

Error accessing aerospike C client through Cgo

I am trying to learn Cgo, so i tried accessing aerospike client from Cgo package main // #cgo CFLAGS: -g -Wall // #include // #include // #include "aerospike-client-c/examples/put/example_utils.h" import "C" import…
rithik r
  • 191
  • 1
  • 1
  • 5
0
votes
1 answer

How do I get cgo to build object files without main() being defined?

I have a project written entirely in C. I just need to call one function which will have to be coded in GO. Therefore I am using cgo to build C files and then I would like to use the resulting object files to link with my main C project. Assume I…
steve landiss
  • 1,833
  • 3
  • 19
  • 30
0
votes
0 answers

Copy contents of GOLang Structure to C structure

I want to copy contents of GOLang structure to C Structure. Here i want the populated GO Struct (type test struct) to be copied to C structure test_c. Have put the following logic. I have accessed C structure test_c in go file, as C.test_c, and…
Manu
  • 5,534
  • 6
  • 32
  • 42
0
votes
0 answers

Concurrency problems with gccgo

I've just landed in the the GO-sphere, so, as usually, I'm trying to implement some of the classics in the new language to make some comparison. I'm experiencing a strange situation with the Montecarlo Simulation for PI, using concurrency: when I…
JumpAlways
  • 306
  • 2
  • 14
0
votes
1 answer

build gccgo got linker error

I am building gccgo given the instruction here. However, I got error message after I did: ../gccgo/configure --prefix=/opt/gccgo --enable-languages=c,c++,go --with-ld=/opt/gold/bin/ld make Error: /opt/gold/bin/ld: error: cannot find -lugin …
Alex
  • 247
  • 3
  • 12
0
votes
0 answers

go install fail to generate binary

There are two folds to this problem: 1) Go install not able to generate binary go version go1.7.3 linux/amd64 go env: GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/opt/gopath" GORACE="" GOROOT="/opt/go"…
chingy
  • 31
  • 1
  • 3
0
votes
0 answers

Go import package: pkg found with go (-compiler gccgo), not found with gccgo

Go/gccgo version: 6.3.0 I am building a program with go build -compiler gccgo -x program.go. Build process fails with % /usr/bin/gccgo -c -g -fgo-pkgpath=/common/flogging…
chingy
  • 31
  • 1
  • 3
0
votes
1 answer

How to return array of C struct from C function to go?

I have a C function which will return an array of structure to go function. How can I receive the array of structure and interpret or cast to go structure? Here is the code snippet typedef struct student{ nameStruct name; addressStruct…
0
votes
0 answers

Setting up the workspace in GOLang?

I can not in any way to customize the workspace in ArchLinux. form.go:6:24: ошибка: import file «github.com/google/gxui» not found "github.com/google/gxui" ^ form.go:7:35: ошибка: import file…
continue
  • 11
  • 1
  • 5
0
votes
0 answers

error: unknown field ‘Hash’ in ‘rsa.PSSOptions’

So, I am building docker that uses rsa module of golang. I am using golang by building gcc, which has gccgo. linux-l853:~/docker # go version go version gccgo (GCC) 5.0.0 20141113 (experimental) linux/ppc64 Now, when I am building it, I get the…
Pensu
  • 3,263
  • 10
  • 46
  • 71
-1
votes
1 answer

how to build hyperledger fabric with gccgo

Is there a way to build hyperledger fabric using gccgo? I want to do this in order to use -finstrument-functions option of gcc to trace function calls. But I encountered two problems. My steps are as follows. find the build command make -n…