Skip to content

Strip binary not found in linux-armv6 #20

@vweevers

Description

@vweevers

Running prebuildify-cross -i linux-armv6 --napi --strip results in:

Error: spawn /usr/xcc/armv6-unknown-linux-gnueabihf/bin/strip ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

We define it here:

ENV PREBUILD_STRIP_BIN ${CROSS_ROOT}/bin/strip

And the value of CROSS_ROOT is:

$ docker run --rm -it ghcr.io/prebuild/linux-armv6:1 bash
node@474bb16d9bf2:/app$ echo $CROSS_ROOT
/usr/xcc/armv6-unknown-linux-gnueabihf

There's indeed no strip binary there. But there is one here:

node@474bb16d9bf2:/app$ file ${CROSS_ROOT}/bin/${CROSS_TRIPLE}-strip
/usr/xcc/armv6-unknown-linux-gnueabihf/bin/armv6-unknown-linux-gnueabihf-strip: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=9bfeb3fe97d894fd1e5bc28a8749c02205bd9eb3, for GNU/Linux 3.2.0, stripped

So we must change the Dockerfile to:

ENV PREBUILD_STRIP_BIN ${CROSS_ROOT}/bin/${CROSS_TRIPLE}-strip

Which matches the other linux-* images, e.g.:

ENV PREBUILD_STRIP_BIN ${CROSS_ROOT}/bin/${CROSS_TRIPLE}-strip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions