Summary: | sys-devel/gcc-config: should install ${CTARGET}-cc symlinks (sys-devel/clang-toolchain-symlinks may cause unwanted clang use by picking CHOST-cc (was: net-misc/openssh-9.0_p1-r4 is picking clang over gcc 12.2)) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Mike Lothian <mike> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | base-system, ionen, llvm, mgorny, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=143205 https://bugs.gentoo.org/show_bug.cgi?id=870577 https://bugs.gentoo.org/show_bug.cgi?id=872548 https://bugs.gentoo.org/show_bug.cgi?id=563614 https://bugs.gentoo.org/show_bug.cgi?id=876901 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Build.log
config.log |
Description
Mike Lothian
2022-09-22 20:07:18 UTC
Created attachment 813721 [details]
Build.log
Created attachment 813724 [details]
config.log
If I manually set CC=gcc and CXX=g++ it compiles Can you run env-update && . /etc/profile and try again? configure:3036: checking for x86_64-pc-linux-gnu-cc configure:3057: found /usr/lib/llvm/15/bin/x86_64-pc-linux-gnu-cc Seems to be because the new sys-devel/clang-toolchain-symlinks provides a x86_64-pc-linux-gnu-cc symlink while gcc-config does not (and so isn't shadowed). Could argue it could be a gcc-config issue, but given we've been living without that symlink... Ah, thanks! I think we should probably make gcc-config provide it. (I've wanted it before but couldn't justify adding it.) This is probably a side effect of our super-stupid super-ancient policy that CC/CXX needs to be set unless the package just picks whatever default we had 22 years ago. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=1ff1ed38697ed3b376db5c5157fcec24df67aa91 commit 1ff1ed38697ed3b376db5c5157fcec24df67aa91 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-09-22 23:41:28 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-22 23:45:43 +0000 gcc-config: create ${CTARGET}-cc symlink We need this because configure scripts may look for ${CTARGET}-cc first, and while this wasn't a problem in the past, LLVM installs fallback symlinks in /usr/lib/llvm/${SLOT}/bin for the benefit of llvm-only profiles, and configure has started finding these rather than falling back to say, ${CTARGET}-gcc like it has been all this time. Bug: https://bugs.gentoo.org/870577 Bug: https://bugs.gentoo.org/872416 Signed-off-by: Sam James <sam@gentoo.org> gcc-config | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc6a27ec99c1e08ac51c69ff0ab4c2b8a5578e2e commit cc6a27ec99c1e08ac51c69ff0ab4c2b8a5578e2e Author: Sam James <sam@gentoo.org> AuthorDate: 2022-09-22 23:46:57 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-22 23:47:27 +0000 sys-devel/gcc-config: add 2.6 Creates ${CTARGET}-cc symlink. We need this because configure scripts may look for ${CTARGET}-cc first, and while this wasn't a problem in the past, LLVM installs fallback symlinks in /usr/lib/llvm/${SLOT}/bin for the benefit of llvm-only profiles, and configure has started finding these rather than falling back to say, ${CTARGET}-gcc like it has been all this time. Bug: https://bugs.gentoo.org/870577 Bug: https://bugs.gentoo.org/872416 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc-config/Manifest | 1 + sys-devel/gcc-config/gcc-config-2.6.ebuild | 60 +++++++++++++++++++++++++++++ sys-devel/gcc-config/gcc-config-9999.ebuild | 6 +-- 3 files changed, 64 insertions(+), 3 deletions(-) Let's call this in progress until we push new GCCs to ~arch which will make gcc-config run, I guess. (In reply to Sam James from comment #11) > Let's call this in progress until we push new GCCs to ~arch which will make > gcc-config run, I guess. ftr it seems to run it in postinst when gcc-config is updated, I can rm the -cc link and emerge -1 gcc-config and a new one pops up The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=961f11b11a0022c5a4a4a34cc4065d13a48906ba commit 961f11b11a0022c5a4a4a34cc4065d13a48906ba Author: Sam James <sam@gentoo.org> AuthorDate: 2022-09-23 23:01:10 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-23 23:01:49 +0000 net-misc/openssh: block older gcc-config w/o ${CTARGET}-cc >=sys-devel/gcc-config-2.6 will create ${CTARGET}-cc which avoids clang-toolchain-symlinks providing it even on systems with GCC. See cc6a27ec99c1e08ac51c69ff0ab4c2b8a5578e2e for the details but abuse a blocker given it can lead to runtime problems with say, OpenSSH. Bug: https://bugs.gentoo.org/872416 Bug: https://bugs.gentoo.org/872548 See: cc6a27ec99c1e08ac51c69ff0ab4c2b8a5578e2e Signed-off-by: Sam James <sam@gentoo.org> .../openssh/{openssh-9.0_p1-r4.ebuild => openssh-9.0_p1-r5.ebuild} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91b1e01095b7af1b517bc45f94c0c32de9bf9f86 commit 91b1e01095b7af1b517bc45f94c0c32de9bf9f86 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-09-23 22:55:16 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-23 23:01:45 +0000 sys-devel/clang-toolchain-symlinks: block older gcc-config w/o ${CTARGET}-cc >=sys-devel/gcc-config-2.6 will create ${CTARGET}-cc which avoids clang-toolchain-symlinks providing it even on systems with GCC. See cc6a27ec99c1e08ac51c69ff0ab4c2b8a5578e2e for the details but abuse a blocker given it can lead to runtime problems with say, OpenSSH. Bug: https://bugs.gentoo.org/872416 Bug: https://bugs.gentoo.org/872548 See: cc6a27ec99c1e08ac51c69ff0ab4c2b8a5578e2e Signed-off-by: Sam James <sam@gentoo.org> ...olchain-symlinks-14.ebuild => clang-toolchain-symlinks-14-r1.ebuild} | 2 ++ ...olchain-symlinks-15.ebuild => clang-toolchain-symlinks-15-r1.ebuild} | 2 ++ ...olchain-symlinks-16.ebuild => clang-toolchain-symlinks-16-r1.ebuild} | 2 ++ 3 files changed, 6 insertions(+) (In reply to Ionen Wolkens from comment #12) > (In reply to Sam James from comment #11) > > Let's call this in progress until we push new GCCs to ~arch which will make > > gcc-config run, I guess. > ftr it seems to run it in postinst when gcc-config is updated, I can rm the > -cc link and emerge -1 gcc-config and a new one pops up Ah, thanks, I was a bit unsure of myself because of the magic in toolchain.eclass but all looks well. (espc. as blockers now enforce non-breakage) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3194d18b9e7a583b3dc764bd1fdceada10417859 commit 3194d18b9e7a583b3dc764bd1fdceada10417859 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-09-23 23:15:07 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-23 23:17:07 +0000 net-misc/openssh: depend on newer gcc-config or clang-toolchain-symlinks Made the classic mistake I always moan about! Blockers don't affect dependency resolution, although they do mean "eventual consistency" in that it ensures you do upgrade by the end of the run. Let's be safe given we're talking miscompilation here (i.e. runtime failure) and depend on newer gcc-config (or newer clang-toolchain-symlinks) in openssh to make sure the merge order is correct. Bug: https://bugs.gentoo.org/872416 Bug: https://bugs.gentoo.org/872548 See: cc6a27ec99c1e08ac51c69ff0ab4c2b8a5578e2e Fixes: 961f11b11a0022c5a4a4a34cc4065d13a48906ba Signed-off-by: Sam James <sam@gentoo.org> .../{openssh-9.0_p1-r5.ebuild => openssh-9.0_p1-r6.ebuild} | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9930542f8c659d729750b6abf2bfb81dcab40cee commit 9930542f8c659d729750b6abf2bfb81dcab40cee Author: Sam James <sam@gentoo.org> AuthorDate: 2024-02-19 06:17:02 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-02-19 06:17:11 +0000 net-misc/openssh: drop old gcc-config workaround This shouldn't be needed anymore since 0b22d07f89b16ac3400e45077702ac4c4492e5a4 anyway. Bug: https://bugs.gentoo.org/872416 Signed-off-by: Sam James <sam@gentoo.org> net-misc/openssh/openssh-9.6_p1-r3.ebuild | 7 ------- 1 file changed, 7 deletions(-) |