Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926233 - kde-apps/dolphin-plugins-subversion-23.08.5: ODR violations when building with LTO
Summary: kde-apps/dolphin-plugins-subversion-23.08.5: ODR violations when building wit...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2024-03-06 06:16 UTC by Erik Quaeghebeur
Modified: 2024-03-11 04:48 UTC (History)
2 users (show)

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


Attachments
build log (dolphin-plugins-subversion-23.08.5:20240305-215511.log,42.15 KB, text/x-log)
2024-03-06 08:30 UTC, Erik Quaeghebeur
Details
output of emerge --info (emerge--info.txt,8.02 KB, text/plain)
2024-03-06 08:30 UTC, Erik Quaeghebeur
Details

Note You need to log in before you can comment on or make changes to this bug.
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