GNU bug report logs - #59278
gcc@7 and higher are not hidden packages

Previous Next

Package: guix;

Reported by: bbb ee <blasforr <at> gmail.com>

Date: Tue, 15 Nov 2022 06:17:02 UTC

Severity: normal

To reply to this bug, email your comments to 59278 AT debbugs.gnu.org.

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#59278; Package guix. (Tue, 15 Nov 2022 06:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to bbb ee <blasforr <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 15 Nov 2022 06:17:02 GMT) Full text and rfc822 format available.

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

From: bbb ee <blasforr <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: how gcc-toolchain can depends a package who doesn't exists?
Date: Tue, 15 Nov 2022 00:53:32 +0100
[Message part 1 (text/plain, inline)]
in version c81457a5883ea43950eb2ecdcbb58a5b144bcd11 of guix, gcc-toolchain
depends gcc:
```
$ DEFAULT_CHANNELS=/tmp/default_channels.scm
$ echo "%default-channels" > $DEFAULT_CHANNELS
# I force guix to use only %default-channels here
$ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11  -C
$DEFAULT_CHANNELS -- search gcc-toolchain
guile: warning: failed to install locale
name: gcc-toolchain
version: 9.3.0
outputs: out debug static
systems: x86_64-linux i686-linux
dependencies: binutils <at> 2.32 gcc <at> 9.3.0 glibc <at> 2.29 ld-wrapper <at> 0
```


However, I can't find gcc package in this version of guix
```
$ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11  -C
$DEFAULT_CHANNELS -- search gcc
# no found gcc

# guix install failure message confirm that gcc doesn't exist in commit
c81457
$ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11 -C
$DEFAULT_CHANNELS -- install gcc -p ~/opt/python-dev_3_7
guile: warning: failed to install locale
guix install: error: gcc: unknown package
```

in commit c81457, how gcc-toolchain can depends a package who doesn't
exists?
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#59278; Package guix. (Tue, 15 Nov 2022 06:28:01 GMT) Full text and rfc822 format available.

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

From: Julien Lepiller <julien <at> lepiller.eu>
To: bbb ee <blasforr <at> gmail.com>, 59278 <at> debbugs.gnu.org
Subject: Re: bug#59278: how gcc-toolchain can depends a package who doesn't exists?
Date: Tue, 15 Nov 2022 07:26:25 +0100
[Message part 1 (text/plain, inline)]
Hi,

This is not a bug. The gcc package exists, but is hidden from CLI on purpose because you shouldn't install it and use it directly. You should use gcc-toolchain instead.

Le 15 novembre 2022 00:53:32 GMT+01:00, bbb ee <blasforr <at> gmail.com> a écrit :
>in version c81457a5883ea43950eb2ecdcbb58a5b144bcd11 of guix, gcc-toolchain
>depends gcc:
>```
>$ DEFAULT_CHANNELS=/tmp/default_channels.scm
>$ echo "%default-channels" > $DEFAULT_CHANNELS
># I force guix to use only %default-channels here
>$ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11  -C
>$DEFAULT_CHANNELS -- search gcc-toolchain
>guile: warning: failed to install locale
>name: gcc-toolchain
>version: 9.3.0
>outputs: out debug static
>systems: x86_64-linux i686-linux
>dependencies: binutils <at> 2.32 gcc <at> 9.3.0 glibc <at> 2.29 ld-wrapper <at> 0
>```
>
>
>However, I can't find gcc package in this version of guix
>```
>$ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11  -C
>$DEFAULT_CHANNELS -- search gcc
># no found gcc
>
># guix install failure message confirm that gcc doesn't exist in commit
>c81457
>$ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11 -C
>$DEFAULT_CHANNELS -- install gcc -p ~/opt/python-dev_3_7
>guile: warning: failed to install locale
>guix install: error: gcc: unknown package
>```
>
>in commit c81457, how gcc-toolchain can depends a package who doesn't
>exists?
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#59278; Package guix. (Tue, 15 Nov 2022 10:31:01 GMT) Full text and rfc822 format available.

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

