Skip to content

Choose the right architecture in bin/linkerd script - #4867

Merged
cpretzer merged 1 commit into
mainfrom
kleimkuhler/fix-bin-linkerd
Aug 13, 2020
Merged

Choose the right architecture in bin/linkerd script#4867
cpretzer merged 1 commit into
mainfrom
kleimkuhler/fix-bin-linkerd

Conversation

@kleimkuhler

Copy link
Copy Markdown
Contributor

Motivation

I noticed after a local build of linkerd, bin/linkerd version was printing a
different git version than I expected.

I realized bin/linkerd (on Linux) was still pointing to
./target/cli/linux/linkerd even though we now build and put images into
./target/cli/linux-amd64/linkerd.

Solution

We now select the correct architecture directory based off uname -m.

Continued issues

If a binary does not exist in the path returned by bin/linkerd, we attempt to
build it with bin/build-cli-bin. I don't think this script is up to date with
multi-arch builds.

For example if I was on arm64, I don't think build-cli-bin would properly
build a put a binary in ./target/cli/linux-amd64/.

Signed-off-by: Kevin Leimkuhler kevin@kleimkuhler.com

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler
kleimkuhler requested a review from a team as a code owner August 12, 2020 17:47
@kleimkuhler

Copy link
Copy Markdown
Contributor Author

Created #4868 for the continued issue.

@alpeb alpeb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍 but can we wait for #4868 to get addressed as well before merging? Otherwise it'll leave bin/linkerd broken in the interim :-(

@kleimkuhler

Copy link
Copy Markdown
Contributor Author

@alpeb So bin/linkerd is already broken by the fact that bin/docker-build (without LINKERD_LOCAL_BUILD_CLI set) puts the binary in linux-amd64.

This at least fixes that, it's just that it will remain broken for developers who are on Linux but not x86_64 archs (which is uncommon right now).

@aliariff aliariff mentioned this pull request Aug 13, 2020
@cpretzer
cpretzer merged commit c0826dc into main Aug 13, 2020
@cpretzer
cpretzer deleted the kleimkuhler/fix-bin-linkerd branch August 13, 2020 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants