Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 427298

Summary: sys-apps/which fails to build with clang-3.1-r4
Product: Gentoo Linux Reporter: Fabio Scaccabarozzi <fsvm88>
Component: Current packagesAssignee: Bernard Cafarelli <voyageur>
Status: RESOLVED FIXED    
Severity: normal CC: mgorny, ryao
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 408963    
Attachments: emerge fail log

Description Fabio Scaccabarozzi 2012-07-20 12:10:26 UTC
Created attachment 318706 [details]
emerge fail log

sys-apps/which fails to build with clang-3.1-r4, both versions (2.19,2.20), with the same error. Attached is the build log.
Comment 1 Fabio Scaccabarozzi 2012-07-21 12:34:26 UTC
update: both versions build and pass tests with GCC 4.6.3
Comment 2 Fabio Scaccabarozzi 2012-10-08 13:56:14 UTC
This bug can be temporarily worked around by passing --disable-dependency-tracking option to configure. With GCC the configure check evaluates as "pch", whereas with clang evaluates as "none". This makes the compile step fail.
The workaround forces configure to skip the check/set it to "none" a priori, possibly updating the environment accordingly and making the build succeed with both gcc and clang. Both versions available build fine with the workaround.

I think the correct approach would be to fix the scripts to work properly, meanwhile a conditional for clang in the ebuild would do fine. AFAIK though, dependency tracking is used for incremental (re)compilation of large projects, disabling it entirely for such a small thing as sys-apps/which won't do any harm IMO.
Comment 3 Bernard Cafarelli gentoo-dev 2012-12-18 14:26:23 UTC
Incoming clang 3.2 will work fine (tested with rc3):
checking dependency style of clang... pch

and it compiles/works fine :)