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

vcpkg: fix binaries not being able to find libstdc++ #329033

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

Jayman2000
Copy link
Contributor

Description of changes

At the moment, if you try to run a binary that was installed by vcpkg, then you will get this error:

error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

This PR prevents that error from happening.

Fixes #317553.

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.

@ofborg ofborg bot requested a review from Guekka July 22, 2024 22:29
pkgs/by-name/vc/vcpkg/package.nix Outdated Show resolved Hide resolved
@ofborg ofborg bot requested a review from gracicot July 23, 2024 23:28
Copy link
Contributor

@gracicot gracicot left a comment

Choose a reason for hiding this comment

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

I don't have a strong opinion about that, but I would prefer if we stay explicit about which triplet we patch, and list them one by one. What do you think @h7x4 ?

Since there's a lot of triplets, lets keep the find command for matching all linux triplets automatically.

pkgs/by-name/vc/vcpkg/package.nix Outdated Show resolved Hide resolved
Before this change, if you tried to run a binary that was installed by
vcpkg, then you would get this error:

  error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

This change prevents that error from happening.

Fixes NixOS#317553.
@ofborg ofborg bot requested a review from gracicot July 24, 2024 22:31
@h7x4
Copy link
Member

h7x4 commented Jul 28, 2024

I'll merge this tomorrow unless you have any more comments @gracicot @Guekka

@h7x4
Copy link
Member

h7x4 commented Jul 28, 2024

Cool stuff, thank you!

@h7x4 h7x4 merged commit 9412d1b into NixOS:master Jul 28, 2024
26 checks passed
@Jayman2000 Jayman2000 deleted the fix-317553 branch July 29, 2024 21:16
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.

[vcpkg] Binaries compiled using vcpkg cannot be ran since libstdc++ is not found
4 participants