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

Bug 601504

Summary: =app-office/libreoffice-5.2.3.3-r1 won't build with clang
Product: Gentoo Linux Reporter: Lori <lori>
Component: Current packagesAssignee: Gentoo Office Team <office>
Status: RESOLVED FIXED    
Severity: normal CC: jstein, kingjon3377
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 408963    

Description Lori 2016-12-03 10:16:05 UTC
* Compilation with gcc older than 4.7 is not supported
 * ERROR: app-office/libreoffice-5.2.3.3-r1::gentoo failed (pretend phase):
 *   Too old gcc found.
 * 
 * Call stack:
 *                       ebuild.sh, line 115:  Called pkg_pretend
 *   libreoffice-5.2.3.3-r1.ebuild, line 267:  Called die
 * The specific snippet of code:
 *                      die "Too old gcc found."

While I see this snippet in the ebuild:

        if ! $(tc-is-clang) && [[ $(gcc-major-version) -lt 4 ]] || {
                [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]]; } then
            eerror "Compilation with gcc older than 4.7 is not supported"
            die "Too old gcc found."
        fi

The part checking for the compiler not being Clang doesn't seem to work for some reason.
Comment 1 eroen 2016-12-03 10:43:23 UTC
The statement in the ebuild is incorrect.

eroen@occam ~ $ false && false || true; echo $?
0

The line

        if ! $(tc-is-clang) && [[ $(gcc-major-version) -lt 4 ]] || {

should probably have been

        if ! $(tc-is-clang) && { [[ $(gcc-major-version) -lt 4 ]] ||
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2016-12-19 22:09:19 UTC
Fixed from 5.2.4 on. Thanks.
Comment 3 Andreas Sturmlechner gentoo-dev 2017-01-31 20:46:55 UTC
*** Bug 607250 has been marked as a duplicate of this bug. ***