Created attachment 841269 [details] emerge --info and build log media-libs/fdk-aac-2.0.2 fails to compile with CFLAGS=-flto=auto -Werror=odr -Werror-lto-type-mismatch -Werror=strict-aliasing and LDFLAGS="-Werror=odr -Werror-lto-type-mismatch -Werror=strict-aliasing" /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libMpegTPDec/src/tpdec_adts.h:141:8: error: type 'struct STRUCT_ADTS' violates the C++ One Definition Rule [-Werror=odr] 141 | struct STRUCT_ADTS { | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libMpegTPEnc/src/tpenc_adts.h:133:3: note: a different type is defined in another translation unit 133 | } STRUCT_ADTS; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libMpegTPDec/src/tpdec_adts.h:142:18: note: the first difference of corresponding definitions is field 'bs' 142 | STRUCT_ADTS_BS bs; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libMpegTPEnc/src/tpenc_adts.h:111:7: note: a field with different name is defined in another translation unit 111 | INT sample_freq; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libMpegTPDec/src/tpdec_latm.h:126:3: error: type 'struct LATM_LAYER_INFO' violates the C++ One Definition Rule [-Werror=odr] 126 | } LATM_LAYER_INFO; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libMpegTPEnc/src/tpenc_latm.h:130:3: note: a different type is defined in another translation unit 130 | } LATM_LAYER_INFO; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libMpegTPDec/src/tpdec_latm.h:122:8: note: the first difference of corresponding definitions is field 'm_frameLengthType' 122 | UINT m_frameLengthType; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libMpegTPEnc/src/tpenc_latm.h:126:14: note: a field with different name is defined in another translation unit 126 | signed int frameLengthType; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSACdec/src/sac_dec.h:201:3: error: type 'struct LOSSLESSDATA' violates the C++ One Definition Rule [-Werror=odr] 201 | } LOSSLESSDATA; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSACenc/src/sacenc_bitstream.h:241:3: note: a different type is defined in another translation unit 241 | } LOSSLESSDATA; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSACdec/src/sac_dec.h:196:9: note: the first difference of corresponding definitions is field 'bsXXXDataMode' 196 | SCHAR bsXXXDataMode[MAX_PARAMETER_SETS]; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSACenc/src/sacenc_bitstream.h:236:9: note: a field of same name but different type is defined in another translation unit 236 | UCHAR bsXXXDataMode[SACENC_MAX_NUM_BOXES][MAX_NUM_PARAMS]; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSACdec/src/sac_dec.h:201:3: note: array types have different bounds 201 | } LOSSLESSDATA; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRenc/include/../src/bit_sbr.h:131:8: error: type 'struct SBR_HEADER_DATA' violates the C++ One Definition Rule [-Werror=odr] 131 | struct SBR_HEADER_DATA { | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRdec/src/env_extr.h:295:3: note: a different type is defined in another translation unit 295 | } SBR_HEADER_DATA; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRenc/include/../src/bit_sbr.h:132:11: note: the first difference of corresponding definitions is field 'sbr_amp_res' 132 | AMP_RES sbr_amp_res; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRdec/src/env_extr.h:271:3: note: a field with different name is defined in another translation unit 271 | syncState; /*!< The current initialization status of the header */ | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRenc/include/../src/ton_corr.h:131:3: error: type 'struct PATCH_PARAM' violates the C++ One Definition Rule [-Werror=odr] 131 | } PATCH_PARAM; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRdec/src/lpp_tran.h:187:3: note: a different type is defined in another translation unit 187 | } PATCH_PARAM; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRenc/include/../src/ton_corr.h:120:7: note: the first difference of corresponding definitions is field 'sourceStartBand' 120 | INT sourceStartBand; /*!< first band in lowbands where to take the samples | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRdec/src/lpp_tran.h:174:9: note: a field of same name but different type is defined in another translation unit 174 | UCHAR sourceStartBand; /*!< first band in lowbands where to take the samples | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRenc/include/../src/ton_corr.h:131:3: note: type 'INT' should match type 'UCHAR' 131 | } PATCH_PARAM; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRenc/include/../src/sbr.h:129:16: error: type 'struct SBR_CHANNEL' violates the C++ One Definition Rule [-Werror=odr] 129 | typedef struct SBR_CHANNEL { | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRdec/src/sbr_dec.h:173:3: note: a different type is defined in another translation unit 173 | } SBR_CHANNEL; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRenc/include/../src/sbr.h:130:22: note: the first difference of corresponding definitions is field 'hEnvChannel' 130 | struct ENV_CHANNEL hEnvChannel; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSBRdec/src/sbr_dec.h:170:18: note: a field with different name is defined in another translation unit 170 | SBR_FRAME_DATA frameData[(1) + 1]; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libFDK/include/nlc_dec.h:129:3: error: type 'DATA_TYPE' violates the C++ One Definition Rule [-Werror=odr] 129 | } DATA_TYPE; | ^ /var/tmp/portage/media-libs/fdk-aac-2.0.2/work/fdk-aac-2.0.2/libSACenc/src/sacenc_nlc_enc.h:120:3: note: an enum with different number of values is defined in another translation unit 120 | } DATA_TYPE; | ^ lto1: some warnings being treated as errors lto-wrapper: fatal error: x86_64-pc-linux-gnu-gcc returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status make: *** [Makefile:1490: libfdk-aac.la] Error 1