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

neovim derivation failing on Darwin after libstdc++ dependency is added #156806

Closed
nasadorian opened this issue Jan 26, 2022 · 3 comments
Closed
Labels
0.kind: bug Something is broken 6.topic: vim

Comments

@nasadorian
Copy link

nasadorian commented Jan 26, 2022

Describe the bug

Since abe84c2 was committed to nixpkgs-unstable, neovim is breaking upon installation.

Specifically it seems that libstdc++ is not available, and clang cannot run when building neovim from source.

CMake Error at /nix/store/03rqlijjbrf595jjdz5b74a9cc1jswpr-cmake-3.22.1/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "/nix/store/fanf50m95p6848rbiyfvj008czh1iibp-clang-wrapper-11.1.0/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /tmp/nix-build-neovim-unwrapped-0.6.1.drv-0/source/build/CMakeFiles/CMakeTmp

    Run Build Command(s):/nix/store/askn5hm06xf8b8lmyb5r5v362lv040pk-gnumake-4.3/bin/make -f Makefile cmTC_1b8fc/fast && /nix/store/askn5hm06xf8b8lmyb5r5v362lv040pk-gnumake-4.3/bin/make  -f CMakeFiles/cmTC_1b8fc.dir/build.make CMakeFiles/cmTC_1b8fc.dir/build
    make[1]: Entering directory '/private/tmp/nix-build-neovim-unwrapped-0.6.1.drv-0/source/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_1b8fc.dir/testCCompiler.c.o
    /nix/store/fanf50m95p6848rbiyfvj008czh1iibp-clang-wrapper-11.1.0/bin/clang    -MD -MT CMakeFiles/cmTC_1b8fc.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_1b8fc.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_1b8fc.dir/testCCompiler.c.o -c /tmp/nix-build-neovim-unwrapped-0.6.1.drv-0/source/build/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_1b8fc
    /nix/store/03rqlijjbrf595jjdz5b74a9cc1jswpr-cmake-3.22.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1b8fc.dir/link.txt --verbose=1
    /nix/store/fanf50m95p6848rbiyfvj008czh1iibp-clang-wrapper-11.1.0/bin/clang -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_1b8fc.dir/testCCompiler.c.o -o cmTC_1b8fc
    ld: library not found for -lstdc++
    clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [CMakeFiles/cmTC_1b8fc.dir/build.make:100: cmTC_1b8fc] Error 1
    make[1]: Leaving directory '/private/tmp/nix-build-neovim-unwrapped-0.6.1.drv-0/source/build/CMakeFiles/CMakeTmp'
    make: *** [Makefile:127: cmTC_1b8fc/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:7 (project)

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install neovim from unstable on Darwin

Expected behavior

neovim should install normally without error

Notify maintainers

@thornycrackers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-darwin"`
 - host os: `Darwin 20.6.0, macOS 10.16`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.3.10`
 - channels(nasadorian): `"nixpkgs-22.05pre348596.8bd55a6a5ab, home-manager"`
 - nixpkgs: `/Users/nasadorian/.nix-defexpr/channels/nixpkgs`
@nasadorian nasadorian added the 0.kind: bug Something is broken label Jan 26, 2022
@nasadorian nasadorian changed the title neovim derivation failing on Darwin after recent commits neovim derivation failing on Darwin after libstdc++ dependency is added Jan 26, 2022
@rgoulter
Copy link

rgoulter commented Jan 26, 2022

See also discussion in #155688 (well, I believe it's fixed by: #156765)

Though, I worked around it with e.g.:

(wrapNeovim (neovim-unwrapped.overrideAttrs (oa: { NIX_LDFLAGS = []; })) { })

@teto
Copy link
Member

teto commented Mar 30, 2022

there is an extensive discussion in #147658 . The current ldflags is problematic even on linux (you just have to use clang). I plan to remove it in #166162

@teto
Copy link
Member

teto commented Jun 1, 2022

I've removed the incriminating change

@teto teto closed this as completed Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: vim
Projects
None yet
Development

No branches or pull requests

4 participants