-
Notifications
You must be signed in to change notification settings - Fork 280
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
Library used on Linux image not found on M1 ARM64 image #3239
Comments
The Rust binary you have was compiled for an amd64 (x86_64) architecture and needs the linked library. The image you are running on the Mac M1 ARM is likely the arm64v8 image and so doesn't have libraries for amd64. Since Docker for Mac sets up qemu emulation, you can likely use the amd64 image by adding the |
Worked like a charm, thanks! |
I'm running automatic built in Visual Studio via .yml file. How and where do I include the --platform flag for Mac M1 ARM specifically? |
In your Dockerfile, right after the image name, for example: |
Thanks for the solution! |
Hi, can you give a example? in the file.. |
Here's mine for a solana dapp: This was super helpful thanks all!.
|
2 days wasted until I found this thread, this was super helpful for me too, thank you!
Cheers from the jlibtorrent project, millions of Android and Linux users thank you. |
|
@vysecurity > |
docker-compose doesn't support --platform flag. docker-compose.yaml - |
@stav-hacohen that's odd. The following worked for me:
When I added as an To check whether it's working you can ssh into your container and run |
I don't know if this will help anyone but if I believe I've had the issue where docker will prefer an image that exists locally over a specific |
Hi,
Thanks for this info. Adding "platform: linux/amd64" to docker-compose.yaml
did the trick.
Best regards,
Stav.
…On Thu, Feb 10, 2022 at 12:26 AM Eric Hubbell ***@***.***> wrote:
@stav-hacohen <https://github.com/stav-hacohen> that's odd. The following
worked for me:
services
server:
image: ubuntu:18.04
container_name: 'cs-server-server'
platform: linux/amd64
build: .
volumes:
- type: bind
source: ${DOCKER_PROJECT_PATH}
target: ${DOCKER_TARGET_PATH}
ports:
- "9339:9339"
- "9229:9229"
- "8080:8080"
When I added as an ARG to my Dockerfile it didn't register on the
container above. But when I added it to my docker-compose (like the above)
all is well.
To check whether it's working you can ssh into your container and run uname
-m (should spit out x86_64) or check yoru docker desktop for the AMD64
flag per the image below.
[image: CleanShot 2022-02-09 at 15 25 34]
<https://user-images.githubusercontent.com/4422450/153300636-9f9f5320-7460-4cf3-a1d6-e3133a0fb453.png>
—
Reply to this email directly, view it on GitHub
<#3239 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWMGH63VUP63J7ZZ4Y7PJUTU2LSZFANCNFSM4YI53WMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
In case you are using docker-compose, you can specify the platform like this:
|
Otherwise library not found error will be encountered Ref: nodejs/help#3239
Otherwise library not found error will be encountered Ref: nodejs/help#3239
* Add codespace information in unknown SDK error (informalsystems#2268) * ICS20 API improvements (informalsystems#2280) * Remove `Debug` and `'static` requirements on Module trait * Manually implement Debug for `MockRouter` * Remove `Ics20Reader` supertrait `PortReader` * Use primitive_types::U256 instead of uint::construct_uint!() * Impl serde for Amount * Add .changelog entries * Fix relayer Dockerfile for M1 Mac (informalsystems#2286) Otherwise library not found error will be encountered Ref: nodejs/help#3239 * Bump uuid from 1.1.1 to 1.1.2 (informalsystems#2289) Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.1.1 to 1.1.2. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](uuid-rs/uuid@1.1.1...1.1.2) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump hdpath from 0.6.0 to 0.6.1 (informalsystems#2292) Bumps [hdpath](https://github.com/emeraldpay/hdpath-rs) from 0.6.0 to 0.6.1. - [Release notes](https://github.com/emeraldpay/hdpath-rs/releases) - [Commits](https://github.com/emeraldpay/hdpath-rs/commits) --- updated-dependencies: - dependency-name: hdpath dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump clap from 3.1.18 to 3.2.1 (informalsystems#2291) * Bump semver from 1.0.9 to 1.0.10 (informalsystems#2295) * Bump http from 0.2.7 to 0.2.8 (informalsystems#2296) * Bump tracing from 0.1.34 to 0.1.35 (informalsystems#2290) * Hs/2210 - Fixed the variable TM to point to GAIAD_BINARY (informalsystems#2297) * Fixed variable TM * change log entry and lib-gm version updated to v0.1.3 Co-authored-by: Harveen Singh <harveen@informal.systems> * Bump clap_complete from 3.1.4 to 3.2.1 (informalsystems#2288) * Bump clap_complete from 3.1.4 to 3.2.1 Bumps [clap_complete](https://github.com/clap-rs/clap) from 3.1.4 to 3.2.1. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](clap-rs/clap@clap_complete-v3.1.4...clap_complete-v3.2.1) --- updated-dependencies: - dependency-name: clap_complete dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump clap dependency to 3.2.4 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mikhail Zabaluev <mikhail@informal.systems> * Fix recv packet handler incorrectly using dest port/chan to get receipt/next_seq_recv (informalsystems#2294) * Use packet destination port/channel in recv_packet handler where appropriate * Add .changelog entry * Address review feedback * Use enum for recv-packet results * Improve RecvPacketResult * Ignore acc seq mismath when expected < got (informalsystems#2298) * Ignore acc seq mismath when expected < got * Address review comments * Changelog entry * Add support for fetching & parsing the Tendermint version of a chain (informalsystems#2302) * Fix for informalsystems#2301 * changelog * changelog broken link * KV pairs in log h/t Mikhail * update dependencies to master branch * update tendermint dependency Co-authored-by: Soares Chen <soares.chen@maybevoid.com> Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com> Co-authored-by: PikachuEXE <pikachuexe@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: harveenSingh <harveen.s@hotmail.com> Co-authored-by: Harveen Singh <harveen@informal.systems> Co-authored-by: Mikhail Zabaluev <mikhail@informal.systems> Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com> Co-authored-by: Adi Seredinschi <adi@informal.systems>
Otherwise library not found error will be encountered Ref: nodejs/help#3239
I understand that thanks to qemu macs with Apple Silicon chips can run |
As long as the tag of each image (like As far as building your own multiplatform images (i.e. multiple platform specific images under a single tag via an image index), there are resources like https://docs.docker.com/build/building/multi-platform/ that can be helpful. I try to build each architecture on a native CPU rather than relying on emulation for both speed and reliability. |
Environment
Expected Behavior
I am using a built with dependencies Rust binary that works perfectly on images on x86 architecture with the exact same parameters. When launching that binary on the same node:15 image but for Macbook M1, I should get it to work the same way.
Current Behavior
When trying to run my binary in my docker node:15 image on MacbookM1, I get the following error:
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
Possible Solution
I have no idea, but the lib in question clearly is not here on node:15 ARM64, but is present on a x86_64 node:15 image
The text was updated successfully, but these errors were encountered: