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

{influxdb, influxdb2}: update to fix build on Rust 1.78 #319969

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

magneticflux-
Copy link
Contributor

@magneticflux- magneticflux- commented Jun 15, 2024

This also fixes a new build failure after Rust was updated.

New patch addresses issues with Rust 1.78 until influxdb2 updates flux >= v0.195.0. Removes no-deny-warnings.patch and previous Rust version patch as they are not needed anymore.

Fixes #319973

Description of changes

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

@magneticflux-
Copy link
Contributor Author

Result of nixpkgs-review pr 319969 run on x86_64-linux 1

2 packages built:
  • influxdb2
  • influxdb2-server

Copy link
Contributor

@eclairevoyant eclairevoyant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also apply this patch to influxdb, which faces a similar build failure?

pkgs/servers/nosql/influxdb2/default.nix Outdated Show resolved Hide resolved
pkgs/servers/nosql/influxdb2/default.nix Outdated Show resolved Hide resolved
@Scrumplex
Copy link
Member

Result of nixpkgs-review pr 319969 run on x86_64-linux 1

2 packages built:
  • influxdb2
  • influxdb2-server

@magneticflux-
Copy link
Contributor Author

magneticflux- commented Jun 15, 2024

I also included the patch for influxdb. I updated to the latest patch version v1.10.7, but there is a new minor version v1.11.5 that I'm not sure if we want to update to yet.

Result of nixpkgs-review pr 319969 run on x86_64-linux 1

3 packages built:
  • influxdb
  • influxdb2
  • influxdb2-server

@magneticflux- magneticflux- changed the title influxdb2: 2.7.1 -> 2.7.6 {influxdb, influxdb2}: update to fix build on Rust 1.78 Jun 15, 2024
@ofborg ofborg bot requested review from offlinehacker and zimbatm June 15, 2024 19:07
--- a/flux/src/lib.rs
+++ b/flux/src/lib.rs
@@ -1,5 +1,3 @@
-#![cfg_attr(feature = "strict", deny(warnings, missing_docs))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side question: should/Could we perhaps use --cap-lints warn by default for rust crates in nixpkgs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems like a good idea, would it go in NIX_RUSTFLAGS somewhere?

@eclairevoyant
Copy link
Contributor

@ofborg build scrutiny nixosTests.scrutiny

@eclairevoyant
Copy link
Contributor

btw, CI indicates that libflux fails to build on aarch64

magneticflux- and others added 3 commits June 16, 2024 00:00
New patch addresses issues with Rust 1.78 until `influxdb2` updates `flux >= v0.195.0`. Removes `no-deny-warnings.patch` and previous Rust version patch as they are not needed anymore.

Co-authored-by: éclairevoyant <[email protected]>
New patch addresses issues with Rust 1.78 until `influxdb` updates `flux >= v0.195.0`.
An inadvertent reliance on `char` being signed crept into `libflux`;
this patch specifies a signed 8-bit type for the literal and then
explicitly casts to the appropriate platform `c_char` type.
@magneticflux-
Copy link
Contributor Author

btw, CI indicates that libflux fails to build on aarch64

Already on it 😆 influxdata/flux#5495

@eclairevoyant
Copy link
Contributor

@ofborg build scrutiny nixosTests.scrutiny

@magneticflux-

This comment was marked as resolved.

@eclairevoyant
Copy link
Contributor

eclairevoyant commented Jun 16, 2024

building tests requires building the package, which requires one of:

  • native platform support
  • emulation (binfmt or the like), which is far slower inherently
  • cross-compilation, which requires building the pkgsCross toolchains and may be slower indirectly

I personally use binfmt for aarch64-linux in rare cases, but generally, and certainly for darwin, I let borgo do the work

@magneticflux-

This comment was marked as resolved.

@eclairevoyant
Copy link
Contributor

eclairevoyant commented Jun 16, 2024

If you used pkgsCross, that's cross-comp, not emulation, and you wouldn't need binfmt for that; your slowdown might be due to pkgsCross not being cached by hydra.

Emulated compilation would be something like nix build -f . influxdb2 --system aarch64-linux

@magneticflux-

This comment was marked as resolved.

@eclairevoyant eclairevoyant merged commit e08c982 into NixOS:master Jun 18, 2024
34 checks passed
@magneticflux- magneticflux- deleted the influxdb2-update branch July 8, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure: libflux (from influxdb2)
4 participants