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
1
vote
0 answers

Go version returns unknown, gccgo fails

I installed gccgo using: sudo pacman -S gcc-go When I tried building my code using go build -buildvcs=false -compiler gccgo ., the following error was returned: # github.com/CompeyDev/nemo/prisma/db gccgo: fatal error: Killed signal terminated…
DevComp
  • 11
  • 7
1
vote
1 answer

strconv.ParseFloat turning values to 0 when it shouldn't

I have the following code: buffer := make([]byte, 256) conn.Read(buffer) result:= string(buffer) fmt.Println("Val:", result) floatResult, _ := strconv.ParseFloat(result, 64) fmt.Println("Val on float:", floatResult) The output is the…
Bata
  • 183
  • 2
  • 6
  • 17
1
vote
1 answer

gccgo, AIX: compiled .o files does not contain .go_export section

I am trying to build gccgo (9.2) on AIX and facing now a problem I can't solve. The machine: AIX 7.1, Processor Type: PowerPC_POWER7, CPU Type: 64-bit, Kernel Type: 64-bit The Error: "./sync/atomic.gox exists but does not contain any Go export…
1
vote
0 answers

undefined C type 'int' with gcc 9.1.0 on solaric

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>…
ThKniel
  • 31
  • 2
1
vote
0 answers

crosstool-ng gccgo build error with undefined morestack symbols

I'm building gccgo with crosstool-ng 1.24.0. Got linker error when compiling the very simple main.go. Any idea how to solve this? Any pointer to a successful gogcc build even for a different popular target that can easily be verified? The host is…
minghua
  • 5,981
  • 6
  • 45
  • 71
1
vote
0 answers

filebeat/libbeat compiler on gccgo for solaris/sparc

I am driving to compile the project filebeat going for solar / SPARC environments. Officially, Elastic tools are not supported by Solaris. Neamoins, there is circumventenement to this problem / compile via gccgo. I actually prepare my gccgo…
1
vote
1 answer

cgo on windows : naming of loaded dll

I am trying to use gorocksdb which is a cgo package wapping the rocksdb library on windows. I built the rocksdb library with vcpkg which gave me as output rocksdb-shared.dll. I set the build path to my PATH. I installed msys64 in order to have…
Hisko
  • 173
  • 1
  • 6
1
vote
1 answer

How to return C pointer from Go functions?

I have question is it possible to return from Go function pointer on C? For example main.c can be: struct open_db_return db_ptr = open_db(db_path); GoSlice backet = {"DB", 2, 2}; GoSlice key = {"CONFIG", 6, 6}; struct get_value_return val =…
Topilski Alexandr
  • 669
  • 1
  • 12
  • 34
1
vote
0 answers

gccgo and LD_PRELOAD

package hello import "fmt" func Hello() { fmt.Println("hello, world!") } gccgo -c hello.go -o libhello.so -shared nm libhello.so ... 0000000000000000 T go.hello.Hello 0000000000000000 R go.hello.Hello$descriptor package main import…
user3682618
  • 87
  • 1
  • 8
1
vote
0 answers

OSX Golang static compile, and installing gccgo

To outline my end goal. I want to compile a go application, statically linking to QT5. I have statically compiled QT5. Now I need to compile my Go program. As I understand it to do this, I have to use gccgo rather than the gc compiler. Fine. So…
amlwwalker
  • 3,161
  • 4
  • 26
  • 47
1
vote
2 answers

Unable to get the stack trace with a corefile from a cgo routine when using golang

I am using Golang and cgo. When my C code raises an assert(), I am unable to see the stack trace of the C code when using cgo. Instead, I see the stack trace of the golang runtime that caught the assert. Here is an example of my C code #include…
steve landiss
  • 1,833
  • 3
  • 19
  • 30
1
vote
1 answer

how to build static program with gccgo

I has a prblem when I use gccgo to build static programe version 1> use go build go build -compiler gccgo -gccgoflags '-static -L/lib64' test.go result: /usr/bin/ld: cannot find -lgo /usr/bin/ld: cannot find -lpthread /usr/bin/ld: cannot find…
jackme
  • 11
  • 1
  • 4
1
vote
0 answers

Gccgo error passing and modifying C struct in go

I'm attempting to convert a go library to be called by C and I'm starting with a simple test (based on an example answering another question I found that worked) file but I'm getting errors when I try to build. I have a struct in C that I'm trying…
Jonathan
  • 176
  • 2
  • 6
1
vote
1 answer

gccgo 4.9.2 dynamic linker error: undefined reference to `sync..import'

The source code is package main import "fmt" func main() { fmt.Println("hello world") } The Object file is built without error root@OpenWrt:/mnt/sda3# gccgo -v -c hello.go Using built-in specs. COLLECT_GCC=gccgo Target:…
wukong
  • 2,430
  • 2
  • 26
  • 33
1
vote
1 answer

Golang cross-compilation: gccgo - unrecognized command line option `-marm`

I'm trying to compile a Go app for linux/arm and keep running into problems on my Ubuntu machine. When I run GOOS=linux GOARCH=arm go build in my source directory, I get tons of erorrs that are variations of: # github.com/huin/mqtt gccgo: error:…
Grayda
  • 1,870
  • 2
  • 25
  • 43