https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: media-gfx/silicon-0.4.3 fails to compile (lto). Discovered on: amd64 (internal ref: guru_tinderbox) NOTE: This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Created attachment 793163 [details] build.log build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/media-gfx/silicon-0.4.3/work/silicon-0.4.3/target/release/deps/libonig-f9315bf99f73abbd.rlib(onig-f9315bf99f73abbd.onig.f6cbafe1-cgu.1.rcgu.o): in function `onig::Error::new': /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: onig.f6cbafe1-cgu.11:(.text._ZN72_$LT$onig..match_param..MatchParam$u20$as$u20$core..default..Default$GT$7default17h832c69060b6a90f1E+0xf): undefined reference to `onig_initialize_match_param' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: onig.f6cbafe1-cgu.1:(.text._ZN4onig5Regex25with_options_and_encoding17h2f5599f87b735a69E+0xc6): undefined reference to `onig_new' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: syntect.40d90a96-cgu.10:(.text._ZN4onig5Regex17search_with_param17h711184c1d5ccddacE+0x1bd): undefined reference to `onig_search_with_param' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: syntect.40d90a96-cgu.10:(.text._ZN4onig5Regex17search_with_param17h711184c1d5ccddacE+0x39): undefined reference to `OnigEncodingUTF8' onig.f6cbafe1-cgu.11:(.text._ZN71_$LT$onig..match_param..MatchParam$u20$as$u20$core..ops..drop..Drop$GT$4drop17h2bd3e9a24d5040acE+0x5): undefined reference to `onig_free_match_param' onig.f6cbafe1-cgu.11:(.text._ZN72_$LT$onig..match_param..MatchParam$u20$as$u20$core..default..Default$GT$7default17h832c69060b6a90f1E+0x3): undefined reference to `onig_new_match_param' onig.f6cbafe1-cgu.1:(.text._ZN4onig5Error3new17hfa360c300d6e73cdE+0x3f): undefined reference to `onig_error_code_to_str' onig.f6cbafe1-cgu.1:(.text._ZN4onig5Regex25with_options_and_encoding17h2f5599f87b735a69E+0xb2): undefined reference to `OnigEncodingUTF8' onig.f6cbafe1-cgu.1:(.text._ZN4onig5Regex8encoding17h883f0c716f0e5a21E+0x5): undefined reference to `onig_get_encoding' onig.f6cbafe1-cgu.1:(.text._ZN53_$LT$onig..Regex$u20$as$u20$core..ops..drop..Drop$GT$4drop17hba74cccb116cd1caE+0x5): undefined reference to `onig_free' onig.f6cbafe1-cgu.4:(.text._ZN4onig6syntax6Syntax7default17h675bb7445b54550fE+0x3): undefined reference to `OnigDefaultSyntax' onig.f6cbafe1-cgu.5:(.text._ZN4core3ptr41drop_in_place$LT$onig..region..Region$GT$17hf784f0b6de288dedE+0x4): undefined reference to `onig_region_free' onig.f6cbafe1-cgu.5:(.text._ZN4onig6region6Region13with_capacity17he76f0dd890504e84E+0x13): undefined reference to `onig_region_resize' onig.f6cbafe1-cgu.5:(.text._ZN59_$LT$onig..region..Region$u20$as$u20$core..clone..Clone$GT$5clone17h1305139d1a7b5880E+0x13): undefined reference to `onig_region_copy' onig.f6cbafe1-cgu.5:(.text._ZN62_$LT$onig..region..Region$u20$as$u20$core..ops..drop..Drop$GT$4drop17hf0bad1467bba80f5E+0x4): undefined reference to `onig_region_free' syntect.40d90a96-cgu.10:(.text._ZN4onig5Regex17search_with_param17h711184c1d5ccddacE+0x2c): undefined reference to `OnigEncodingUTF8' error: linking with `x86_64-pc-linux-gnu-gcc` failed: exit status: 1
Seems to be the same as <https://bugs.gentoo.org/860063#c3>. For now Rust ecosystem would not be enough compatible to Rust, and `-ftlo` for gcc won't work as expected.
Assuming this is fixed by changes to cargo.eclass (guru package == have not actually tested).