Skip to content

Build error on NetBSD earmv7hf #18

@kikadf

Description

@kikadf

I encountered a build error on NetBSD 10 (earmv7hf):
thread 'main' (15352) panicked at /usr/pkgsrc/wip/bob/work/vendor/lua-src-547.0.0/src/lib.rs:135:18:
don't know how to build Lua for armv7-unknown-netbsd-eabihf

Based on the available Rust targets, it looks like NetBSD earmv6hf is affected as well, because ‘target.ends_with("bsd")’ doesn’t match these target names.

NetBSD Rust targets include:
armv7-unknown-netbsd-eabihf
armv6-unknown-netbsd-eabihf
sparc64-unknown-netbsd
powerpc-unknown-netbsd
aarch64-unknown-netbsd
aarch64_be-unknown-netbsd
i686-unknown-netbsd
i586-unknown-netbsd
mipsel-unknown-netbsd
riscv64gc-unknown-netbsd
m68k-unknown-netbsd

As a possible fix, I replace ‘target.ends_with("bsd")’ with ‘target.contains("bsd")’. This does not appear to break other target detection logic, and with this change, the build succeeds on NetBSD earmv7hf.

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