unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 41038@debbugs.gnu.org
Subject: bug#41038: gcc creates binaries that don't find their shared libraries
Date: Mon, 04 May 2020 01:09:10 +0200	[thread overview]
Message-ID: <2050118.Ql0zV9tn6O@omega> (raw)
In-Reply-To: <87ftcgviax.fsf@gnu.org>

Hi Ludo,

> > $ 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

This does fix it, thank you.

The question "What packages do I need to do normal C development?" should
really be documented.

How about a doc section - at the beginning of the chapter
https://guix.gnu.org/manual/en/html_node/Development.html - that says:

  Packages needed for C development
  =================================

  For C development, you will typically need the packages
    make gcc-toolchain gdb

  Do NOT install glibc and binutils explicitly, as they would shadow
  the 'ld' wrapper that is necessary for proper operation of GCC.

Additionally, the documentation page
https://guix.gnu.org/manual/en/html_node/Application-Setup.html
starts with the sentence
  "When using Guix on top of GNU/Linux distribution other than Guix System ..."
but then the majority of the page applies to native Guix as well.
How about restructuring this documentation chapter into two pages:
  - one that explains things valid about Guix in general,
  - one that covers only the foreign-distro topics.

> 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.

Sounds very interesting. But for the moment, I use guix only as a
test platform.

Bruno





  reply	other threads:[~2020-05-03 23:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02 23:55 bug#41038: gcc creates binaries that don't find their shared libraries Bruno Haible
2020-05-03 21:07 ` Ludovic Courtès
2020-05-03 23:09   ` Bruno Haible [this message]
2020-05-04  8:50     ` zimoun
2020-05-04  9:06     ` zimoun
2020-05-04  9:30     ` Ludovic Courtès
2020-05-04  9:59       ` zimoun
2020-05-04 19:52         ` Ludovic Courtès
2020-05-06 17:42           ` bug#41038: [PATCH] doc: Reword "The GCC toolchain" zimoun
2020-05-15 16:59             ` zimoun
2020-05-15 19:42             ` Nicolas Goaziou
2020-05-16 14:57               ` zimoun
2020-05-16 15:19                 ` Ludovic Courtès
2020-05-03 22:12 ` bug#41038: gcc creates binaries that don't find their shared libraries Danny Milosavljevic
2020-05-05  9:30   ` Ludovic Courtès
2020-05-05 11:17     ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2050118.Ql0zV9tn6O@omega \
    --to=bruno@clisp.org \
    --cc=41038@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).