Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934124 - toolchain.eclass fails tests
Summary: toolchain.eclass fails tests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-12 07:50 UTC by Ulrich Müller
Modified: 2024-09-18 15:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
stderr output of bash -x toolchain.sh (toolchain.sh.log,8.53 KB, text/plain)
2024-06-12 07:51 UTC, Ulrich Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2024-06-12 07:50:41 UTC
eclass/tests $ ./toolchain.sh
die: PYTHON_COMPAT not declared.
Comment 1 Ulrich Müller gentoo-dev 2024-06-12 07:51:50 UTC
Created attachment 895683 [details]
stderr output of bash -x toolchain.sh
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-18 15:38:32 UTC
The real issue is that the test support added in 1d93a491096f1cc0234fcf44458bfec142c213bb introduces a timebomb to all GCC ebuilds.

I think we should switch to making it opt-in. There's ebuilds like kgcc64 and gnat-gpl where I don't think we even really expect it to work.
Comment 3 Petr Vaněk gentoo-dev 2024-09-18 15:50:30 UTC
For clarification, commit 1d93a491096f ("toolchain.eclass: rework tests more") is the one which introduced this issue.
Comment 4 Larry the Git Cow gentoo-dev 2024-09-18 15:51:29 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1d2664699735d73a7886b335ecd0a6aab381eae

