Skip to content

scripts/build.sh rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2 #437

@toffaletti

Description

@toffaletti

When building a static sdk on Apple Silicon, I got this error initially:

*** Patching Musl ***

Patching Musl for locale support... done
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2

It seems like the build requires a x86_64 architecture host? I was finally able to get it working with this:

docker run --cpus 8 --memory 8Gb --arch x86_64 -it --rm -v ./sources/:/source -v ./products/:/products static-swift-linux /scripts/build.sh --source-dir /source --products-dir /products --archs x86_64

The build also seems to assume the source directory is cleaned on every run. When I initially switched architectures it failed looking for aarch64 artifacts until I removed the build directory for CMake.

ninja: error: '/usr/lib/aarch64-linux-gnu/libmd.so', needed by 'bin/cmake', missing and no known rule to make it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions