Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2088672

Summary: clang-tidy does not pick up libstdc++ from gcc-toolset [rhel-8.6.0.z]
Product: Red Hat Enterprise Linux 8 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: llvm-toolsetAssignee: Tom Stellard <tstellar>
Status: CLOSED ERRATA QA Contact: Jesus Checa <jchecahi>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.5CC: jchecahi, mprchlik, sipoyare, sweemer
Target Milestone: rcKeywords: Bugfix, Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: clang-13.0.1-2.module+el8.6.0+15487+86bd2a95 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2083948 Environment:
Last Closed: 2022-06-28 15:17:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2064507, 2083948    
Bug Blocks:    

Comment 1 Jesus Checa 2022-06-08 08:59:53 UTC
Tested with module build llvm-toolset-rhel8-8060020220527164039.ad008a3a, and clang build clang-13.0.1-2.module+el8.6.0+15487+86bd2a95.

Now gcc-toolset-11 is used in all archs. ppc64le output used as example:
===
# clang -v
clang version 13.0.1 (Red Hat 13.0.1-2.module+el8.6.0+15487+86bd2a95)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /opt/rh/gcc-toolset-11/root/usr/lib/gcc/ppc64le-redhat-linux/11
Selected GCC installation: /opt/rh/gcc-toolset-11/root/usr/lib/gcc/ppc64le-redhat-linux/11
Candidate multilib: .;@m64
Selected multilib: .;@m64
===

No regressions introduced.

Comment 5 Jonathan Sweemer 2022-06-13 22:53:15 UTC
Hi Jesus, I just have a couple of questions to check my understanding of this bugfix.

1) Does the fix still require me to run `source /opt/rh/gcc-toolset-11/enable` in the same session before clang-tidy will find the GCC installation in /opt/rh/gcc-toolset-11?

2) Once gcc-toolset-12 is released, then will this fix seamlessly find the GCC installation in /opt/rh/gcc-toolset-12 as well, or will a separate fix be required at that time?

Comment 6 Jesus Checa 2022-06-14 11:44:12 UTC
Hi Jonathan,

1) You don't need to source the scl environment, clang will be able to find gcc-toolset-11's libstdc++ without sourcing it. This can be checked by running `clang -v` like is done in comment 1.

2) Not exactly. clang-13 will keep using gcc-toolset-11. gcc-toolset-12 will be used by clang-14, though. They are supposed to be released in a future RHEL minor release.

Let me know if this answers your questions.

Comment 7 Jonathan Sweemer 2022-06-14 11:47:52 UTC
Thanks Jesus, that answers my questions for now!

Comment 11 errata-xmlrpc 2022-06-28 15:17:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (llvm-toolset:rhel8 bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:5340