NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.16k stars 14.19k forks source link

Build failure: docfd #300987

Closed jukremer closed 7 months ago

jukremer commented 7 months ago

Steps To Reproduce

nix shell nixpkgs#docfd

Build log

error: builder for '/nix/store/pw9wpp7v2mkp9ijnqwpn12hv6b2n2y6k-ocaml5.1.1-eio_posix-1.0.drv' failed with exit code 1;
       > eio_posix_stubs.c:133:7: error: call to undeclared function 'preadv'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
       >   r = preadv(Int_val(v_fd), iov, n_bufs, offset);
       >       ^
       > eio_posix_stubs.c:150:7: error: call to undeclared function 'pwritev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
       >   r = pwritev(Int_val(v_fd), iov, n_bufs, offset);
       >       ^
       > 2 errors generated.
       >
       For full logs, run 'nix log /nix/store/pw9wpp7v2mkp9ijnqwpn12hv6b2n2y6k-ocaml5.1.1-eio_posix-1.0.drv'.
error: 1 dependencies of derivation '/nix/store/1b9x6a5fj12cmp1prwkyk803g467wknz-ocaml5.1.1-eio_main-1.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gly8zm9w97ffh35xv2dhzy73d0b3gcxz-ocaml5.1.1-docfd-3.0.0.drv' failed to build

Additional context

Wanted to try out docfd but it failed to build. I noticed the package is not on the latest version.

Notify maintainers

@chewblacka

Metadata

 - system: `"x86_64-darwin"`
 - host os: `Darwin 21.6.0, macOS 10.16`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `""`
 - nixpkgs: `not found`

Add a :+1: reaction to issues you find important.

chewblacka commented 7 months ago

Hi thanks for the report. I currently have a PR for version 4.0.0, but this same build error occurs there too, so it's unrelated to version. Strangely docfd builds fine on aarch64-darwin. The problem is with x86_64-darwin, and specifically with the ocaml dependency eio_posix which fails to build as your error message shows. I'm going to open an issue for that an ping the maintainer.