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

sysbench: Use vendored statically linked libck #309564

Merged
merged 1 commit into from
May 16, 2024

Conversation

avnik
Copy link
Contributor

@avnik avnik commented May 6, 2024

Motivation: use shared version of libck in sysbench affect on measurement results too much

Description of changes

This partially revert and redo 4af1355
Vendored version of concurrency kit (aka libck) require little more patching to support cross-compilation

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.05 Release Notes (or backporting 23.05 and 23.11 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.

@rrbutani
Copy link
Contributor

rrbutani commented May 6, 2024

Just for posterity: pkgs.libck actually does have static lib outputs:

ls $(nix build nixpkgs#libck --print-out-paths --no-link)/lib
libck.a  libck.so  libck.so.0  libck.so.0.7.1  pkgconfig

But its pkg-config file (pkgconfig/ck.pc) isn't configured so that pkg-config --libs ck --static returns linker flags that use libck.a.

I don't see a good way to get sysbench's build to use the "system" provided libck.a — we could override CK_LIBS manually but that seems like a worse solution than using the bundled libck (as you've done in this PR).

@rrbutani
Copy link
Contributor

rrbutani commented May 6, 2024

@ofborg build pkgsCross.aarch64-multiplatform.sysbench pkgsCross.aarch64-multiplatform.pkgsLLVM.sysbench

Copy link
Contributor

@rrbutani rrbutani left a comment

Choose a reason for hiding this comment

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

When stacked on #307540, #309884, and #309887 I can confirm that pkgsLLVM.sysbench, pkgsCross.aarch64-multiplatform.sysbench, and pkgsCross.aarch64-multiplatform.pkgsLLVM.sysbench build successfully (on x86_64).

@rrbutani rrbutani added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label May 8, 2024
@Mic92 Mic92 force-pushed the avnik/sysbench-improvements branch from 5968dac to 413f012 Compare May 14, 2024 12:34
This partially revert and redo 4af1355
Vendored version of concurrency kit (aka libck) require little more
patching to support cross-compilation
@Mic92 Mic92 force-pushed the avnik/sysbench-improvements branch from 413f012 to 2df7707 Compare May 14, 2024 12:48
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label May 15, 2024
Copy link
Contributor

@brianmcgillion brianmcgillion left a comment

Choose a reason for hiding this comment

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

Verified on Nvidia jetson agx/nx cross build

@Mic92 Mic92 merged commit db475b5 into NixOS:master May 16, 2024
24 checks passed
brianmcgillion added a commit to brianmcgillion/ghaf that referenced this pull request May 31, 2024
fixed in the upstream
NixOS/nixpkgs#309564

Signed-off-by: Brian McGillion <[email protected]>
brianmcgillion added a commit to tiiuae/ghaf that referenced this pull request Jun 3, 2024
fixed in the upstream
NixOS/nixpkgs#309564

Signed-off-by: Brian McGillion <[email protected]>
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.

5 participants