Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903889 - app-office/libreoffice fails to build with USE=clang and CFLAGS="-Werror=lto-type-mismatch"
Summary: app-office/libreoffice fails to build with USE=clang and CFLAGS="-Werror=lto-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-05 20:04 UTC by Rick Farina (Zero_Chaos)
Modified: 2023-04-06 01:03 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,19.05 KB, text/x-log)
2023-04-05 20:05 UTC, Rick Farina (Zero_Chaos)
Details
config.log (config.log,134.50 KB, text/x-log)
2023-04-05 20:06 UTC, Rick Farina (Zero_Chaos)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Farina (Zero_Chaos) gentoo-dev 2023-04-05 20:04:44 UTC
I added CFLAGS="-Werror=lto-type-mismatch" a few weeks ago to start helping with all the lto bugs being cut by tinderbox https://www.mail-archive.com/gentoo-dev@lists.gentoo.org/msg95328.html

I suspect I have rebuilt the majority of my system by now, and not hit any other failures related to this CFLAG.  CLANG doesn't support -Werror=lto-type-mismatch which results in an ugly warning:
unknown warning option '-Werror=lto-type-mismatch'; did you mean '-Werror=selector-type-mismatch'? [-Werror,-Wunknown-warning-option]

Unfortunately libreoffice's configure script passes -Werror and causes that warning to be a failure.  Possible solutions include filtering the unneeded/unused cflag when USE=clang, or simply patching configure to remove the quite dangerous -Werror
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2023-04-05 20:05:50 UTC
Created attachment 859587 [details]
build.log
Comment 2 Rick Farina (Zero_Chaos) gentoo-dev 2023-04-05 20:06:03 UTC
Created attachment 859588 [details]
config.log
Comment 3 Larry the Git Cow gentoo-dev 2023-04-06 01:03:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efa5d29f7b4c6686f19a181e0a05cd6f790f237b

commit efa5d29f7b4c6686f19a181e0a05cd6f790f237b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-06 01:02:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-06 01:02:20 +0000

    app-office/libreoffice: filter out -Wlto-type-mismatch for USE=clang
    
    Clang doesn't implement this yet.
    
    Closes: https://bugs.gentoo.org/903889
    Signed-off-by: Sam James <sam@gentoo.org>

 app-office/libreoffice/libreoffice-7.3.7.2.ebuild  | 3 +++
 app-office/libreoffice/libreoffice-7.4.4.2.ebuild  | 3 +++
 app-office/libreoffice/libreoffice-7.4.6.2.ebuild  | 3 +++
 app-office/libreoffice/libreoffice-7.4.9999.ebuild | 3 +++
 app-office/libreoffice/libreoffice-7.5.2.2.ebuild  | 3 +++
 app-office/libreoffice/libreoffice-7.5.9999.ebuild | 3 +++
 app-office/libreoffice/libreoffice-9999.ebuild     | 3 +++
 7 files changed, 21 insertions(+)