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

yandex-disk: fix missing libstdc++.so.6 #391887

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

Conversation

tanya1866
Copy link
Contributor

The yandex-disk binary fails to find libstdc++.so.6 due to incorrect library path resolution. The issue was gcclib was set to ${lib.getLib stdenv.cc.cc}/lib64, but libstdc++.so.6 is in /lib, not /lib64.
I fixed this and added stdenv.cc.cc to buildInputs to ensure the library is available at runtime.

Closes #391549
Maintainers: @sergei-mironov @jagajaga

@tanya1866 tanya1866 reopened this Mar 21, 2025
@dotlambda dotlambda removed their request for review March 21, 2025 17:51
@Andrew15-5
Copy link
Contributor

Thanks, it works again.

workaround
  package = pkgs.yandex-disk.overrideAttrs (final: old:
    with pkgs; let
      p = {
        arch = "x86_64";
        gcclib = "${lib.getLib pkgs.stdenv.cc.cc}/lib";
        sha256 = "sha256-HH/pLZmDr6m/B3e6MHafDGnNWR83oR2y1ijVMR/LOF0=";
        webarchive = "20220519080155";
      };
    in {
      src = fetchurl {
        urls = [
          "https://repo.yandex.ru/yandex-disk/rpm/stable/${p.arch}/${final.pname}-${final.version}-1.fedora.${p.arch}.rpm"
          "https://web.archive.org/web/${p.webarchive}/https://repo.yandex.ru/yandex-disk/rpm/stable/${p.arch}/${final.pname}-${final.version}-1.fedora.${p.arch}.rpm"
        ];
        sha256 = p.sha256;
      };
      buildInputs = [zlib stdenv.cc.cc];
      builder = writeText "builder.sh" ((builtins.readFile old.builder)
        + ''
          ${patchelf}/bin/patchelf \
            --set-rpath "${zlib.out}/lib:${p.gcclib}" \
            $out/bin/yandex-disk
        '');
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yandex-disk: some shared libraries are missing
2 participants