Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915469 - media-gfx/exiv2-0.28.0 fails to compile (lto): minoltamn_int.cpp:1653:18: error: type ‘struct LensIdFct’ violates the C++ One Definition Rule [-Werror=odr]
Summary: media-gfx/exiv2-0.28.0 fails to compile (lto): minoltamn_int.cpp:1653:18: err...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard: fixed in 0.28.1
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2023-10-09 10:38 UTC by ppw0
Modified: 2023-11-14 20:17 UTC (History)
0 users

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


Attachments
build log (media-gfx:exiv2-0.28.0:20231009-102513.log,94.74 KB, text/x-log)
2023-10-09 10:38 UTC, ppw0
Details
emerge --info (emerge_info.log,7.38 KB, text/x-log)
2023-10-09 10:39 UTC, ppw0
Details
build log (0.28.1) (media-gfx:exiv2-0.28.1:20231114-103309.log,96.69 KB, text/x-log)
2023-11-14 10:36 UTC, ppw0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ppw0 2023-10-09 10:38:03 UTC
Created attachment 872370 [details]
build log

In a stricter lto environment, media-gfx/exiv2-0.28.0 will fail to compile with the following error message:
```
/var/tmp/portage/media-gfx/exiv2-0.28.0/work/exiv2-0.28.0/src/minoltamn_int.cpp:1653:18: error: type ‘struct LensIdFct’ violates the C++ One Definition Rule [-Werror=odr]
 1653 | constexpr struct LensIdFct {
      |                  ^
/var/tmp/portage/media-gfx/exiv2-0.28.0/work/exiv2-0.28.0/src/pentaxmn_int.cpp:1234:8: note: a different type is defined in another translation unit
 1234 | struct LensIdFct {
      |        ^
/var/tmp/portage/media-gfx/exiv2-0.28.0/work/exiv2-0.28.0/src/minoltamn_int.cpp:1654:12: note: the first difference of corresponding definitions is field ‘idx’
 1654 |   uint32_t idx;
      |            ^
/var/tmp/portage/media-gfx/exiv2-0.28.0/work/exiv2-0.28.0/src/pentaxmn_int.cpp:1235:8: note: a field with different name is defined in another translation unit
 1235 |   long id_;       //!< Lens id
      |        ^
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.
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
```

Attaching logs.
Comment 1 ppw0 2023-10-09 10:39:01 UTC
Created attachment 872371 [details]
emerge --info
Comment 2 Andreas Sturmlechner gentoo-dev 2023-11-13 22:13:25 UTC
what about 0.28.1?
Comment 3 ppw0 2023-11-14 10:36:35 UTC
Created attachment 874726 [details]
build log (0.28.1)

0.28.1 looks ok.
Comment 4 Andreas Sturmlechner gentoo-dev 2023-11-14 20:17:47 UTC
great, then this bug can be closed.