On Tue, Jul 9, 2013 at 3:04 AM, Damjan Georgievski <
gda...@gmail.com> wrote:
> I'd like to see how Go programs would work on the OpenWRT platform, so I've
> compiled a cross-compiling gcc 4.8.1 with Go enabled [1]. So now I have
> cross-mipsel-linux-gnu-binutils 2.23.2-1 and cross-mipsel-linux-gnu-gcc
> 4.8.1-1 installed.
>
> But when I try to compile a hello world go program [2], it fails with:
>
> $ mipsel-linux-gnu-gccgo hello.go
> hello.go:3:11: error: import file 'fmt' not found
> import "fmt"
> ^
> hello.go:6:5: error: reference to undefined name 'fmt'
> fmt.Println("Hello, World")
> ^
>
> Beeing a newbie, it seems to me that I also need to compile and install the
> libgo library (.gox and .a files?) for the MIPS architecture. None such
> files are present in the package I built.
>
> So how do I do that? Would I also need a libc for libgo?
> OpenWRT uses ulibc though.
Yes, you do need libgo in order to use gccgo. When you build gccgo in
the normal way, it will also build libgo. I'm not sure how you were
Yes, libgo requires libc. I don't know whether it will work with