Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vector: 0.43.1 -> 0.44.0 #373601

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nionata
Copy link

@nionata nionata commented Jan 14, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jan 14, 2025
dhess added a commit to hackworthltd/hacknix that referenced this pull request Jan 14, 2025
For some reason, `vector` often breaks upstream on `aarch64-darwin`;
e.g.:

https://hydra.nixos.org/build/285322715

However, upstream only seems to consider the `x86_64-linux` build for
gating admission. We have downstreams that depend on `vector` on
`aarch64-darwin`, so now we override it.

This initial commit is `v0.44.0`, which is about to enter upstream
here:

NixOS/nixpkgs#373601

Note that the upstream changes fail on `aarch64-darwin`. However, we
were able to work around this simply by adding `zlib` to `buildInputs`
on macOS. Maybe this is the long-term fix, though it's not clear why
upstream hasn't already done this.

Signed-off-by: Drew Hess <[email protected]>
@dhess
Copy link
Contributor

dhess commented Jan 14, 2025

Hi, thanks for this PR, @nionata.

We depend on vector in several aarch64-darwin machine configs, and for reasons I don't understand, it's often the case that vector builds fail on that platform due to a zlib.h problem:

error: builder for '/nix/store/gp1xmx6pbslr72pl2w16imz8q7bz9gb4-vector-0.44.0.drv' failed with exit code 101;
       last 25 log lines:
       >   cargo:warning=src/zlib/gzwrite.c:627:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
       >
       >   cargo:warning=  627 | int ZEXPORT gzclose_w(file)
       >
       >   cargo:warning=      |             ^
       >
       >   cargo:warning=11 warnings generated.
       >
       >
       >   exit status: 0
       >   exit status: 0
       >   exit status: 0
       >   exit status: 0
       >
       >   --- stderr
       >   src/smoke.c:1:10: fatal error: 'zlib.h' file not found
       >       1 | #include <zlib.h>
       >         |          ^~~~~~~~
       >   1 error generated.
       >
       >
       >   error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "/nix/store/wkadfwbhn9b4kdih88j7izzy20qw79bk-clang-wrapper-19.1.5/bin/cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-arch" "arm64" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-D_C99_SOURCE" "-o" "/private/tmp/nix-build-vector-0.44.0.drv-0/source/target/aarch64-apple-darwin/release/build/libz-sys-45e69f9c5ffb3776/out/lib/src/zlib/zutil.o" "-c" "src/zlib/zutil.c" with args "cc" did not execute successfully (status code exit status: 1).
       >
       >
       > warning: build failed, waiting for other jobs to finish...
       For full logs, run 'nix log /nix/store/gp1xmx6pbslr72pl2w16imz8q7bz9gb4-vector-0.44.0.drv'.

See, e.g., https://hydra.nixos.org/build/285322715

It's not clear to me why sometimes it builds and sometimes it doesn't, but we can reproduce these failures in our own builds, as well.

In any case, while testing 0.44.0 myself, I found that so long as we add zlib to buildInputs on darwin, it builds successfully. See hackworthltd/hacknix#770

Could you add this change to this PR and see if it fixes aarch64-darwin builds once and for all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants