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

Bug 926233

Summary: kde-apps/dolphin-plugins-subversion-23.08.5: ODR violations when building with LTO
Product: Gentoo Linux Reporter: Erik Quaeghebeur <gentoo>
Component: Current packagesAssignee: Gentoo KDE team <kde>
Status: UNCONFIRMED ---    
Severity: normal CC: ab4bd, eschwartz93, gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=482524
https://invent.kde.org/sdk/dolphin-plugins/-/merge_requests/56
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    
Attachments: build log
output of emerge --info

Description Erik Quaeghebeur 2024-03-06 06:16:32 UTC
When compiling kde-apps/dolphin-plugins-subversion-25.08.5 with lto enabled and lto-problematic errors turned into warnings, I get the following:

```
/var/tmp/portage/kde-apps/dolphin-plugins-subversion-23.08.5/work/dolphin-plugins-23.08.5/svn/svncommitdialog.cpp:70:6: error: type ‘columns_t’ violates the C++ One Definition Rule [-Werror=odr]
   70 | enum columns_t {
      |      ^
/var/tmp/portage/kde-apps/dolphin-plugins-subversion-23.08.5/work/dolphin-plugins-23.08.5/svn/svnlogdialog.cpp:67:6: note: an enum with different value name is defined in another translation unit
   67 | enum columns_t {
      |      ^
/var/tmp/portage/kde-apps/dolphin-plugins-subversion-23.08.5/work/dolphin-plugins-23.08.5/svn/svncommitdialog.cpp:71:5: note: name ‘columnPath’ differs from name ‘columnRevision’ defined in another translation unit
   71 |     columnPath,
      |     ^
/var/tmp/portage/kde-apps/dolphin-plugins-subversion-23.08.5/work/dolphin-plugins-23.08.5/svn/svnlogdialog.cpp:68:5: note: mismatching definition
   68 |     columnRevision,
      |     ^
lto1: some warnings being treated as errors
lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-g++ returned 1 exit status
compilation terminated.
```

My lto-related make.conf lines are

```
WARNING_FLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
COMMON_FLAGS="-march=native -O2 -pipe -flto=auto ${WARNING_FLAGS}"
```

Disabling lto and the errors is a workaround, i.e., kde-apps/dolphin-plugins-subversion-23.08.5 compiles after that.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-06 06:17:39 UTC
Full build.log and emerge --info please. This also looks like an easy fix if you want to try send one upstream.
Comment 2 Erik Quaeghebeur 2024-03-06 08:30:17 UTC
Created attachment 886786 [details]
build log
Comment 3 Erik Quaeghebeur 2024-03-06 08:30:46 UTC
Created attachment 886787 [details]
output of emerge --info