commit e1d2664699735d73a7886b335ecd0a6aab381eae
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-18 15:48:38 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-18 15:49:28 +0000

    dev-lang/gnat-gpl: update Manifest to drop validate_failures.py
    
    We've not tested it here at all so don't set TOOLCHAIN_HAS_TESTS.
    
    Bug: https://bugs.gentoo.org/934124
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/gnat-gpl/Manifest | 1 -
 1 file changed, 1 deletion(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2377bcb44c2a4738dda2d2c7527b3010c4debf67

commit 2377bcb44c2a4738dda2d2c7527b3010c4debf67
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-18 15:48:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-18 15:49:27 +0000

    sys-devel/kgcc64: update Manifest to drop validate_failures.py
    
    We've not tested it here at all so don't set TOOLCHAIN_HAS_TESTS.
    
    Bug: https://bugs.gentoo.org/934124
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/kgcc64/Manifest | 1 -
 1 file changed, 1 deletion(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=859926cc5a9c1b9deb0a017ef56527af43c369d5

commit 859926cc5a9c1b9deb0a017ef56527af43c369d5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-18 15:47:17 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-18 15:49:27 +0000

    sys-devel/gcc: set TOOLCHAIN_HAS_TESTS everywhere
    
    I'm going to drop it for some earlier versions we've not tested
    in a minute though, but this brings us back to the status quo.
    
    Bug: https://bugs.gentoo.org/934124
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/gcc-10.5.0.ebuild              | 1 +
 sys-devel/gcc/gcc-11.4.1_p20240501.ebuild    | 1 +
 sys-devel/gcc/gcc-11.5.0.ebuild              | 1 +
 sys-devel/gcc/gcc-12.3.1_p20240209.ebuild    | 1 +
 sys-devel/gcc/gcc-12.4.0.ebuild              | 1 +
 sys-devel/gcc/gcc-12.4.1_p20240829.ebuild    | 1 +
 sys-devel/gcc/gcc-12.4.1_p20240905.ebuild    | 1 +
 sys-devel/gcc/gcc-12.4.1_p20240912.ebuild    | 1 +
 sys-devel/gcc/gcc-12.5.9999.ebuild           | 1 +
 sys-devel/gcc/gcc-13.2.0.ebuild              | 1 +
 sys-devel/gcc/gcc-13.2.1_p20240210.ebuild    | 1 +
 sys-devel/gcc/gcc-13.3.1_p20240614.ebuild    | 1 +
 sys-devel/gcc/gcc-13.3.1_p20240830.ebuild    | 1 +
 sys-devel/gcc/gcc-13.3.1_p20240906.ebuild    | 1 +
 sys-devel/gcc/gcc-13.3.1_p20240913.ebuild    | 1 +
 sys-devel/gcc/gcc-13.4.9999.ebuild           | 1 +
 sys-devel/gcc/gcc-14.2.0.ebuild              | 1 +
 sys-devel/gcc/gcc-14.2.1_p20240817-r1.ebuild | 1 +
 sys-devel/gcc/gcc-14.2.1_p20240817.ebuild    | 1 +
 sys-devel/gcc/gcc-14.2.1_p20240831.ebuild    | 1 +
 sys-devel/gcc/gcc-14.2.1_p20240907.ebuild    | 1 +
 sys-devel/gcc/gcc-14.2.1_p20240914.ebuild    | 1 +
 sys-devel/gcc/gcc-14.3.9999.ebuild           | 1 +
 sys-devel/gcc/gcc-15.0.0_pre20240825.ebuild  | 1 +
 sys-devel/gcc/gcc-15.0.0_pre20240901.ebuild  | 1 +
 sys-devel/gcc/gcc-15.0.0_pre20240908.ebuild  | 1 +
 sys-devel/gcc/gcc-15.0.0_pre20240915.ebuild  | 1 +
 sys-devel/gcc/gcc-15.0.9999.ebuild           | 1 +
 sys-devel/gcc/gcc-8.5.0-r1.ebuild            | 1 +
 sys-devel/gcc/gcc-9.5.0.ebuild               | 1 +
 30 files changed, 30 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9971cf188e6578ebdd68af6785a59ab5615abbf

commit e9971cf188e6578ebdd68af6785a59ab5615abbf
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-18 15:42:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-18 15:49:26 +0000

    toolchain.eclass: make tests opt-in per-ebuild
    
    In 1d93a491096f1cc0234fcf44458bfec142c213bb, we kind of introduced a
    timebomb to all GCC ebuilds.
    
    Switch to making it opt-in by setting TOOLCHAIN_HAS_TESTS in ebuilds
    which want to use validate_failures.py. It hasn't been tested and may
    not even work with gnat-gpl and kgcc64 so it doesn't make sense
    to have it by default, especially for gnat-gpl which is now just
    a bootstrap package anyway.
    
    Bug: https://bugs.gentoo.org/934124
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/toolchain.eclass | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-18 15:52:38 UTC
(In reply to Sam James from comment #2)
> The real issue is that the test support added in
> 1d93a491096f1cc0234fcf44458bfec142c213bb introduces a timebomb to all GCC
> ebuilds.
> 
> I think we should switch to making it opt-in. There's ebuilds like kgcc64
> and gnat-gpl where I don't think we even really expect it to work.

Another reason to do this is not having to juggle validate_failures.py versions which are tested with older _and_ newer GCC and worrying about args we pass to them in the eclass.
Comment 6 Larry the Git Cow gentoo-dev 2024-09-18 15:55:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d6798f737c26ee32ad2e82f4fd992aa5e6f914b

commit 6d6798f737c26ee32ad2e82f4fd992aa5e6f914b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-18 15:54:22 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-18 15:54:22 +0000

    dev-lang/gnat-gpl: cleanup PYTHON_COMPAT debris
    
    We don't opt-in to tests here.
    
    Bug: https://bugs.gentoo.org/934124
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/gnat-gpl/gnat-gpl-2021-r5.ebuild | 1 -
 1 file changed, 1 deletion(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7cc834907ba332e115b56ea1b821b5305e3fcbb

commit b7cc834907ba332e115b56ea1b821b5305e3fcbb
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-18 15:54:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-18 15:54:00 +0000

    sys-devel/kgcc64: cleanup PYTHON_COMPAT debris
    
    We don't opt-in to tests here.
    
    Bug: https://bugs.gentoo.org/934124
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/kgcc64/kgcc64-10.5.0.ebuild           | 1 -
 sys-devel/kgcc64/kgcc64-11.4.1_p20240501.ebuild | 1 -
 sys-devel/kgcc64/kgcc64-11.5.0.ebuild           | 1 -
 sys-devel/kgcc64/kgcc64-12.3.1_p20240502.ebuild | 1 -
 sys-devel/kgcc64/kgcc64-12.4.0.ebuild           | 1 -
 sys-devel/kgcc64/kgcc64-13.2.1_p20240503.ebuild | 1 -
 sys-devel/kgcc64/kgcc64-13.3.1_p20240614.ebuild | 1 -
 sys-devel/kgcc64/kgcc64-14.1.1_p20240511.ebuild | 1 -
 sys-devel/kgcc64/kgcc64-14.2.1_p20240817.ebuild | 1 -
 9 files changed, 9 deletions(-)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-18 15:55:52 UTC
```
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f3bfeac6adc6b4e9db50b1204c1a398523c55b1

commit 3f3bfeac6adc6b4e9db50b1204c1a398523c55b1
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-18 15:49:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-18 15:49:34 +0000

    Revert "eclass/tests/toolchain.sh: declare PYTHON_COMPAT"
    
    This reverts commit 992fc2954c2281285bc50156ba12d310a1b434e1.
    
    This should no longer be necessary now that tests are opt-in
    with TOOLCHAIN_HAS_TESTS.
    
    Bug: https://bugs.gentoo.org/859157
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/tests/toolchain.sh | 2 --
 1 file changed, 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=992fc2954c2281285bc50156ba12d310a1b434e1

commit 992fc2954c2281285bc50156ba12d310a1b434e1
Author:     Petr Vaněk <arkamar@gentoo.org>
AuthorDate: 2024-09-18 11:30:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-18 15:49:09 +0000

    eclass/tests/toolchain.sh: declare PYTHON_COMPAT
    
    toolchain.sh test script requires PYTHON_COMPAT array since commit
    1d93a491096f ("toolchain.eclass: rework tests more") otherwise it dies
    with
    
     die: PYTHON_COMPAT not declared.
    
    error.
    
    Bug: https://bugs.gentoo.org/859157
    Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/tests/toolchain.sh | 2 ++
 1 file changed, 2 insertions(+)
```

(I tagged the wrong bug.)