Skip to content

Stat fails to compile because of missing file #145

Open

Description

@mike-ward

On Mac Sonoma 14.4.1 (M2 chip)

make
compiling md5sum...
compiling cat...
compiling shuf...
compiling expand...
compiling tty...
compiling basename...
compiling truncate...
compiling echo...
compiling pwd...
compiling test...
compiling whoami...
compiling touch...
compiling unlink...
compiling sleep...
compiling logname...
compiling printenv...
compiling seq...
compiling uname...
compiling sha224sum...
compiling base64...
compiling readlink...
compiling tac...
compiling wc...
compiling nproc...
compiling expr...
compiling cksum...
compiling printf...
compiling groups...
compiling factor...
compiling head...
compiling uniq...
compiling stat...
failed    cmd: /Users/mike/Documents/github/v/v -Wimpure-v -o /Users/mike/Documents/github/coreutils/bin/stat ./stat
failed   code: 1
V panic: builder error: Header file <bits/statx.h>, needed for module `main` was not found. Please install the corresponding development headers.

v hash: 35f6523
0   build                               0x0000000100c671e4 os__execute_or_panic + 320
1   build                               0x0000000100c6c750 main__main + 3036
2   build                               0x0000000100c6cd40 main + 84
3   dyld                                0x00000001946e20e0 start + 2360
make: *** [all] Error 1```

Activity

  1. spytheman commented on May 21, 2024

    @spytheman
    Contributor

    Yes, the statx API is linux only. Afaik we have not tried compiling the tools on macos yet, and several of them fail to compile there: stat, sync and uptime .

    We should use more portable POSIX APIs where possible in the future.

  2. SheatNoisette commented on Dec 21, 2025

    @SheatNoisette
    Contributor

    The problem is applicable for building with musl-based distributions.

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