Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22310

Problem when compile golang with gcc9.3.0

$
0
0

Update:

this problem fixed in gcc10.1.0 (shipped with go1.14.2)

Ref. VERSION


I try compile golang program to sparc-sun-solaris2.11 with gcc but encountered problem

/tmp/go-build442023874/b001/_gomod_.go:3:3: error: __debug_modinfo__ is not a function; //go:linkname is only supported for functions    3 | //go:linkname __debug_modinfo__ runtime/debug.modinfo      |   ^make: *** [dbx] Error 2

but i found it fixed in go1.13 but golang in gcc9.3.0 still has go1.12.2

here my code

package mainimport ("database/sql"    _ "github.com/godror/godror")func main() {    db, err := sql.Open("godror", "u1/u1@192.168.2.10/ORCL")    if err != nil {        panic(err.Error())    }    err = db.Ping()    if err != nil {        panic(err.Error())    }    db.Close()}

addition info

go version -> go1.12.17gcc version -> 9.3.0command:    go build \        --work \        --compiler=gccgo \        --gccgoflags "-static-libgo -Wl,-dy -lnsl -lsocket -lrt -lsendfile"

Viewing all articles
Browse latest Browse all 22310

Latest Images

Trending Articles



Latest Images