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

Head fails on MacOS #2137

Closed
nl5887 opened this issue Apr 20, 2017 · 9 comments
Closed

Head fails on MacOS #2137

nl5887 opened this issue Apr 20, 2017 · 9 comments
Assignees
Milestone

Comments

@nl5887
Copy link
Contributor

nl5887 commented Apr 20, 2017

Expected behaviour

mc banner

Actual behaviour

$ go run main.go
signal: killed

Steps to reproduce the behaviour

Just checkout minio/mc latest and go run main.go

mc version

9a88156

System information

MacOS

Darwin MacBook-Pro.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64 i386 MacBookPro13,1 Darwin

Killed is mostly an out of memory error, caused by something recursive. Dee confirmed this issue on her notebook as well.

@deekoder
Copy link
Contributor

Yes this is repros for me on my mac as well when i do go get.

@deekoder
Copy link
Contributor

$ mc --help
Killed: 9

@harshavardhana
Copy link
Member

This is upstream golang bug with xcode 8.3

golang/go#19734

@deekoder
Copy link
Contributor

deekoder commented Apr 20, 2017

Ok i installed xcode8.3 and then did this go version

$ go version 
go1.7.5 darwin/amd64
$ go build -ldflags=-s main.go
$ mc
Killed: 9

@deekoder
Copy link
Contributor

ok so this works.

$ go version 
go1.7.5 darwin/amd64
$ go build -ldflags=-s 
$ ./mc

@badscooter23
Copy link
Contributor

badscooter23 commented Apr 20, 2017

This is a nasty problem when it comes up... brew doctor will encourage you to update to a new version of xcode and then you rung into this issue...

I am not sure I completely understand your workaround (right now I am just postponing the xcode update to make sure I don't get the problem)...

normally I doe a make to build minio and/or mc...

Can you be more clear on how to get around the problem?
Do we need to modify the Makefile with different -ldflags? Or do we need to not use make and do an explicit go build?

I am just unclear on what you are saying the workaround is (and the problem is debilitating if it comes up).

I think we just need to write up a really clear work around for this... that hopefully

  • works with go 1.7.5
  • works with latest xcode
  • allows developer to do a make to build mc
  • doesn't get the Killed: 9 issue

(I am getting around this be not upgrading xcode right now)

The other related thing is that minio and mc both requires go 1.7.5 (not 1.8) and brew really wants to install 1.8 (which breaks everything). If you don't already have 1.7.5 installed and you use brew you will get 1.8 which messes things up ... unless you do a few things to explicitly install and use 1.7.5. It is something like:

brew install go 1.7
(which will actually install 1.7.5)

your GO env vars will be all screwed up...

So I set up things like this in .bash_profile file

/# set up env variables for go
export GOPATH=${HOME}/go
export GOVERSION=$(brew list [email protected] | head -n 1 | cut -d '/' -f 6)
export GOROOT=$(brew --prefix)/Cellar/[email protected]/${GOVERSION}/libexec

export PATH=${GOPATH}/bin:$PATH

(this is different that what it says to do in the mini docs...)

If you have installed go 1.8 and want to go backwards to 1.7.5 you have to force this ...
i forget the exact brew command I had to do ... (and I didn't write it down)

@harshavardhana
Copy link
Member

@badscooter23 brew install minio/stable/mc should handle this work-around and also make.

This is an issue that can happen if you did go get github.com/minio/mc which is allowed, but there is no way to stop you from doing the latter.

@deekoder
Copy link
Contributor

deekoder commented Apr 20, 2017

If you do on OSX

go get github.com/minio/mc 

Then you have to do

go install -ldflags "-s"

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
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

4 participants