From: bbb ee <blasforr <at> gmail.com>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: 59278 <at> debbugs.gnu.org
Subject: Re: bug#59278: how gcc-toolchain can depends a package who doesn't
 exists?
Date: Tue, 15 Nov 2022 11:29:54 +0100
[Message part 1 (text/plain, inline)]
Thanks, I close the issue

Le mar. 15 nov. 2022 à 07:27, Julien Lepiller <julien <at> lepiller.eu> a écrit :

> Hi,
>
> This is not a bug. The gcc package exists, but is hidden from CLI on
> purpose because you shouldn't install it and use it directly. You should
> use gcc-toolchain instead.
>
> Le 15 novembre 2022 00:53:32 GMT+01:00, bbb ee <blasforr <at> gmail.com> a
> écrit :
>>
>> in version c81457a5883ea43950eb2ecdcbb58a5b144bcd11 of guix,
>> gcc-toolchain depends gcc:
>> ```
>> $ DEFAULT_CHANNELS=/tmp/default_channels.scm
>> $ echo "%default-channels" > $DEFAULT_CHANNELS
>> # I force guix to use only %default-channels here
>> $ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11  -C
>> $DEFAULT_CHANNELS -- search gcc-toolchain
>> guile: warning: failed to install locale
>> name: gcc-toolchain
>> version: 9.3.0
>> outputs: out debug static
>> systems: x86_64-linux i686-linux
>> dependencies: binutils <at> 2.32 gcc <at> 9.3.0 glibc <at> 2.29 ld-wrapper <at> 0
>> ```
>>
>>
>> However, I can't find gcc package in this version of guix
>> ```
>> $ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11  -C
>> $DEFAULT_CHANNELS -- search gcc
>> # no found gcc
>>
>> # guix install failure message confirm that gcc doesn't exist in commit
>> c81457
>> $ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11 -C
>> $DEFAULT_CHANNELS -- install gcc -p ~/opt/python-dev_3_7
>> guile: warning: failed to install locale
>> guix install: error: gcc: unknown package
>> ```
>>
>> in commit c81457, how gcc-toolchain can depends a package who doesn't
>> exists?
>>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#59278; Package guix. (Tue, 15 Nov 2022 10:31:02 GMT) Full text and rfc822 format available.

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

From: bbb ee <blasforr <at> gmail.com>
To: 59278 <at> debbugs.gnu.org
Date: Tue, 15 Nov 2022 11:30:37 +0100
[Message part 1 (text/plain, inline)]
close #59278
[Message part 2 (text/html, inline)]

bug closed, send any further explanations to 59278 <at> debbugs.gnu.org and bbb ee <blasforr <at> gmail.com> Request was from bbb ee <blasforr <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 15 Nov 2022 10:50:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#59278; Package guix. (Tue, 15 Nov 2022 14:55:02 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: bbb ee <blasforr <at> gmail.com>, 59278 <at> debbugs.gnu.org
Subject: Re: bug#59278: how gcc-toolchain can depends a package who doesn't
 exists?
Date: Tue, 15 Nov 2022 09:42:34 +0100
Hi,

On Tue, 15 Nov 2022 at 00:53, bbb ee <blasforr <at> gmail.com> wrote:

> in commit c81457, how gcc-toolchain can depends a package who doesn't
> exists?

The package exists, it is ’hidden’ – it means not accessible at the CLI
level.  The ’inherit’ copies, so gcc-11 is also hidden, for instance.

