Summary: | media-sound/tenacity-1.3.2::xwing fails to compile (lto): ffmpeg-3.4.8-single-header.h:2680:16: error: type ‘struct AVCodecContext’ violates the C++ One Definition Rule [-Werror=odr] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ppw0 |
Component: | Overlays | Assignee: | Guillaume Castagnino <casta> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | jstein |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build log
emerge --info |
Created attachment 874468 [details]
emerge --info
Hello, Honestly, I do not know what to do with this. You have enable CFLAGS that clash with the upstream multi ffmpeg version compatibility layer here: https://codeberg.org/tenacityteam/tenacity/src/branch/main/libraries/lib-ffmpeg-support/impl Do you agree if I say it’s purely an upstream issue? It's an issue inherited from Audacity (bug 915226). I still think it'd be worthwhile to notify the Tenacity project maintainer that this is a real issue that could prevent having a stable LTO Tenacity binary (and maybe give the project another opportunity to differentiate itself from its predecessor). |
Created attachment 874467 [details] build log In a stricter lto environment, media-sound/tenacity-1.3.2 will fail to compile with the following errors: ``` /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/57/../../ffmpeg-3.4.8-single-header.h:2680:16: error: type ‘struct AVCodecContext’ violates the C++ One Definition Rule [-Werror=odr] 2680 | typedef struct AVCodecContext { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/58/../../ffmpeg-4.2.4-single-header.h:2757:16: note: a different type is defined in another translation unit 2757 | typedef struct AVCodecContext { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/57/../../ffmpeg-3.4.8-single-header.h:2689:22: note: the first difference of corresponding definitions is field ‘codec_name’ 2689 | char codec_name[32]; | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/58/../../ffmpeg-4.2.4-single-header.h:2764:24: note: a field with different name is defined in another translation unit 2764 | enum AVCodecID codec_id; | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/57/../../ffmpeg-3.4.8-single-header.h:3382:16: error: type ‘struct AVCodec’ violates the C++ One Definition Rule [-Werror=odr] 3382 | typedef struct AVCodec { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/58/../../ffmpeg-4.2.4-single-header.h:3442:16: note: a different type is defined in another translation unit 3442 | typedef struct AVCodec { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/57/../../ffmpeg-3.4.8-single-header.h:3400:9: note: the first difference of corresponding definitions is field ‘priv_data_size’ 3400 | int priv_data_size; | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/58/../../ffmpeg-4.2.4-single-header.h:3460:17: note: a field with different name is defined in another translation unit 3460 | const char *wrapper_name; | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/57/../../ffmpeg-3.4.8-single-header.h:4780:16: error: type ‘struct AVFormatContext’ violates the C++ One Definition Rule [-Werror=odr] 4780 | typedef struct AVFormatContext { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/58/../../ffmpeg-4.2.4-single-header.h:4838:16: note: a different type is defined in another translation unit 4838 | typedef struct AVFormatContext { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/57/../../ffmpeg-3.4.8-single-header.h:4800:13: note: the first difference of corresponding definitions is field ‘start_time’ 4800 | int64_t start_time; | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/58/../../ffmpeg-4.2.4-single-header.h:4859:11: note: a field with different name is defined in another translation unit 4859 | char *url; | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/57/../../ffmpeg-3.4.8-single-header.h:4498:16: error: type ‘struct AVInputFormat’ violates the C++ One Definition Rule [-Werror=odr] 4498 | typedef struct AVInputFormat { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/58/../../ffmpeg-4.2.4-single-header.h:4544:16: note: a different type is defined in another translation unit 4544 | typedef struct AVInputFormat { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/57/../../ffmpeg-3.4.8-single-header.h:4520:11: note: the first difference of corresponding definitions is field ‘read_probe’ 4520 | int (*read_probe)(AVProbeData *); | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/58/../../ffmpeg-4.2.4-single-header.h:4566:11: note: a field of same name but different type is defined in another translation unit 4566 | int (*read_probe)(const AVProbeData *); | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/57/../../ffmpeg-3.4.8-single-header.h:4498:16: note: type mismatch in parameter 1 4498 | typedef struct AVInputFormat { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/57/../../ffmpeg-3.4.8-single-header.h:4498:16: note: type ‘struct AVProbeData’ itself violates the C++ One Definition Rule /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/57/../../ffmpeg-3.4.8-single-header.h:4198:16: error: type ‘struct AVIOContext’ violates the C++ One Definition Rule [-Werror=odr] 4198 | typedef struct AVIOContext { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avformat/58/../../ffmpeg-4.2.4-single-header.h:4253:16: note: a different type is defined in another translation unit 4253 | typedef struct AVIOContext { | ^ . . . /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/57/../../ffmpeg-3.4.8-single-header.h:1488:6: error: type ‘AVFrameSideDataType’ violates the C++ One Definition Rule [-Werror=odr] 1488 | enum AVFrameSideDataType { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/58/../../ffmpeg-4.2.4-single-header.h:1499:6: note: an enum with different number of values is defined in another translation unit 1499 | enum AVFrameSideDataType { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/57/../../ffmpeg-3.4.8-single-header.h:4547:6: error: type ‘AVStreamParseType’ violates the C++ One Definition Rule [-Werror=odr] 4547 | enum AVStreamParseType { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/58/../../ffmpeg-4.2.4-single-header.h:4593:6: note: an enum with different value name is defined in another translation unit 4593 | enum AVStreamParseType { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/57/../../ffmpeg-3.4.8-single-header.h:4553:5: note: name ‘AVSTREAM_PARSE_FULL_RAW’ is defined to 1463898624 while another translation unit defines it as 5 4553 | AVSTREAM_PARSE_FULL_RAW=MKTAG(0,'R','A','W'), | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/58/../../ffmpeg-4.2.4-single-header.h:4599:5: note: mismatching definition 4599 | AVSTREAM_PARSE_FULL_RAW, | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/57/../../ffmpeg-3.4.8-single-header.h:1078:6: error: type ‘AVColorPrimaries’ violates the C++ One Definition Rule [-Werror=odr] 1078 | enum AVColorPrimaries { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/59/../../ffmpeg-5.0.1-single-header.h:1126:6: note: an enum with different value name is defined in another translation unit 1126 | enum AVColorPrimaries { | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/57/../../ffmpeg-3.4.8-single-header.h:1094:5: note: name ‘AVCOL_PRI_JEDEC_P22’ differs from name ‘AVCOL_PRI_EBU3213’ defined in another translation unit 1094 | AVCOL_PRI_JEDEC_P22 = 22, | ^ /var/tmp/portage/media-sound/tenacity-1.3.2/work/tenacity-1.3.2/libraries/lib-ffmpeg-support/impl/avcodec/59/../../ffmpeg-5.0.1-single-header.h:1142:5: note: mismatching definition 1142 | AVCOL_PRI_EBU3213 = 22, | ^ 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 ``` Attaching logs.