[Nix-dev] Re: [Stratego-dev] Stratego/XT build misery

Armijn Hemel armijn at uulug.nl
Mon Nov 15 22:59:54 CET 2004


On Mon, Nov 15, 2004 at 10:18:53PM +0100, Eelco Visser wrote:

> > > I've found another difference: I'm using gcc-3.4.2 in Nix. This GCC 
> > > configuration includes an ld. So, I'm using the ld of my GCC 
> > > installation. Also, I'm using the nixpkgs directly from svn, but that 
> > > will probably not make difference.
> > 
> > You can compile gcc with a local binutils...from a Nix pureness point of
> > view that might actually be cleaner :)
> 
> I was using the gcc from nix. The problem appears to be that /usr/lib
> path was search; instead of using glibc from /nix/store the one in
> /usr/lib was being used. This seems to solve the problem:

Which is perfectly normal. No matter which gcc you use, if you don't
define which libraries it should link to (think RPATH or LD_LIBRARY_PATH at
runtime and LDFLAGS at compiletime) it will search the default paths and
find the things in /usr first.

> export NIX_CFLAGS_COMPILE="-L/home/visser/.nix-profile/include -I/usr/include"
> export NIX_CFLAGS_LINK="-L/home/visser/.nix-profile/lib/ -L/usr/lib -L/lib"
> export NIX_LDFLAGS="-L/home/visser/.nix-profile/lib/ -L/usr/lib -L/lib"
> 
> One would expect that gcc from nix would/should look at the nix store first.

Like the glibc that was used to build gcc itself? In that case, how
would you do things like glibc upgrades?

Besides, you can always write a Nix expression for it, the gcc-wrapper
already makes sure you use the right glibc :)

armijn

-- 
 ---------------------------------------------------------------------------
  armijn at uulug.nl | http://www.uulug.nl/ | UULug: Utrecht Linux Users Group
 ---------------------------------------------------------------------------



More information about the nix-dev mailing list