--8<---------------cut here---------------start------------->8---
(define-public gcc-4.7
[...]
    (hidden-package
     (package
       (name "gcc")
       (version "4.7.4")

(define-public gcc-4.8
  (package (inherit gcc-4.7)
    (version "4.8.5")

[...]

(define-public gcc-11
  (package
   (inherit gcc-8)
   (version "11.3.0")
--8<---------------cut here---------------end--------------->8---

The package ’gcc’ by itself is not barely useful because you also need
linker etc. Well, you usually need a complete toolchain, named
gcc-toolchain. ;-)

See manual: <https://guix.gnu.org/manual/devel/en/guix.html#The-GCC-toolchain>


So this is not a bug and I miss how what could be improved.  Closing?

Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#59278; Package guix. (Tue, 15 Nov 2022 21:43:02 GMT) Full text and rfc822 format available.

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

From: bbb ee <blasforr <at> gmail.com>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 59278 <at> debbugs.gnu.org
Subject: Re: bug#59278: how gcc-toolchain can depends a package who doesn't
 exists?
Date: Tue, 15 Nov 2022 22:42:02 +0100
[Message part 1 (text/plain, inline)]
It is just a little confusing for newcomers to guix. If we really want to
improve something, I think that could be to give a more rigorous
specification of the guix command:

in `guix search --help`, the documentation could be "Search for no hidden
packages matching REGEXPS."

in
https://guix.gnu.org/manual/en/html_node/Invoking-guix-package.html#Invoking-guix-package,
in the specification of the option -s :
"-s regexp

List the available packages whose name, synopsis, or description matches
regexp
"
What exactly means  "available" ?  For example, available means no hidden
guix package.

And in

Le mar. 15 nov. 2022 à 15:54, zimoun <zimon.toutoune <at> gmail.com> a écrit :

> Hi,
>
> On Tue, 15 Nov 2022 at 00:53, bbb ee <blasforr <at> gmail.com> wrote:
>
> > in commit c81457, how gcc-toolchain can depends a package who doesn't
> > exists?
>
> The package exists, it is ’hidden’ – it means not accessible at the CLI
> level.  The ’inherit’ copies, so gcc-11 is also hidden, for instance.
>
> --8<---------------cut here---------------start------------->8---
> (define-public gcc-4.7
> [...]
>     (hidden-package
>      (package
>        (name "gcc")
>        (version "4.7.4")
>
> (define-public gcc-4.8
>   (package (inherit gcc-4.7)
>     (version "4.8.5")
>
> [...]
>
> (define-public gcc-11
>   (package
>    (inherit gcc-8)
>    (version "11.3.0")
> --8<---------------cut here---------------end--------------->8---
>
> The package ’gcc’ by itself is not barely useful because you also need
> linker etc. Well, you usually need a complete toolchain, named
> gcc-toolchain. ;-)
>
> See manual: <
> https://guix.gnu.org/manual/devel/en/guix.html#The-GCC-toolchain>
>
>
> So this is not a bug and I miss how what could be improved.  Closing?
>
> Cheers,
> simon
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#59278; Package guix. (Tue, 15 Nov 2022 22:05:01 GMT) Full text and rfc822 format available.

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

From: bbb ee <blasforr <at> gmail.com>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 59278 <at> debbugs.gnu.org
Subject: Re: bug#59278: how gcc-toolchain can depends a package who doesn't
 exists?
Date: Tue, 15 Nov 2022 23:04:36 +0100
[Message part 1 (text/plain, inline)]
In the documentation, when it says "guix search" search matching package,
if users don't find a package defined in .scm (hidden or no), users can
consider it is a bug, because that doesn't match the behavior described in
the specification (here, the manual and "guix search --help").

Le mar. 15 nov. 2022 à 15:54, zimoun <zimon.toutoune <at> gmail.com> a écrit :

> Hi,
>
> On Tue, 15 Nov 2022 at 00:53, bbb ee <blasforr <at> gmail.com> wrote:
>
> > in commit c81457, how gcc-toolchain can depends a package who doesn't
> > exists?
>
> The package exists, it is ’hidden’ – it means not accessible at the CLI
> level.  The ’inherit’ copies, so gcc-11 is also hidden, for instance.
>
> --8<---------------cut here---------------start------------->8---
> (define-public gcc-4.7
> [...]
>     (hidden-package
>      (package
>        (name "gcc")
>        (version "4.7.4")
>
> (define-public gcc-4.8
>   (package (inherit gcc-4.7)
>     (version "4.8.5")
>
> [...]
>
> (define-public gcc-11
>   (package
>    (inherit gcc-8)
>    (version "11.3.0")
> --8<---------------cut here---------------end--------------->8---
>
> The package ’gcc’ by itself is not barely useful because you also need
> linker etc. Well, you usually need a complete toolchain, named
> gcc-toolchain. ;-)
>
> See manual: <
> https://guix.gnu.org/manual/devel/en/guix.html#The-GCC-toolchain>
>
>
> So this is not a bug and I miss how what could be improved.  Closing?
>
> Cheers,
> simon
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#59278; Package guix. (Wed, 16 Nov 2022 09:34:02 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: bbb ee <blasforr <at> gmail.com>
Cc: 59278 <at> debbugs.gnu.org
Subject: Re: bug#59278: how gcc-toolchain can depends a package who doesn't
 exists?
Date: Wed, 16 Nov 2022 09:53:26 +0100
Hi,

On Tue, 15 Nov 2022 at 22:42, bbb ee <blasforr <at> gmail.com> wrote:

> It is just a little confusing for newcomers to guix. If we really want to
> improve something, I think that could be to give a more rigorous
> specification of the guix command:

I agree that the manual does not speak about the concept of
’hidden-package’, if I read correctly.  A note would be welcome, IMHO.

However, the commit you are referring is from 2020:

        c81457a5883ea43950eb2ecdcbb58a5b144bcd11
        Author:     Ludovic Courtès <ludo <at> gnu.org>
        AuthorDate: Fri May 8 16:34:58 2020 +0200
        Commit:     Ludovic Courtès <ludo <at> gnu.org>
        CommitDate: Fri May 8 16:34:58 2020 +0200

        gnu: gcc-toolchain: Add 10.1.0.

        * gnu/packages/commencement.scm (gcc-toolchain-10): New variable.

        1 file changed, 3 insertions(+)
        gnu/packages/commencement.scm | 3 +++

and many things have been improved since. ;-)


For instance, using 00ff6f7 (from ~Oct 2022), it reads,

--8<---------------cut here---------------start------------->8---
$ guix search gcc | recsel -p name,version | head -30
name: gcc
version: 12.2.0

name: gcc
version: 11.3.0

name: gcc
version: 10.3.0

name: gcc
version: 9.5.0

name: gcc
version: 8.5.0

name: gcc
version: 7.5.0

name: gcc
version: 2.95.3

name: gcc-toolchain
version: 12.2.0

name: gcc-toolchain
version: 11.3.0

name: gcc-toolchain
version: 10.3.0
--8<---------------cut here---------------end--------------->8---

Wait, contrary to what I said, the packages are not hidden when they
should be!  For example, gcc <at> 4m @5 and @6 are not displayed but @7 is.

--8<---------------cut here---------------start------------->8---
$ guix show gcc <at> 6
guix show: error: gcc <at> 6: package not found

$ guix show gcc <at> 7
name: gcc
version: 7.5.0
outputs:
+ lib: shared libraries
+ debug: debug information
+ out: everything else
systems: x86_64-linux i686-linux
dependencies: gmp <at> 6.2.1 isl <at> 0.23 libelf <at> 0.8.13 libstdc++-headers <at> 10.3.0 mpc <at> 1.2.1 mpfr <at> 4.1.0 perl <at> 5.34.0 texinfo <at> 6.7 zlib <at> 1.2.11
location: gnu/packages/gcc.scm:601:2
homepage: https://gcc.gnu.org/
license: GPL 3+
synopsis: GNU Compiler Collection  
description: GCC is the GNU Compiler Collection.  It provides compiler front-ends for several languages, including C, C++, Objective-C, Fortran, Ada, and
+ Go.  It also includes runtime support libraries for these languages.
--8<---------------cut here---------------end--------------->8---

It is because the ’properties’ field of gcc <at> 7 is rewritten,

--8<---------------cut here---------------start------------->8---
(define-public gcc-7
  (package
    (inherit gcc-6)
    (version "7.5.0")
[...]
    (properties
     `((compiler-cpu-architectures
        ("aarch64" ,@%gcc-7.5-aarch64-micro-architectures)
        ("armhf" ,@%gcc-7.5-armhf-micro-architectures)
        ("x86_64" ,@%gcc-7.5-x86_64-micro-architectures))))))
--8<---------------cut here---------------end--------------->8---

and thus, it looses ’hidden’, as shown here:

--8<---------------cut here---------------start------------->8---
$ guix repl
GNU Guile 3.0.8
Copyright (C) 1995-2021 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guix-user)> ,use(gnu packages gcc)
scheme@(guix-user)> (package-properties gcc-6)
$1 = ((hidden? . #t) (gcc-libc . #f))
scheme@(guix-user)> (package-properties gcc-7)
$2 = ((compiler-cpu-architectures ("aarch64" "armv8-a" "armv8.1-a" "armv8.2-a" "armv8.3-a") ("armhf" "armv7" "armv7-a" "armv7-m" "armv7-r" "armv7e-m" "armv7ve" "armv8-a" "armv8-a+crc" "armv8.1-a" "armv8.1-a+crc" "armv8-m.base" "armv8-m.main" "armv8-m.main+dsp" "iwmmxt" "iwmmxt2") ("x86_64" "core2" "nehalem" "westmere" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "bonnell" "silvermont" "knl" "skylake-avx512" "k8" "k8-sse3" "barcelona" "bdver1" "bdver2" "bdver3" "bdver4" "znver1" "btver1" "btver2" "geode")))
scheme@(guix-user)>
--8<---------------cut here---------------end--------------->8---


Thanks, there is indeed a bug. ;-)


Back to the initial report, what could be improved is the display of the
field ’dependencies’; distinguishing regular packages to hidden ones.
And maybe instead of a plain error “package not found”, the command
“guix show” could error which “non installable package” or something
like that.


Cheers,
simon




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 16 Nov 2022 09:34:02 GMT) Full text and rfc822 format available.

Changed bug title to 'gcc <at> 7 and higher are not hidden packages' from 'how gcc-toolchain can depends a package who doesn't exists?' Request was from zimoun <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 16 Nov 2022 09:34:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#59278; Package guix. (Mon, 15 May 2023 17:59:01 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: bbb ee <blasforr <at> gmail.com>
Cc: 59278 <at> debbugs.gnu.org
Subject: Re: bug#59278: gcc <at> 7 and higher are not hidden packages
Date: Mon, 15 May 2023 19:55:27 +0200
Hi,

On Tue, 15 Nov 2022 at 00:53, bbb ee <blasforr <at> gmail.com> wrote:

> in version c81457a5883ea43950eb2ecdcbb58a5b144bcd11 of guix, gcc-toolchain depends gcc:
> ```
> $ DEFAULT_CHANNELS=/tmp/default_channels.scm
> $ echo "%default-channels" > $DEFAULT_CHANNELS
> # I force guix to use only %default-channels here
> $ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11  -C $DEFAULT_CHANNELS -- search gcc-toolchain
> guile: warning: failed to install locale
> name: gcc-toolchain
> version: 9.3.0
> outputs: out debug static
> systems: x86_64-linux i686-linux
> dependencies: binutils <at> 2.32 gcc <at> 9.3.0 glibc <at> 2.29 ld-wrapper <at> 0
> ```
>
> However, I can't find gcc package in this version of guix
> ```
> $ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11  -C $DEFAULT_CHANNELS -- search gcc
> # no found gcc
>
> # guix install failure message confirm that gcc doesn't exist in commit c81457
> $ guix time-machine --commit=c81457a5883ea43950eb2ecdcbb58a5b144bcd11 -C $DEFAULT_CHANNELS -- install gcc -p
> ~/opt/python-dev_3_7
> guile: warning: failed to install locale
> guix install: error: gcc: unknown package
> ```
>
> in commit c81457, how gcc-toolchain can depends a package who doesn't exists?

Aside a minor point about documenting ’hidden-packages’ although
’hidden?’ is mentioned in section “9.3 Defining Package Variants“ [1],
the main issue is fixed by e1bf3c6b5a06b6dbbe4f5a8692ea638a0ce43511.

Moreover, please note the section “8.4 The GCC toolchain” [2] in the
manual explaining the confusion.

Closing?

1: https://guix.gnu.org/manual/devel/en/guix.html#Defining-Package-Variants
2: https://guix.gnu.org/manual/devel/en/guix.html#The-GCC-toolchain

Cheers,
simon




This bug report was last modified 2 years and 31 days ago.

Previous Next


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