Subject: Re: bug#41038: gcc creates binaries that don't find their shared libraries

From: Ludovic Courtès <[email-masked]>
Date: Sun, 03 May 2020 23:07:34 +0200

Hi,

Bruno Haible <[email-masked]> skribis:

> $ guix install make gcc-toolchain binutils glibc gdb gettext m4 autoconf automake

It’s a mistake to explicitly binutils and glibc: they are provided by
‘gcc-toolchain’ along with an ‘ld’ wrapper that takes care of adding
entries to the RUNPATH of binaries:

  https://guix.gnu.org/manual/en/html_node/Application-Setup.html#The-GCC-toolchain

‘binutils’ shadowed that wrapper.  I admit what you did looks perfectly
legit at first sight and the failure mode isn’t great.

The fix is to run:

  guix remove glibc binutils

Another way to do software development is with ‘guix environment’:

  https://guix.gnu.org/manual/en/html_node/Development.html

For example, if you want to hack on Gettext, run:

  guix environment gettext

That spawns a shell containing all the development tools and environment
variables to hack on gettext.

HTH!

Ludo’.