Multiple conflicting paths found for

I’m trying to package my first, CMake-based application. However, the build process (nix-build -A foobar) fails with:

make: *** [Makefile:100: install] Error 1
error: builder for '/nix/store/x.drv' failed with exit code 2;
       last 10 log lines:
       > CMake Error at src/cmake_install.cmake:74 (file):
       >   file Multiple conflicting paths found for
       >     /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/
       >     /nix/store/qbgfsaviwqi2p6jr7an1g2754sv3xqhn-gcc-11.3.0-lib/lib/
       > Call Stack (most recent call first):
       >   cmake_install.cmake:47 (include)
       > make: *** [Makefile:100: install] Error 1

Is there a way to fix this issue?

1 Like

Yes, probably.

Though hard to say anything beyond that without knowing anything about the actual build.

We need at least the expression you use to build, and maybe even the actual sources, though lets start with the nix expression.

Thanks, it turns out that it’s a CMake-related issue, nix is not to blame :sunglasses: