guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Installing a C tool chain


From: Ludovic Courtès
Subject: Installing a C tool chain
Date: Mon, 27 Jan 2014 10:53:21 +0100
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Sree Harsha Totakura <address@hidden> skribis:

> On 01/26/2014 08:30 PM, Ludovic Courtès wrote:
>> To summarize: ‘propagated-inputs’ should list libraries 99% of the
>> time.  Listing programs in ‘propagated-inputs’ just for the sake of
>> populating $PATH is a bad idea.
>
> I recently found that many library packages do not propagate libc.  I
> installed gnutls through Guix and wanted to use it for development, but
> the linker complained that some symbols belonging to glibc are missing.
>  What is the correct way of doing this?

This is undocumented/suboptimal territory.

To install a working C environment in your profile, run:

  guix package -i gcc binutils ld-wrapper glibc

and set the environment as suggested.  (‘ld-wrapper’ is a linker wrapper
that takes care of adding a ‘-rpath’ flag for every ‘-l’; see
ld-wrapper.scm.)

The crux here is that ‘ld-wrapper’ must come *after* ‘binutils’ on the
command line above, so that $profile/bin/ld points to it, and not to the
real ‘ld’.

I believe this could be addressed by having a simple “toolchain”
meta-package with the sole purpose of propagating these 4 inputs, and by
documenting it in the manual.

WDYT?

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]