Hello Ian, Since you mention about 32-bit SPARC, I did a little testing. It seems that gccgo is compiling 32-bit binary by default: -bash-4.3$ go build abcd.go -bash-4.3$ file abcd abcd: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
However, it does not look like a 32-bit SPARC. Please see below: -bash-4.3$ isainfo -v 64-bit sparcv9 applications crc32c cbcond pause mont mpmul sha512 sha256 sha1 md5 camellia des aes ima hpc vis3 fmaf asi_blk_init vis2 vis popc 32-bit sparc applications crc32c cbcond pause mont mpmul sha512 sha256 sha1 md5 camellia des aes ima hpc vis3 fmaf asi_blk_init vis2 vis popc v8plus div32 mul32 How would I compile a 64-bit executable? Maybe that would work (exporting CFLAGS=-m64 does not seem to work) Regards, Aman On Monday, September 24, 2018 at 8:31:02 PM UTC-7, Ian Lance Taylor wrote: > > On Mon, Sep 24, 2018 at 7:21 PM, <aman...@cohesity.com <javascript:>> > wrote: > > > > I configured everything from scratch again and it seems that this is > > reproducible. I also noticed that while running: > > CGO_LDFLAGS='"-g" "-O2"' > > /usr/gnu/libexec/gcc/sparc-sun-solaris2.10/8.2.1/cgo -debug-gcc -objdir > > $WORK/b001/ -importpath command-line-arguments -gccgo -- -I $WORK/b001/ > -g > > -O2 ./sol10.go > > we see an error: > > not-type:1:33: error: '__cgo_undefined__2' undeclared (first use in this > > function); did you mean '__cgo_f_1_2'? > > Could that be an issue? > > That is normal enough. What cgo does is create a little file, compile > it, and then examine which lines get errors. And error on this line > means that the corresponding symbol is not a type. > > > > This looks awfully similar to https://github.com/golang/go/issues/18959. > > > Hmmm, that could indeed be the problem if this is 32-bit SPARC. > > > > I also created a bug: https://github.com/golang/go/issues/27838 with > all the > > details. > > Thanks. > > Ian > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.