Hi Michael,

Can you please explain more in details how you solve this issue? I am also 
experience same problem while trying to compile go code in a 32-bit Solaris 
10.(I install the gccgo by using opencsw -> gcc5core) I can successfully 
compile the code using:

/opt/csw/bin/i386-pc-solaris2.10-gccgo-5.2 -v -static-libgo -static-libgcc 
-o hello go_hello.go -Wl,-dy -lsocket -lnsl -lrt

But when I switch to go build, it stops search for any packages.

bash-3.2$ /opt/csw/bin/go-5.2 build --compiler gccgo
kidce.go:3:9: cannot find package "fmt" in any of:
        /opt/csw/lib/src/fmt (from $GOROOT)
        /export/home/ehengao/go-dev/src/fmt (from $GOPATH)
package kee.ericsson.us/kidce
        imports runtime: cannot find package "runtime" in any of:
        /opt/csw/lib/src/runtime (from $GOROOT)
        /export/home/ehengao/go-dev/src/runtime (from $GOPATH)

Really appreciated if you can explain the details of your solutions.

Thanks a lot

BR//

Heng GAO

在 2016年3月1日星期二 UTC-6上午7:08:25,Michael Lazarou写道:
>
>
>> On Friday, 15 May 2015 23:56:09 UTC+1, Ian Lance Taylor wrote:
>>
>> >
>> >
>> >Yes.  The zstdpkglist.go file should have a list of all the standard 
>> >packages.  It should be created during the libgo build.  Look for the 
>> >s-zstdpkglist rule in libgo/Makefile.am.  Or just try removing 
>> >sparc-sun-solaris2.10/libgo/s-zstdpkglist and running "make" to see 
>> >the commands that it runs.  Something must be wrong there, but I don't 
>> >know what.
>> >
>> >Ian 
>>
>
> I've been struggling to get gccgo 5.3 to work on Solaris 10 as well and 
> after a lot of searching this post helped me sort it.
>
> The line in the Makefile.am that creates the zstdpkglist.go is:
>
>  echo $(libgo_go_objs) 'unsafe.lo' 'runtime/cgo.lo' | sed 's/\.lo /\": 
> true,\n/g' | sed 's/\.lo/\": true,/' | sed 's/-go//' | grep -v _c | sed 
> 's/^/\t\"/' | sort | uniq >> zstdpkglist.go.tmp
>
> The issue seems to be the expression sed 's/\.lo /\": true,\n/g'. On 
> Solaris 10 this does not add a newline and so ultimately nothing gets added 
> as it is removed by the grep -v. 
>
> Replacing that sed call with GNU sed was enough to fix the issue and I 
> appear to have a working go tool now.
>
> Michael
>

-- 
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.

Reply via email to