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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62917 in the body.
You can then email your comments to 62917 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#62917; Package guix. (Tue, 18 Apr 2023 00:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to zamfofex <zamfofex <at> twdb.moe>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 18 Apr 2023 00:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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




Information forwarded to bug-guix <at> gnu.org:
bug#62917; Package guix. (Tue, 18 Apr 2023 00:24:02 GMT) Full text and rfc822 format available.

Message #8 received at 62917 <at> debbugs.gnu.org (full text, mbox):

From: zamfofex <zamfofex <at> twdb.moe>
To: "62917 <at> debbugs.gnu.org" <62917 <at> debbugs.gnu.org>
Subject: [bug report subject correction]
Date: Mon, 17 Apr 2023 21:23:38 -0300 (BRT)
Apologies for the noise, but the subject of the email I sent is wrong. It should have been ‘guix shell -CF’ rather than ‘guix shell -CH’.




Information forwarded to bug-guix <at> gnu.org:
bug#62917; Package guix. (Tue, 22 Oct 2024 11:21:03 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marco Fortina <marco_fortina <at> hotmail.it>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>, "guix-devel <at> gnu.org"
 <guix-devel <at> gnu.org>
Subject: [bug#62917] [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File
 exists: "/bin/cc"'
Date: Tue, 22 Oct 2024 10:49:32 +0000
[Message part 1 (text/plain, inline)]
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


Cheers,
Marco
[Message part 2 (text/html, inline)]

Added tag(s) patch. Request was from Simon Tournier <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 10 Dec 2024 16:51:08 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#62917; Package guix. (Sun, 15 Dec 2024 04:39:01 GMT) Full text and rfc822 format available.

Message #16 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Marco Fortina <marco_fortina <at> hotmail.it>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: "guix-devel <at> gnu.org" <guix-devel <at> gnu.org>,
 "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: Re: [bug#62917] [bug#73799] [PATCH] Fix 'guix shell: error:
 symlink: File exists: "/bin/cc"'
Date: Sun, 15 Dec 2024 13:36:01 +0900
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,
Maxim




Reply sent to John Kehayias <john.kehayias <at> protonmail.com>:
You have taken responsibility. (Sun, 15 Dec 2024 06:05:01 GMT) Full text and rfc822 format available.

Notification sent to zamfofex <zamfofex <at> twdb.moe>:
bug acknowledged by developer. (Sun, 15 Dec 2024 06:05:02 GMT) Full text and rfc822 format available.

Message #21 received at 62917-done <at> debbugs.gnu.org (full text, mbox):

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





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 12 Jan 2025 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 60 days ago.

Previous Next


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