Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./6.out: cannot execute binary file #24

Closed
gopherbot opened this issue Nov 11, 2009 · 5 comments
Closed

./6.out: cannot execute binary file #24

gopherbot opened this issue Nov 11, 2009 · 5 comments

Comments

@gopherbot
Copy link
Contributor

by hsandhar:

What steps will reproduce the problem?
1. cd $GOROOT/src
2. ./all.bash
3.

What is the expected output? What do you see instead?

Expected:
--- cd ../test
N known bugs; 0 unexpected bugs

What I received:

...
...
cp _obj/testing.a /Users/hsandhar/go/pkg/linux_amd64/testing.a
cd testing/iotest && make install
cp _obj/testing/iotest.a /Users/hsandhar/go/pkg/linux_amd64/testing/iotest.a
cd testing/quick && make install
cp _obj/testing/quick.a /Users/hsandhar/go/pkg/linux_amd64/testing/quick.a
cd testing/script && make install
cp _obj/testing/script.a /Users/hsandhar/go/pkg/linux_amd64/testing/script.a
cd xml && make install
cp _obj/xml.a /Users/hsandhar/go/pkg/linux_amd64/xml.a
cd archive/tar && make test
gotest
rm -f _test/archive/tar.a _gotest_.6
6g -o _gotest_.6 common.go reader.go writer.go    reader_test.go writer_test.go
rm -f _test/archive/tar.a
gopack grc _test/archive/tar.a _gotest_.6 
/Users/hsandhar/bin/gotest: line 146: ./6.out: cannot execute binary file
make[1]: *** [test] Error 126
make: *** [archive/tar.test] Error 2




What is your $GOOS?  $GOARCH?
$GOOS -> linux
$GOARCH -> amd64

Which revision are you sync'ed to?  (hg log -l 1)
changeset:   3975:b51fd2d6c160
tag:         tip
user:        Kevin Ballard <kevin@sb.org>
date:        Tue Nov 10 20:05:24 2009 -0800
summary:     Implement new emacs command M-x gofmt


Please provide any additional information below.
I'm running this on a Macbook Pro (Snow Leopard, 10.6.2). I have attached
the complete output as well (see attached file).
Any help/feedback would be very appreciated.
Thanks.

Attachments:

  1. output.rtf (93360 bytes)
@rsc
Copy link
Contributor

rsc commented Nov 11, 2009

Comment 1:

It sounds like you are compiling for amd64 but
your system can only run 32-bit binaries. 
Try setting 
export GOARCH=386
instead of 
export GOARCH=amd64

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 11, 2009

Comment 2:

Status changed to WaitingForReply.

@gopherbot
Copy link
Contributor Author

Comment 3 by akunokuroneko:

This would be expected behaviour as Snow Leopard is not linux.
Set GOOS to darwin if you want to be able to run your go binaries locally.

@gopherbot
Copy link
Contributor Author

Comment 4 by hsandhar:

Oh boy...my ignorance/lack of attention at its best!!! 386 and Darwin did the trick.
No more midnight installs.
Thanks a lot for the help everyone.

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 5:

Glad you got it working.

Status changed to Retracted.

minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015
Already present for RET.

Fixes golang#24

Change-Id: Ie87fe3826bc812af1fc910b781d64a8bd7c66268
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants