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

Can not run e2e test on a Mac arm machine #757

Open
zhujian7 opened this issue Dec 10, 2024 · 3 comments
Open

Can not run e2e test on a Mac arm machine #757

zhujian7 opened this issue Dec 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@zhujian7
Copy link
Member

Describe the bug
I am using a Mac arm machine, I created a kind cluster, and tried to run e2e on the kind cluster, but the addon-example image can not run on the kind cluster:

╰─$ kubectl logs -f -n test-addon-template hello-template-agent-785f84ff-6z74r
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
 %

the addon-example image is built by the addon-framework action

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Environment ie: OCM version, Kubernetes version and provider:

Additional context
Add any other context about the problem here.

@zhujian7
Copy link
Member Author

@dosu do you know the root cause?

@zhujian7
Copy link
Member Author

Copy link

dosubot bot commented Dec 10, 2024

The issue you're encountering is likely due to the addon-example image being built for the x86_64 architecture, which is not compatible with ARM architecture used by Mac ARM machines. The error message indicates that the image is trying to use an x86_64-specific library (ld-linux-x86-64.so.2), which is not available on ARM architecture.

To resolve this, you need to ensure that the addon-example image is built for ARM architecture. This can be done by modifying the Dockerfile or the build process to include multi-architecture support. Specifically, you should set the GOARCH environment variable to arm64 during the build process to target ARM architecture.

You might also consider using Docker's Buildx tool, which supports building multi-architecture images. This would allow you to build an image that can run on both x86_64 and ARM architectures.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant