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

Compiler check fails while configuring cereal #23

Open
ianacaburian opened this issue Aug 8, 2023 · 2 comments
Open

Compiler check fails while configuring cereal #23

ianacaburian opened this issue Aug 8, 2023 · 2 comments

Comments

@ianacaburian
Copy link

Hi there,

I'm encountering an error when running nix-shell for ewig (on macos).

The logs (provided below) indicate a failing compiler check while building cereal for the lager derivation.
Curiously, cloning lager repo separately and running nix-shell works fine, allowing all tests to build and pass.

Let me know if I can help and thanks in advance for yours.

building '/nix/store/00sw3c108pscw2ka1371c1cx577la8lw-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv'...
unpacking sources
unpacking source archive /nix/store/94xiznxid142b18r51mkzdd1ihc0bw3z-source
source root is source
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/2hr66n87jvmngmyp36spq0k0085brsr7-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649/include -DCMAKE_INSTALL_LIBDIR=/nix/store/2hr66n87jvmngmyp36spq0k0085brsr7-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649/lib -DCMAKE_INSTALL_NAME_DIR=/nix/store/2hr66n87jvmngmyp36spq0k0085brsr7-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_DEPLOYMENT_TARGET= -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=last -DCMAKE_STRIP=/nix/store/vqs61iw47w4133xa5qn9kwd8v0y4x824-cctools-binutils-darwin/bin/strip -DCMAKE_RANLIB=/nix/store/vqs61iw47w4133xa5qn9kwd8v0y4x824-cctools-binutils-darwin/bin/ranlib -DCMAKE_AR=/nix/store/vqs61iw47w4133xa5qn9kwd8v0y4x824-cctools-binutils-darwin/bin/ar -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=/nix/store/2hr66n87jvmngmyp36spq0k0085brsr7-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649 -DJUST_INSTALL_CEREAL=true 
-- The C compiler identification is Clang 5.0.2
-- The CXX compiler identification is Clang 5.0.2
-- Check for working C compiler: /nix/store/q3cqskrsnifj71rhlq45any70qva71zr-clang-wrapper-5.0.2/bin/clang
-- Check for working C compiler: /nix/store/q3cqskrsnifj71rhlq45any70qva71zr-clang-wrapper-5.0.2/bin/clang -- broken
CMake Error at /nix/store/bimdmkq9apmkkprvwqiwk2skmqm0r1hj-cmake-3.12.1/share/cmake-3.12/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "/nix/store/q3cqskrsnifj71rhlq45any70qva71zr-clang-wrapper-5.0.2/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /tmp/nix-build-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv-0/source/build/CMakeFiles/CMakeTmp
    
    Run Build Command:"/nix/store/5paxp2z2cva6g4j0z82922gyqp1cs04l-gnumake-4.2.1/bin/make" "cmTC_78bc8/fast"
    /nix/store/5paxp2z2cva6g4j0z82922gyqp1cs04l-gnumake-4.2.1/bin/make -f CMakeFiles/cmTC_78bc8.dir/build.make CMakeFiles/cmTC_78bc8.dir/build
    make[1]: Entering directory '/private/tmp/nix-build-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv-0/source/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_78bc8.dir/testCCompiler.c.o
    /nix/store/q3cqskrsnifj71rhlq45any70qva71zr-clang-wrapper-5.0.2/bin/clang   -arch x86_64   -o CMakeFiles/cmTC_78bc8.dir/testCCompiler.c.o   -c /tmp/nix-build-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv-0/source/build/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_78bc8
    /nix/store/bimdmkq9apmkkprvwqiwk2skmqm0r1hj-cmake-3.12.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_78bc8.dir/link.txt --verbose=1
    /nix/store/q3cqskrsnifj71rhlq45any70qva71zr-clang-wrapper-5.0.2/bin/clang   -arch x86_64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTC_78bc8.dir/testCCompiler.c.o  -o cmTC_78bc8 
    ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
    clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [CMakeFiles/cmTC_78bc8.dir/build.make:87: cmTC_78bc8] Error 1
    make[1]: Leaving directory '/private/tmp/nix-build-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv-0/source/build/CMakeFiles/CMakeTmp'
    make: *** [Makefile:121: cmTC_78bc8/fast] Error 2
    

  

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


