Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917095 - media-sound/ardour-7.5-r3 fails to compile (lto): file_archive.h:35:18: error: type ‘struct FileArchive’ violates the C++ One Definition Rule [-Werror=odr]
Summary: media-sound/ardour-7.5-r3 fails to compile (lto): file_archive.h:35:18: error...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Professional Audio Applications Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2023-11-09 22:23 UTC by ppw0
Modified: 2024-02-29 00:51 UTC (History)
0 users

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


Attachments
build log (media-sound:ardour-7.5-r3:20231109-220215.log,430.51 KB, text/x-log)
2023-11-09 22:23 UTC, ppw0
Details
emerge --info (emerge_info.log,7.69 KB, text/x-log)
2023-11-09 22:24 UTC, ppw0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ppw0 2023-11-09 22:23:45 UTC
Created attachment 874391 [details]
build log

In a stricter lto environment, media-sound/ardour-7.5-r3 will fail to compile with the following errors:

```
../libs/pbd/pbd/file_archive.h:35:18: error: type ‘struct FileArchive’ violates the C++ One Definition Rule [-Werror=odr]
   35 | class LIBPBD_API FileArchive
      |                  ^
../libs/pbd/pbd/file_archive.h:35:18: note: a different type is defined in another translation unit
   35 | class LIBPBD_API FileArchive
      |                  ^
../libs/pbd/pbd/file_archive.h:167:39: note: the first difference of corresponding definitions is field ‘_current_entry’
  167 |                 struct archive_entry* _current_entry;
      |                                       ^
../libs/pbd/pbd/file_archive.h:167:39: note: a field of same name but different type is defined in another translation unit
  167 |                 struct archive_entry* _current_entry;
      |                                       ^
/usr/include/archive.h:186:8: note: type name ‘archive_entry’ should match type name ‘PBD::archive_entry’
  186 | struct archive_entry;
      |        ^
../libs/pbd/pbd/file_archive.h:167:24: note: the incompatible type is defined here
  167 |                 struct archive_entry* _current_entry;
      |                        ^
lto1: some warnings being treated as errors
lto-wrapper: fatal error: 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

Waf: Leaving directory `/var/tmp/portage/media-sound/ardour-7.5-r3/work/Ardour-7.5.0/build'
Build failed
```

Attaching logs.
Comment 1 ppw0 2023-11-09 22:24:41 UTC
Created attachment 874392 [details]
emerge --info
Comment 2 Larry the Git Cow gentoo-dev 2024-02-29 00:51:38 UTC
The bug has been closed via the following commit(s):

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

commit 38655534205d0c3d6ffe696d134c88afb6e01603
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-02-29 00:46:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-29 00:51:16 +0000

    media-sound/ardour: mark as LTO-unsafe
    
    See https://tracker.ardour.org/view.php?id=9649 for details.
    
    Closes: https://bugs.gentoo.org/917095
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-sound/ardour/ardour-8.4.ebuild  | 5 +++++
 media-sound/ardour/ardour-9999.ebuild | 5 +++++
 2 files changed, 10 insertions(+)