all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#62917: ‘guix shell -CH’ should be able to contain both GCC and Clang
@ 2023-04-18  0:14 zamfofex
  2023-04-18  0:23 ` bug#62917: [bug report subject correction] zamfofex
  0 siblings, 1 reply; 6+ messages in thread
From: zamfofex @ 2023-04-18  0:14 UTC (permalink / raw)
  To: 62917

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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#62917: [bug report subject correction]
  2023-04-18  0:14 bug#62917: ‘guix shell -CH’ should be able to contain both GCC and Clang zamfofex
@ 2023-04-18  0:23 ` zamfofex
  0 siblings, 0 replies; 6+ messages in thread
From: zamfofex @ 2023-04-18  0:23 UTC (permalink / raw)
  To: 62917@debbugs.gnu.org

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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#62917] [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File exists: "/bin/cc"'
  2023-04-18  0:14 bug#62917: ‘guix shell -CH’ should be able to contain both GCC and Clang zamfofex
@ 2024-10-22 10:49 ` Marco Fortina
  0 siblings, 0 replies; 6+ messages in thread
From: Marco Fortina @ 2024-10-22 10:49 UTC (permalink / raw)
  To: guix-patches@gnu.org, guix-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3665 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#62917: [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File exists: "/bin/cc"'
@ 2024-10-22 10:49 ` Marco Fortina
  0 siblings, 0 replies; 6+ messages in thread
From: Marco Fortina @ 2024-10-22 10:49 UTC (permalink / raw)
  To: guix-patches@gnu.org, guix-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3665 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [bug#62917] [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File exists: "/bin/cc"'
  2024-10-22 10:49 ` bug#62917: " Marco Fortina
  (?)
@ 2024-12-15  4:36 ` Maxim Cournoyer
  2024-12-15  6:04   ` bug#62917: " John Kehayias via Bug reports for GNU Guix
  -1 siblings, 1 reply; 6+ messages in thread
From: Maxim Cournoyer @ 2024-12-15  4:36 UTC (permalink / raw)
  To: Marco Fortina, Ludovic Courtès
  Cc: guix-patches@gnu.org, guix-devel@gnu.org

Hi Marco,

Marco Fortina <marco_fortina@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#62917: [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File exists: "/bin/cc"'
  2024-12-15  4:36 ` [bug#62917] " Maxim Cournoyer
@ 2024-12-15  6:04   ` John Kehayias via Bug reports for GNU Guix
  0 siblings, 0 replies; 6+ messages in thread
From: John Kehayias via Bug reports for GNU Guix @ 2024-12-15  6:04 UTC (permalink / raw)
  To: 62917-done; +Cc: Ludovic Courtès, Marco Fortina, Maxim Cournoyer

On Sun, Dec 15, 2024 at 01:36 PM, Maxim Cournoyer wrote:

> Hi Marco,
>
> Marco Fortina <marco_fortina@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





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-12-15  6:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22 10:49 [bug#62917] [bug#73799] [PATCH] Fix 'guix shell: error: symlink: File exists: "/bin/cc"' Marco Fortina
2024-10-22 10:49 ` bug#62917: " Marco Fortina
2024-12-15  4:36 ` [bug#62917] " Maxim Cournoyer
2024-12-15  6:04   ` bug#62917: " John Kehayias via Bug reports for GNU Guix
  -- strict thread matches above, loose matches on Subject: below --
2023-04-18  0:14 bug#62917: ‘guix shell -CH’ should be able to contain both GCC and Clang zamfofex
2023-04-18  0:23 ` bug#62917: [bug report subject correction] zamfofex

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.