-- Configuring incomplete, errors occurred!
See also "/tmp/nix-build-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv-0/source/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/nix-build-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv-0/source/build/CMakeFiles/CMakeError.log".
error: builder for '/nix/store/00sw3c108pscw2ka1371c1cx577la8lw-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv' failed with exit code 1;
       last 10 log lines:
       >
       >
       >   CMake will not be able to correctly generate this project.
       > Call Stack (most recent call first):
       >   CMakeLists.txt:2 (project)
       >
       >
       > -- Configuring incomplete, errors occurred!
       > See also "/tmp/nix-build-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv-0/source/build/CMakeFiles/CMakeOutput.log".
       > See also "/tmp/nix-build-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv-0/source/build/CMakeFiles/CMakeError.log".
       For full logs, run 'nix log /nix/store/00sw3c108pscw2ka1371c1cx577la8lw-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv'.
error: 1 dependencies of derivation '/nix/store/62zi7b8dj8q8bk75q0lrppkh5chq6xp2-lager.drv' failed to build
error: build of '/nix/store/0bx3f8z02576cjvsd6n8azalh84f0bc9-scelta-git-bd121843e227435f8f55c4aaf7e2de536f05b583.drv', '/nix/store/62zi7b8dj8q8bk75q0lrppkh5chq6xp2-lager.drv', '/nix/store/c8yglf20irh1fg36dp6dyq2bjgs8l97q-immer-git-e5d79ed80ec74d511cc4f52fb68feeac66507f2c.drv', '/nix/store/lykv30y1pskvz4x8m4mj8r7iaqziiz0b-zug.drv' failed
@ianacaburian
Copy link
Author

Looked into previous (closed) issues and tried running nix-shell --pure as you suggested to others.

Unfortunately, being on macos, there are now errors with trying to create a build dir within the zug repo that already contains a BUILD file.

Running nix-shell --pure --show-trace produces the following log:

these 7 derivations will be built:
  /nix/store/00sw3c108pscw2ka1371c1cx577la8lw-cereal-git-arximboldi-f158a44a3277ec2e1807618e63bcb8e1bd559649.drv
  /nix/store/mvry09yw1j9a25xw6i579pldk8qf9jjr-source.drv
  /nix/store/0bx3f8z02576cjvsd6n8azalh84f0bc9-scelta-git-bd121843e227435f8f55c4aaf7e2de536f05b583.drv
  /nix/store/xndcc8aw4whmkqcx22cvvb7fkxwh31hq-source.drv
  /nix/store/c8yglf20irh1fg36dp6dyq2bjgs8l97q-immer-git-e5d79ed80ec74d511cc4f52fb68feeac66507f2c.drv
  /nix/store/lykv30y1pskvz4x8m4mj8r7iaqziiz0b-zug.drv
  /nix/store/62zi7b8dj8q8bk75q0lrppkh5chq6xp2-lager.drv
building '/nix/store/lykv30y1pskvz4x8m4mj8r7iaqziiz0b-zug.drv'...
unpacking sources
unpacking source archive /nix/store/fzvb15k96gvwxrkvn3ah5b8i26grjiy9-source
source root is source
patching sources
configuring
fixing cmake files...
mkdir: cannot create directory 'build': File exists
error: builder for '/nix/store/lykv30y1pskvz4x8m4mj8r7iaqziiz0b-zug.drv' failed with exit code 1;
       last 7 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/fzvb15k96gvwxrkvn3ah5b8i26grjiy9-source
       > source root is source
       > patching sources
       > configuring
       > fixing cmake files...
       > mkdir: cannot create directory 'build': File exists
       For full logs, run 'nix log /nix/store/lykv30y1pskvz4x8m4mj8r7iaqziiz0b-zug.drv'.
error: build of '/nix/store/0bx3f8z02576cjvsd6n8azalh84f0bc9-scelta-git-bd121843e227435f8f55c4aaf7e2de536f05b583.drv', '/nix/store/62zi7b8dj8q8bk75q0lrppkh5chq6xp2-lager.drv', '/nix/store/c8yglf20irh1fg36dp6dyq2bjgs8l97q-immer-git-e5d79ed80ec74d511cc4f52fb68feeac66507f2c.drv', '/nix/store/lykv30y1pskvz4x8m4mj8r7iaqziiz0b-zug.drv' failed

@arximboldi
Copy link
Owner

The dependencies in this repo haven't been updated in quite some time. Probably this can be fixed by upgrading nixpkgs, lager, immer and zug. This may also require slightly adapting the code as there are small API changes in Lager since it was last updated I reckon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants