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

Ability to build amd64 from arm64 as well #3188

Conversation

dims
Copy link
Member

@dims dims commented Aug 4, 2023

On my MacOS, i want to run quick-release to build amd64 artifacts! for which we need x86_64-linux-gnu-gcc in the container image which is present in [gcc-x86-64-linux-gnu package](https://packages.debian.org/search?searchon=names&keywords=gcc-x86-64-linux-gnu].

So just for arm64, install gcc-x86-64-linux-gnu as well.

[1774:1773 - 0:2095] 09:35:01 [davanum@c889f3bd53ed:o +1] ~/go/src/k8s.io/kubernetes
$ kubetest2 ec2 --build --target-build-arch amd64
I0803 21:36:23.023010   75523 app.go:61] The files in RunDir shall not be part of Artifacts
I0803 21:36:23.023024   75523 app.go:62] pass rundir-in-artifacts flag True for RunDir to be part of Artifacts
I0803 21:36:23.023032   75523 app.go:64] RunDir for this run: "/Users/davanum/go/src/k8s.io/kubernetes/_rundir/92bf448d-7e83-4bbe-9606-29451edad4af"
I0803 21:36:23.028377   75523 app.go:130] ID for this run: "92bf448d-7e83-4bbe-9606-29451edad4af"
I0803 21:36:23.413123   75523 make.go:48] running build using: KUBE_BUILD_PLATFORMS=linux/amd64
+++ [0803 21:36:23] Verifying Prerequisites....
+++ [0803 21:36:23] Using docker on macOS
+++ [0803 21:36:24] Building Docker image kube-build:build-a65e248211-5-v1.27.0-go1.20.6-bullseye.0
+++ [0803 21:36:25] Syncing sources to container
+++ [0803 21:36:32] Running build command...
go: downloading go.uber.org/automaxprocs v1.5.2
+++ [0803 21:36:47] Setting GOMAXPROCS: 7
+++ [0803 21:36:47] Building go targets for linux/amd64
    k8s.io/kubernetes/cmd/kube-proxy (static)
    k8s.io/kubernetes/cmd/kube-apiserver (static)
    k8s.io/kubernetes/cmd/kube-controller-manager (static)
    k8s.io/kubernetes/cmd/kubelet (non-static)
    k8s.io/kubernetes/cmd/kubeadm (static)
    k8s.io/kubernetes/cmd/kube-scheduler (static)
    k8s.io/component-base/logs/kube-log-runner (static)
    k8s.io/kube-aggregator (static)
    k8s.io/apiextensions-apiserver (static)
    k8s.io/kubernetes/cluster/gce/gci/mounter (non-static)
# runtime/cgo
cgo: C compiler "x86_64-linux-gnu-gcc" not found: exec: "x86_64-linux-gnu-gcc": executable file not found in $PATH
!!! [0803 21:38:02] Call tree:
!!! [0803 21:38:02]  1: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:783 kube::golang::build_some_binaries(...)
!!! [0803 21:38:02]  2: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:942 kube::golang::build_binaries_for_platform(...)
!!! [0803 21:38:02]  3: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0803 21:38:02] Call tree:
!!! [0803 21:38:02]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0803 21:38:02] Call tree:
!!! [0803 21:38:02]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
make[1]: *** [Makefile:92: all] Error 1
make: *** [Makefile:490: cross] Error 1
!!! [0803 21:38:03] Call tree:
!!! [0803 21:38:03]  1: build/../build/common.sh:489 kube::build::run_build_command_ex(...)
!!! [0803 21:38:03]  2: build/release.sh:36 kube::build::run_build_command(...)
make: *** [quick-release] Error 1
Error: exit status 2

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?


@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority labels Aug 4, 2023
@k8s-ci-robot k8s-ci-robot added area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 4, 2023
@dims
Copy link
Member Author

dims commented Aug 4, 2023

/release-note-none
/assign @xmudrii

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Aug 4, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Aug 4, 2023
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 4, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, xmudrii

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 4, 2023
@k8s-ci-robot k8s-ci-robot merged commit 92184bb into kubernetes:master Aug 4, 2023
4 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority release-note-none Denotes a PR that doesn't merit a release note. sig/release Categorizes an issue or PR as relevant to SIG Release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants