[Cado-nfs-discuss] Cmake does not respect path to gcc

Andreas Enge andreas.enge at inria.fr
Wed Jul 23 18:47:01 CEST 2014


Hello,

trying to install cado-nfs with the guix userland package manager:
   https://www.gnu.org/software/guix/
on top of a debian distribution, I hit the following bug.

Gcc-4.8.2 is installed in a non-standard location, referenced in $PATH:
$ which gcc
/home/privat/.guix-profile/bin/gcc

But the cmake check for gcc uses the debian one it finds in /usr/bin
(and fails, potentially because it ends up mixing the guix and the
debian linker):
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /gnu/store/w0pmvn1wcn1zj175fv2ima4bxlbw5cx1-cmake-2.8.12/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/usr/bin/cc" is not able to compile a simple test program.
 
To me this looks like a bug in cmake itself, or did I make a mistake?
Or could you change your configuration so as to take $PATH into account?

I also tried
   CC=`which gcc` make
without success.

Andreas



More information about the Cado-nfs-discuss mailing list