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

Bug 866896

Summary: net-libs/webkit-gtk-2.36.7 fails to compile (lto): [-Werror=odr]
Product: Gentoo Linux Reporter: Kostadin Shishmanov <kocelfc>
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=915230
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    
Attachments: build.log compressed with xz
emerge --info

Description Kostadin Shishmanov 2022-08-27 07:10:10 UTC
Created attachment 801328 [details]
build.log compressed with xz

net-libs/webkit-gtk-2.36.7 fails to compile with CFLAGS=-flto=auto -Werror=lto-type-mismatch -Werror=odr -Werror=strict-aliasing
Comment 1 Kostadin Shishmanov 2022-08-27 07:10:47 UTC
Created attachment 801331 [details]
emerge --info
Comment 2 Matt Turner gentoo-dev 2022-08-31 19:29:25 UTC
The webkit-gtk project uses -Wno-odr intentionally:

> -- Performing Test CXX_COMPILER_SUPPORTS_-Wno-odr
> -- Performing Test CXX_COMPILER_SUPPORTS_-Wno-odr - Success

so building with -Werror=odr is not going to work.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-19 15:42:39 UTC
(In reply to Matt Turner from comment #2)
> The webkit-gtk project uses -Wno-odr intentionally:
> 
> > -- Performing Test CXX_COMPILER_SUPPORTS_-Wno-odr
> > -- Performing Test CXX_COMPILER_SUPPORTS_-Wno-odr - Success
> 
> so building with -Werror=odr is not going to work.

Then webkit-gtk should be filtering LTO as it's clearly unsafe.
Comment 4 Larry the Git Cow gentoo-dev 2024-01-05 12:37:03 UTC
The bug has been closed via the following commit(s):

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

commit 21109fa861f07a6ae06cfbed1ef2c721bfae9afd
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-05 12:35:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-05 12:35:53 +0000

    net-libs/webkit-gtk: filter LTO
    
    ODR violations thanks to Bison. Fortunately, upstream are open to fixing it,
    it just needs a hack like GDB did, or could even maybe just do --name-prefix
    or something if Bison-only is OK.
    
    Closes: https://bugs.gentoo.org/866896
    Closes: https://bugs.gentoo.org/915230
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/webkit-gtk/webkit-gtk-2.42.3-r410.ebuild | 5 ++++-
 net-libs/webkit-gtk/webkit-gtk-2.42.3-r600.ebuild | 5 ++++-
 net-libs/webkit-gtk/webkit-gtk-2.42.3.ebuild      | 5 ++++-
 net-libs/webkit-gtk/webkit-gtk-2.42.4-r410.ebuild | 3 +++
 net-libs/webkit-gtk/webkit-gtk-2.42.4-r600.ebuild | 3 +++
 net-libs/webkit-gtk/webkit-gtk-2.42.4.ebuild      | 3 +++
 6 files changed, 21 insertions(+), 3 deletions(-)