Skip to content

Cannot build with xxd from busybox. #1417

Open
@slycordinator

Description

@slycordinator

in src/meson.build
command : [xxd, '--include', '@INPUT@', '@OUTPUT@']

If one's xxd is from busybox, then those calls can fail, since busybox often lacks support for long-options:

xxd: unrecognized option '--include'
BusyBox v1.35.0 (Debian 1:1.35.0-4+b3) multi-call binary.

Usage: xxd [-pri] [-g N] [-c N] [-n LEN] [-s OFS] [-o OFS] [FILE]

Hex dump FILE (or stdin)

        -g N            Bytes per group
        -c N            Bytes per line
        -p              Show only hex bytes, assumes -c30
        -i              C include file style
        -l LENGTH       Show only first LENGTH bytes
        -s OFFSET       Skip OFFSET bytes
        -o OFFSET       Add OFFSET to displayed offset
        -r              Reverse (with -p, assumes no offsets in input)

And those calls result in a exit code of 1.

This could be fixed by using:

command : [xxd, '-i', '@INPUT@', '@OUTPUT@']
since the short -i option is supported by all xxd versions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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