> --
> 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...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Zhong Lee
unread,
May 26, 2013, 9:04:50 PM5/26/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
thanks 4 ur reply. i will choose method 1. also the link provided is very informational and interesting, but a little complicated 4 me.
Matt Silverlock
unread,
May 26, 2013, 9:38:34 PM5/26/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Assuming you are using homebrew on your Mac to build/install Go and installed it using `brew install go --cross-compile-common` (or `--cross-compile-all`)
$ GOOS=linux GOARCH=386 go build yourprog.go
That should output a binary that will run on 32-bit Ubuntu, provided you haven't used any cgo libs (as Dave touched on).
Dave Cheney
unread,
May 26, 2013, 9:39:30 PM5/26/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Matt Silverlock, golang-nuts
Ahhh, so that is how so many homebrew users end up with go
installations where cgo is disabled.
Matt Silverlock
unread,
May 26, 2013, 9:52:52 PM5/26/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com, Matt Silverlock
Actually, that's my fault - you should have to type:
$ GOOS=linux GOARCH=386 CGO_ENABLED=0 go build yourprog.go
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
I know Dave Cheney blog post is very informative (same as rest posts on his blog) but just use goxc for cross compilation: https://github.com/laher/goxc
Best regards, Dobrosław Żybort
Dave Cheney
unread,
May 27, 2013, 7:16:10 PM5/27/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dobrosław Żybort, golan...@googlegroups.com
Yes, you should use goxc rather than my shell script.