GNU bug report logs - #62917
‘guix shell -CH’ should be able to contain both GCC and Clang

Previous Next

Package: guix;

Reported by: zamfofex <zamfofex <at> twdb.moe>

Date: Tue, 18 Apr 2023 00:15:02 UTC

Severity: normal

Tags: patch

Done: John Kehayias <john.kehayias <at> protonmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: John Kehayias <john.kehayias <at> protonmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#62917: closed (‘guix shell
 -CH’ should be able to contain both GCC and Clang)
Date: Sun, 15 Dec 2024 06:05:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 15 Dec 2024 06:04:15 +0000
with message-id <874j355vot.fsf <at> protonmail.com>
and subject line Re: [bug#62917] [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File exists: "/bin/cc"'
has caused the debbugs.gnu.org bug report #62917,
regarding ‘guix shell -CH’ should be able to contain both GCC and Clang
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
62917: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62917
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: zamfofex <zamfofex <at> twdb.moe>
To: "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: ‘guix shell -CH’ should be able to contain both GCC and Clang
Date: Mon, 17 Apr 2023 21:14:15 -0300 (BRT)
When I add ‘gcc-toolchain’, it seems to try to create a ‘/bin/cc’ symlink to GCC, but the Clang package also has a ‘cc’ executable, so it fails.

- - - - - - - - -
% guix shell -CF clang-toolchain gcc-toolchain
guix shell: error: symlink: File exists: "/bin/cc"
- - - - - - - - -


[Message part 3 (message/rfc822, inline)]
From: John Kehayias <john.kehayias <at> protonmail.com>
To: 62917-done <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 Marco Fortina <marco_fortina <at> hotmail.it>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#62917] [bug#73799] [PATCH] Fix 'guix shell: error: symlink:
 File exists: "/bin/cc"'
Date: Sun, 15 Dec 2024 06:04:15 +0000
On Sun, Dec 15, 2024 at 01:36 PM, Maxim Cournoyer wrote:

> Hi Marco,
>
> Marco Fortina <marco_fortina <at> hotmail.it> writes:
>
>> This patch closes issue when running "guix shell --container --emulate-fhs clang-toolchain gcc-toolchain" or "guix shell --container --emulate-fhs clang-toolchain gcc-toolchain":
>>
>>
>> diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
>> index a219b2ac89..37f11395f9 100644
>> --- a/guix/scripts/environment.scm
>> +++ b/guix/scripts/environment.scm
>> @@ -464,7 +464,8 @@ (define (setup-fhs profile)
>>    ;; /bin since that already has the sh symlink and the other (optional) FHS
>>    ;; bin directories will link to /bin.
>>    (let ((gcc-path (string-append profile "/bin/gcc")))
>> -    (if (file-exists? gcc-path)
>> +    (if (and (file-exists? gcc-path)
>> +             (not (file-exists? "/bin/cc")))
>>          (symlink gcc-path "/bin/cc")))
>>
>>    ;; Guix's ldconfig doesn't search in FHS default locations, so provide a
>
> I see Ludovic pushed a variant of the above fix with
> 23ab6fc29f28b0fa9ad94bf2ceed135ee3fdea34, and attributed your discovery
> of the problem.
>
> Good.  Thanks for the report and patch!

Thanks for the followup, closing this.

John



This bug report was last modified 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.