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

build-support/cc-wrapper: add libstdc++fs into default library path for clang #213021

Merged
merged 1 commit into from
Jan 28, 2023

Commits on Jan 28, 2023

  1. build-support/cc-wrapper: add libstdc++fs into default library path f…

    …or clang
    
    After NixOS#210004 `usbmuxd2` started
    failing to build as:
    
        usbmuxd2-unstable> .../ld: cannot find -lstdc++fs: No such file or directory
        usbmuxd2-unstable> clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
    
    This started happening because NixOS#210004 exposed a long-standing bug in
    `gcc` derivation: `cc.lib` is missing `libstdc++fs` library:
    
        $ find $(nix-build --no-link -A stdenv.cc.cc.lib) | fgrep libstdc | unnix
    
        /<<NIX>>/gcc-11.3.0-lib/lib/libstdc++fs.la
    
        /<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.la
        /<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.so.6.0.29
        /<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.so
        /<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.so.6
    
    It was not moved from `cc.out` output:
    
        $ find $(nix-build --no-link -A stdenv.cc.cc) | fgrep libstdc | unnix
        /<<NIX>>/gcc-11.3.0/lib/libstdc++.a
        /<<NIX>>/gcc-11.3.0/lib/libstdc++fs.a
    
    This change adds `cc` library lookup path back to `staging-next` until
    `gcc` is fixed.`
    trofi committed Jan 28, 2023
    Configuration menu
    Copy the full SHA
    4763533 View commit details
    Browse the repository at this point in the history