[Nix-dev] NEWBYE question: why clang-3.7 ships cpp?

Christophe Trophime christophe.trophime at lncmi.cnrs.fr
Thu Mar 24 17:00:42 CET 2016


----- Original Message -----
> From: "Vladimír Čunát" <vcunat at gmail.com>
> To: "Christophe Trophime" <christophe.trophime at lncmi.cnrs.fr>
> Cc: nix-dev at lists.science.uu.nl
> Sent: Wednesday, March 23, 2016 10:56:12 AM
> Subject: Re: [Nix-dev] NEWBYE question: why clang-3.7 ships cpp?
> 
> On 03/23/2016 10:53 AM, Christophe Trophime wrote:
> > You mean that I can install clang and gcc provided I do something like
> > that:
> > nix-env --set-flag priority 5 binutils
> > nix-env --set-flag priority 10 gcc
> > nix-env --set-flag priority 20 clang
> 
> Yes. Note that you can set the priority of a package by this interface
> only *after* installing it... so you need to do it one-by-one in case
> they refuse to install due to collisions.
> 

Thanks. Now I have gcc and clang side by side great
nix-env -q:
clang-wrapper-3.7.1
cln-1.3.4
cmake-3.4.0
eigen-3.2.5
flex-2.6.0
gcc-wrapper-4.9.3
gfortran-wrapper-4.9.3
...

Fine but when I tried to compile my actual application based on Feelpp
which rebuilds for its own google-gflags and glog I end up with the following error when building with clang 3.7:
-- Glog first pass: GLOG_INCLUDE_DIR-NOTFOUND
-- Building glog in /home/trophime/feelpp_build/clang-3.7/contrib/glog-compile...
--    - using gflags /home/trophime/feelpp_build/clang-3.7/contrib/gflags/...
-- Installing glog in /home/trophime/feelpp_build/clang-3.7/contrib/glog...
In file included from /home/trophime/github/feelpp/contrib/glog/src/stl_logging_unittest.cc:34:
In file included from ./src/glog/stl_logging.h:54:
/nix/store/5idnvskkm4hky2fj335xfbqpfim3g9pd-gcc-4.9.3/include/c++/4.9.3/ext/hash_set:60:10: fatal error: 'backward_warning.h' file not found
#include "backward_warning.h"
         ^
1 error generated.

I suspect that this is connected with the way clang has been build...
How can I tell which gcc/g++ has been used for building this version? is it gcc 4.9.3 or an older one?

What if I want to rebuild clang?
I tried 
nix-build -check -A clang but I only says:
 checking path(s) ‘/nix/store/i47yln3r5a89wp0gza9nv7zla5xim714-clang-wrapper-3.7.1’
warning: rewriting hashes in ‘/nix/store/i47yln3r5a89wp0gza9nv7zla5xim714-clang-wrapper-3.7.1’; cross fingers
/nix/store/i47yln3r5a89wp0gza9nv7zla5xim714-clang-wrapper-3.7.1


> --Vladimir
> 
> 
> 


More information about the nix-dev mailing list