-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix build #81
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
Fix build #81
Conversation
Signed-off-by: Michael Friis <friism@gmail.com>
|
I believe this is also fixed by #78 which includes some other stuff for cross. |
| . ./scripts/build/ldflags | ||
|
|
||
| go build -o ./build/docker --ldflags "${LDFLAGS}" github.com/docker/cli/cmd/docker | ||
| CGO_ENABLED=0 go build -o ./build/docker --ldflags "${LDFLAGS}" github.com/docker/cli/cmd/docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think CGO_ENABLED is already set in the Dockerfiles, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but these scripts are invoked from make outside the Dockerfiles too so builds not using Docker won't work without this setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, this is also fixed in #78
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool @dnephin do you want me to remove that change from this pr?
@dnephin that PR adds |
|
Sure, it's also going to fail in any container that doesn't have go, or sh. Why would it run in any container but the one we've defined in this repo? My change adds bash to the Dockerfile. |
|
It would run outside of a container (in my case on Ubuntu). That's the primary documented way to build the project: https://github.com/docker/cli#build-locally Solving the problem by removing dependencies and complexity rather than piling more on top seems preferable. |
|
We should also fix those instructions. I don't think running outside a container should be recommended. |
|
@dnephin it wouldn't fail on Ubuntu when using bash, but you didn't answer my question: Why solve the problem by adding more complexity rather than removing complexity? |
|
You didn't answer my question either! You said it would fail on I agree we should keep dependencies to a minimum. I don't think bash is an unreasonable dependency. We need to use bash to support I don't see either option are more complex. Where is the additional complexity? |
cherry-pick update rpm changelog
Add dev portion to RPM package version Upstream-commit: 208ba254d788a0d7bfe4dde92b35b9f2f68aa1d6 Component: packaging
- What I did
make builddoesn't work, so I fixed it. There were two problems:sourceis not inshon Ubuntu: http://stackoverflow.com/a/13702876/2942CGO_ENABLEDwas not set in the scripts invoked from the makefile- How to verify it
make build