Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 824846 - when using clang system-wide, dev-lang/perl needs to be recompiled with clang before its submodules
Summary: when using clang system-wide, dev-lang/perl needs to be recompiled with clang...
Status: RESOLVED DUPLICATE of bug 261375
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2021-11-19 12:26 UTC by Amit Ugol
Modified: 2021-11-19 12:29 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Ugol 2021-11-19 12:26:40 UTC
Switching to clang system-wide would lead sub-modules build by perl to try and be built with GCC which will fail because the LDFLAGS are incompatible:

while updating dev-perl/Socket6 and having clang set system-wide:
...
gcc: error: unrecognized command-line option ‘-rtlib=compiler-rt’

Rebuilding perl with clang fixes this, and it means that perl should somehow be aware that the compiler has changed.

Reproducible: Always

Steps to Reproduce:
1. change compiler to clang/clang++ as per the clang wiki.
2. make sure that perl is not reinstalled.
3. install/update a perl module (for instance dev-perl/Socket6)
Actual Results:  
perl module cannot be installed as it is using GCC as compiler as long as perl isn't rebuilt using clang

Expected Results:  
perl needs to be recompiled automatically when switching compilers.

Candidate for tagging in https://bugs.gentoo.org/408963
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-19 12:29:26 UTC
It's related to bug 408963, yeah, and we can block on it, but this is the same issue as "Perl calls CC directly" and other such bugs.

i.e. Perl is known to embed its environment at build-time and other modules then use that same calcified environment.

We can't really programmatically know when you've changed compiler For Good. You could just be changing it as a one-off, or for one package, or ...

It seems like the best we could really do here is update the Clang wiki page to mention it.

*** This bug has been marked as a duplicate of bug 261375 ***