inbetweennames / gentoolto Goto Github PK
View Code? Open in Web Editor NEWA Gentoo Portage configuration for building with -O3, Graphite, and LTO optimizations
License: GNU General Public License v2.0
A Gentoo Portage configuration for building with -O3, Graphite, and LTO optimizations
License: GNU General Public License v2.0
$ cat /etc/portage/env/nostrip
FEATURES="${FEATURES} nostrip"
$ cat /etc/portage/package.env/lto
sys-libs/zlib nostrip
# emerge -1 sys-libs/zlib -va
w/ freshly installed gcc 7.2.0 and new CFLAGS from make.conf.lto (nothing else from overlay, just playing w/ optimizations for now) this command triggered rebuild for ~15 packages including sys-apps/pciutils
which marked in overlay workarounds as nolto
and everything compiled w/ default LTO flags
not sure about python which marked as ltonographite and potentially can break portage, but I can confirm problem w/ net-misc/openssh (lto/nolto.conf #hangs on exit with lto)
both are triggered by zlib too
I can suggest command (picked from one of GCC Upgrade manuals long time ago) to detect other potential candidates for this env: # emerge -1 $(find /lib* /usr/lib* -type f -name "*.a") -vtp
I find it interesting that there hasn't been more push to build the kernel using LTO. I've found a couple of mailing list threads about it, including a patchset to let it happen, but there wasn't a lot of interest upstream. I've created this issue as a way to track what the current LTO progress in the kernel is, and possibly even add some patchsets to let it happen. I know I'd for sure use it on my router if I could with OpenWRT.
I had to turn off lto for numactl and cvs. They install now.
#Packages which cannot be built with LTO at all (previously was nolto.conf) sys-process/numactl *FLAGS-=-flto* dev-vcs/cvs *FLAGS-=-flto*
As this overlay now depends on the mv overlay, we'll have to amend the CI tests to pull in that overlay as well
My USE flags are very stripped down, encoding and all the other jazz is disabled, so I could imagine results might differ on a more complete ffmpeg, but nonetheless it's worth noting.
These are my USE flags: X, alsa, aes, mmx, mmxext, sse ,sse2 ,sse3, sse4_1, sse4_2, ssse3, gpl, hardcoded-tables, iconv, libass, libdrm, mp3, network, opengl, sdl, threads, truetype, vaapi, vorbis, xcb, xvid, zlib.
I used the cflags from your make.conf plus -ffast-math. There is a minor but nonetheless real improvement from enabling graphite and lto here. A particularly intense 3 minute segment of video which consistently dropped around 160 frames in MPV prior to recompiling with lto and graphite now only drops 140. If there are indeed issues with compiling a full ffmpeg with grapite and lto, they obviously should be disabled by default. But it might be worth commenting in that it can work with them, as it can be a noticable improvement for people with trash hardware like me.
These configurations are wonderful! Thanks for sharing!
I am wondering if the LTO w/Graphite configurations might also useful as a Gentoo kernel profile (possibly more than one inheriting from other profiles) so ease the burdens of trying out such. The profile(s) can stipulate some of the overrides, etc. required to have things work (e.g., Perl5 w/no LTO). Over time, presumably, the need for overrides would be eliminated, etc.
Others' thoughts on this (at least as an idea)?
Hi, when using the python 3.5 & 3.6 ebuilds with the pgo
USE flag from your overlay I get a sandbox violation with the test test_compileall
, when I remove it, it completes the build.
Another oddity is that test_curses
leaves my terminal in an unusable state.
Could the ltoize package produce "pre-merge" messages and "post-merge" messages to inform the user of important items?
"Premerge" messages are in these (e.g., see pkg_pretend()):
"Postmerge" messages are in these:
package.cflags/ltoworkarounds.conf:
#Packages which Graphite optimizations don't play nice with
media-libs/lcms *FLAGS-="${GRAPHITE}"
sys-apps/man-db *FLAGS-="${GRAPHITE}"
dev-lang/python *FLAGS-="${GRAPHITE}"
I have media-libs/lcms
and dev-lang/python
built w/o any flag overriding. Is this flags modification still needed ?
Have you considered using https://github.com/vaeth/portage-bashrc-mv?
It appears that the media-video/ffmpeg
ebuilds will add --enable-lto
to the configuration even if you have -fno-lto
active as the newest overrides do. This can lead to build errors. I'm just creating an issue here to track this.
See this bugzilla comment about a fix: https://bugs.gentoo.org/566282#c6
I'm testing a patched ebuild in my own overlay and it appears to be working. It looks like a bug should be filed upstream about this--I'll make one when I get some time (unless someone else wants to do so first--if you do, please link the bug here)
Full disclosure: I have no idea, because "I am not a lawyer"
The project as a whole is under the BSD license whereas the ebuild is under GPLv2,
Anybody can shed some light on the implications?
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: /var/tmp/portage/app-admin/keepassxc-2.2.2/temp/ccERKDVM.ltrans0.ltrans.o: requires dynamic R_X86_64_PC32 reloc against '_ZN16AutoTypeExecutor9execDelayEP13AutoTypeDelay' which may overflow at runtime; recompile with -fPIC
app-admin/keepassxc *FLAGS+=-fPIC
fixes build. I do not know if this is due to gentooLTO, can someone test?
UPD: seems gentooLTO is not related https://bugs.gentoo.org/buglist.cgi?quicksearch=fPIC&list_id=3710774
Build with *FLAGS-="${FLTO}"
, log:
Zend/zend_vm_execute.h:321:34: error: global register variable follows a function definition
register const zend_op* volatile opline __asm__(ZEND_VM_IP_GLOBAL_REG);
^
Zend/zend_vm_execute.h: In function 'zend_vm_call_opcode_handler':
Zend/zend_vm_execute.h:315:38: error: global register variable follows a function definition
register zend_execute_data* volatile execute_data __asm__(ZEND_VM_FP_GLOBAL_REG);
^
make[1]: *** [/var/tmp/portage/dev-lang/php-7.0.23/temp/ccgewnNE.mk:86: /var/tmp/portage/dev-lang/php-7.0.23/temp/ccoGFuFY.ltrans28.ltrans.o] Error 1
make[1]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
python-3.6.4 support configure flag --with-lto:
--with-lto Enable Link Time Optimization in PGO builds. Disabled by default.
$ echo "lt_cv_sys_$(grep -o "^global_symbol_pipe=.*$" /usr/bin/libtool)"
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'"
$ echo "lt_cv_sys_$(grep -o "^global_symbol_to_cdecl=.*$" /usr/bin/libtool)"
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW][ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'"
According to bug https://bugs.freedesktop.org/show_bug.cgi?id=99675#c3 local libtool
differs from /usr/bin/libtool
.
Can be fixed by simply adding this variables to env/ for pulseaudio
or even to make.conf
if there is other packages affected.
removing lto works.
libtool: link: x86_64-pc-linux-gnu-gcc -shared -fPIC -DPIC .libs/libclamav_la-matcher-ac.o .libs/libclamav_la-matcher-bm.o .libs/libclamav_la-matcher-hash.o .libs/libclamav_la-matcher.o .libs/libclamav_la-others.o .libs/libclamav_la-readdb.o .libs/libclamav_la-cvd.o .libs/libclamav_la-dsig.o .libs/libclamav_la-scanners.o .libs/libclamav_la-textdet.o .libs/libclamav_la-filetypes.o .libs/libclamav_la-rtf.o .libs/libclamav_la-blob.o .libs/libclamav_la-mbox.o .libs/libclamav_la-message.o .libs/libclamav_la-table.o .libs/libclamav_la-text.o .libs/libclamav_la-ole2_extract.o .libs/libclamav_la-vba_extract.o .libs/libclamav_la-msexpand.o .libs/libclamav_la-pe.o .libs/libclamav_la-pe_icons.o .libs/libclamav_la-disasm.o .libs/libclamav_la-upx.o .libs/libclamav_la-htmlnorm.o .libs/libclamav_la-chmunpack.o .libs/libclamav_la-rebuildpe.o .libs/libclamav_la-petite.o .libs/libclamav_la-wwunpack.o .libs/libclamav_la-unsp.o .libs/libclamav_la-aspack.o .libs/libclamav_la-packlibs.o .libs/libclamav_la-fsg.o .libs/libclamav_la-mew.o .libs/libclamav_la-upack.o .libs/libclamav_la-line.o .libs/libclamav_la-untar.o .libs/libclamav_la-unzip.o .libs/libclamav_la-ooxml.o .libs/libclamav_la-inflate64.o .libs/libclamav_la-special.o .libs/libclamav_la-binhex.o .libs/libclamav_la-is_tar.o .libs/libclamav_la-tnef.o .libs/libclamav_la-autoit.o .libs/libclamav_la-unarj.o .libs/libclamav_la-bzlib.o .libs/libclamav_la-nulsft.o .libs/libclamav_la-infblock.o .libs/libclamav_la-pdf.o .libs/libclamav_la-pdfng.o .libs/libclamav_la-spin.o .libs/libclamav_la-yc.o .libs/libclamav_la-elf.o .libs/libclamav_la-sis.o .libs/libclamav_la-uuencode.o .libs/libclamav_la-phishcheck.o .libs/libclamav_la-phish_domaincheck_db.o .libs/libclamav_la-phish_whitelist.o .libs/libclamav_la-regex_list.o .libs/libclamav_la-regex_suffix.o .libs/libclamav_la-mspack.o .libs/libclamav_la-cab.o .libs/libclamav_la-entconv.o .libs/libclamav_la-hashtab.o .libs/libclamav_la-dconf.o .libs/libclamav_la-lzma_iface.o .libs/libclamav_la-7z_iface.o .libs/libclamav_la-7zAlloc.o .libs/libclamav_la-7zBuf.o .libs/libclamav_la-7zBuf2.o .libs/libclamav_la-7zCrc.o .libs/libclamav_la-7zDec.o .libs/libclamav_la-7zFile.o .libs/libclamav_la-7zIn.o .libs/libclamav_la-7zStream.o .libs/libclamav_la-Bcj2.o .libs/libclamav_la-Bra.o .libs/libclamav_la-Bra86.o .libs/libclamav_la-Lzma2Dec.o .libs/libclamav_la-LzmaDec.o .libs/libclamav_la-Ppmd7.o .libs/libclamav_la-Ppmd7Dec.o .libs/libclamav_la-Xz.o .libs/libclamav_la-XzCrc64.o .libs/libclamav_la-XzDec.o .libs/libclamav_la-XzIn.o .libs/libclamav_la-Delta.o .libs/libclamav_la-BraIA64.o .libs/libclamav_la-CpuArch.o .libs/libclamav_la-7zCrcOpt.o .libs/libclamav_la-explode.o .libs/libclamav_la-textnorm.o .libs/libclamav_la-dlp.o .libs/libclamav_la-js-norm.o .libs/libclamav_la-uniq.o .libs/libclamav_la-version.o .libs/libclamav_la-mpool.o .libs/libclamav_la-filtering.o .libs/libclamav_la-fmap.o .libs/libclamav_la-perflogging.o .libs/libclamav_la-bytecode.o .libs/libclamav_la-bytecode_vm.o .libs/libclamav_la-cpio.o .libs/libclamav_la-macho.o .libs/libclamav_la-ishield.o .libs/libclamav_la-bytecode_api.o .libs/libclamav_la-bytecode_api_decl.o .libs/libclamav_la-cache.o .libs/libclamav_la-bytecode_detect.o .libs/libclamav_la-events.o .libs/libclamav_la-adc.o .libs/libclamav_la-dmg.o .libs/libclamav_la-xar.o .libs/libclamav_la-xdp.o .libs/libclamav_la-mbr.o .libs/libclamav_la-gpt.o .libs/libclamav_la-apm.o .libs/libclamav_la-prtn_intxn.o .libs/libclamav_la-json_api.o .libs/libclamav_la-xz_iface.o .libs/libclamav_la-sf_base64decode.o .libs/libclamav_la-hfsplus.o .libs/libclamav_la-swf.o .libs/libclamav_la-jpeg.o .libs/libclamav_la-png.o .libs/libclamav_la-iso9660.o .libs/libclamav_la-arc4.o .libs/libclamav_la-rijndael.o .libs/libclamav_la-crtmgr.o .libs/libclamav_la-asn1.o .libs/libclamav_la-fpu.o .libs/libclamav_la-stats.o .libs/libclamav_la-www.o .libs/libclamav_la-stats_json.o .libs/libclamav_la-hostid.o .libs/libclamav_la-openioc.o .libs/libclamav_la-msdoc.o .libs/libclamav_la-matcher-pcre.o .libs/libclamav_la-regex_pcre.o .libs/libclamav_la-msxml.o .libs/libclamav_la-msxml_parser.o .libs/libclamav_la-tiff.o .libs/libclamav_la-hwp.o .libs/libclamav_la-yara_arena.o .libs/libclamav_la-yara_compiler.o .libs/libclamav_la-yara_exec.o .libs/libclamav_la-yara_hash.o .libs/libclamav_la-yara_grammar.o .libs/libclamav_la-yara_lexer.o .libs/libclamav_la-yara_parser.o .libs/libclamav_la-fp_add.o .libs/libclamav_la-fp_add_d.o .libs/libclamav_la-fp_addmod.o .libs/libclamav_la-fp_cmp.o .libs/libclamav_la-fp_cmp_d.o .libs/libclamav_la-fp_cmp_mag.o .libs/libclamav_la-fp_sub.o .libs/libclamav_la-fp_sub_d.o .libs/libclamav_la-fp_submod.o .libs/libclamav_la-s_fp_add.o .libs/libclamav_la-s_fp_sub.o .libs/libclamav_la-fp_radix_size.o .libs/libclamav_la-fp_read_radix.o .libs/libclamav_la-fp_read_signed_bin.o .libs/libclamav_la-fp_read_unsigned_bin.o .libs/libclamav_la-fp_reverse.o .libs/libclamav_la-fp_s_rmap.o .libs/libclamav_la-fp_signed_bin_size.o .libs/libclamav_la-fp_to_signed_bin.o .libs/libclamav_la-fp_to_unsigned_bin.o .libs/libclamav_la-fp_toradix.o .libs/libclamav_la-fp_toradix_n.o .libs/libclamav_la-fp_unsigned_bin_size.o .libs/libclamav_la-fp_cnt_lsb.o .libs/libclamav_la-fp_count_bits.o .libs/libclamav_la-fp_div_2.o .libs/libclamav_la-fp_div_2d.o .libs/libclamav_la-fp_lshd.o .libs/libclamav_la-fp_mod_2d.o .libs/libclamav_la-fp_rshd.o .libs/libclamav_la-fp_div.o .libs/libclamav_la-fp_div_d.o .libs/libclamav_la-fp_mod.o .libs/libclamav_la-fp_mod_d.o .libs/libclamav_la-fp_2expt.o .libs/libclamav_la-fp_exptmod.o .libs/libclamav_la-fp_ident.o .libs/libclamav_la-fp_set.o .libs/libclamav_la-fp_montgomery_calc_normalization.o .libs/libclamav_la-fp_montgomery_reduce.o .libs/libclamav_la-fp_montgomery_setup.o .libs/libclamav_la-fp_mul.o .libs/libclamav_la-fp_mul_comba.o .libs/libclamav_la-fp_mul_2.o .libs/libclamav_la-fp_mul_2d.o .libs/libclamav_la-fp_mul_comba_12.o .libs/libclamav_la-fp_mul_comba_17.o .libs/libclamav_la-fp_mul_comba_20.o .libs/libclamav_la-fp_mul_comba_24.o .libs/libclamav_la-fp_mul_comba_28.o .libs/libclamav_la-fp_mul_comba_3.o .libs/libclamav_la-fp_mul_comba_32.o .libs/libclamav_la-fp_mul_comba_4.o .libs/libclamav_la-fp_mul_comba_48.o .libs/libclamav_la-fp_mul_comba_6.o .libs/libclamav_la-fp_mul_comba_64.o .libs/libclamav_la-fp_mul_comba_7.o .libs/libclamav_la-fp_mul_comba_8.o .libs/libclamav_la-fp_mul_comba_9.o .libs/libclamav_la-fp_mul_comba_small_set.o .libs/libclamav_la-fp_mul_d.o .libs/libclamav_la-fp_mulmod.o .libs/libclamav_la-fp_invmod.o .libs/libclamav_la-fp_sqr.o .libs/libclamav_la-fp_sqr_comba_12.o .libs/libclamav_la-fp_sqr_comba_17.o .libs/libclamav_la-fp_sqr_comba_20.o .libs/libclamav_la-fp_sqr_comba_24.o .libs/libclamav_la-fp_sqr_comba_28.o .libs/libclamav_la-fp_sqr_comba_3.o .libs/libclamav_la-fp_sqr_comba_32.o .libs/libclamav_la-fp_sqr_comba_4.o .libs/libclamav_la-fp_sqr_comba_48.o .libs/libclamav_la-fp_sqr_comba_6.o .libs/libclamav_la-fp_sqr_comba_64.o .libs/libclamav_la-fp_sqr_comba_7.o .libs/libclamav_la-fp_sqr_comba_8.o .libs/libclamav_la-fp_sqr_comba_9.o .libs/libclamav_la-fp_sqr_comba_generic.o .libs/libclamav_la-fp_sqr_comba_small_set.o .libs/libclamav_la-fp_sqrmod.o .libs/libclamavS.o -Wl,--whole-archive c++/.libs/libclamavcxx.a ./.libs/libclamav_internal_utils.a -Wl,--no-whole-archive -lxml2 -llzma -licui18n -licuuc -licudata -L/usr/lib64 -lbz2 /usr/lib64/libltdl.so -ldl -lstdc++ -lssl -lcrypto -lz -lpcre2-8 -lpthread -lm -O3 -march=skylake -Wl,--as-needed -Wl,--hash-style=gnu -flto=4 -fuse-linker-plugin -O0 -Wl,--version-script -Wl,../libclamav/libclamav.map -Wl,--as-needed -Wl,--hash-style=gnu -O3 -march=skylake -flto=4 -flto=4 -fuse-linker-plugin -pthread -Wl,-soname -Wl,libclamav.so.7 -o .libs/libclamav.so.7.1.1 yara_grammar.y:796:15: warning: type of 'cli_strlcat' does not match original declaration [-Wlto-type-mismatch] strlcat($1, "i", MAX_FUNCTION_ARGS); ^ strlcat.c:38:1: note: return value type mismatch cli_strlcat(char *dst, const char *src, size_t siz) ^ /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include/stddef.h:216:23: note: type 'size_t' should match type 'int' typedef __SIZE_TYPE__ size_t; ^ strlcat.c:38:1: note: 'cli_strlcat' was previously declared here cli_strlcat(char *dst, const char *src, size_t siz) ^ strlcat.c:38:1: note: code may be misoptimized unless -fno-strict-aliasing is used /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/portage/app-antivirus/clamav-0.99.2-r1/temp/cc6mtV7G.ltrans0.ltrans.o: warning: relocation against
X86CompilationCallback2' in readonly section .text' /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/portage/app-antivirus/clamav-0.99.2-r1/temp/cc6mtV7G.ltrans0.ltrans.o: relocation R_X86_64_PC32 against undefined symbol
X86CompilationCallback2' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1236: libclamav.la] Error 1`
media-libs/x264-0.0.20170701-r1 fails on patching:
https://gist.github.com/2d2dba5def1dbc3cd1e0d73d97e969b3
Important part:
* Applying lto.patch ...
The text leading up to this was:
--------------------------
|--- configure 2017-10-12 23:56:01.941756673 +0300
|+++ configure 2017-10-12 23:56:57.781761873 +0300
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
[ !! ]
* ERROR: media-libs/x264-0.0.20170701-r1::lto-overlay failed (prepare phase):
* patch -p1 failed with /etc/portage/patches/media-libs/x264-0.0.20170701/lto.patch
m4 -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_mullow_n_basecase -DPIC mullow_n_basecase.asm >tmp-mullow_n_basecase.s
libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_mulhigh_n -march=native -O3 -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -flto=8 -fuse-linker-plugin -pipe -fomit-frame-pointer -fno-stack-protector -w -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-O2 -c mulhigh_n.c -fPIC -DPIC -o .libs/mulhigh_n.o
x86_64-pc-linux-gnu-gcc -c -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -I.. -DOPERATION_mullow_n_basecase -march=native -O3 -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -flto=8 -fuse-linker-plugin -pipe -fomit-frame-pointer -fno-stack-protector -w -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-O2 -I. -I.. tmp-mullow_n_basecase.s -fPIC -DPIC -o .libs/mullow_n_basecase.o
get_d.c: In function ‘__gmpn_get_d’:
get_d.c:125:34: error: storage size of ‘u’ isn’t known
union ieee_double_extract u;
^
make[2]: *** [Makefile:462: get_d.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_mullow_basecase -march=native -O3 -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -flto=8 -fuse-linker-plugin -pipe -fomit-frame-pointer -fno-stack-protector -w -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-O2 -c mullow_basecase.c -fPIC -DPIC -o .libs/mullow_basecase.o
make[2]: Leaving directory '/var/tmp/portage/sci-libs/mpir-3.0.0/work/mpir-3.0.0/mpn'
make[1]: *** [Makefile:952: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sci-libs/mpir-3.0.0/work/mpir-3.0.0'
make: *** [Makefile:755: all] Error 2
emerge --info '=sci-libs/mpir-3.0.0::gentoo'
,emerge -pqv '=sci-libs/mpir-3.0.0::gentoo'
.cat /var/tmp/portage/media-libs/openexr-2.2.0-r2/temp/build.log
Unpacking source...
Unpacking openexr-2.2.0.tar.gz to /var/tmp/portage/media-libs/openexr-2.2.0-r2/work
Source unpacked in /var/tmp/portage/media-libs/openexr-2.2.0-r2/work
Preparing source in /var/tmp/portage/media-libs/openexr-2.2.0-r2/work/openexr-2.2.0 ...
Source prepared.
Configuring source in /var/tmp/portage/media-libs/openexr-2.2.0-r2/work/openexr-2.2.0 ...
Summary for OpenEXR features:
build IlmImf example program no
build IlmImf damaged input resilience test no
build IlmImf huge input test no
enable large stack optimizations yes
internal library namespace Imf_2_2
user-client namespace Imf
Source configured.
Compiling source in /var/tmp/portage/media-libs/openexr-2.2.0-r2/work/openexr-2.2.0 ...
emerge --info '=media-libs/openexr-2.2.0-r2::gentoo'
,emerge -pqv '=media-libs/openexr-2.2.0-r2::gentoo'
.It seems to me it would be very nice to track which packages are LTOed with Portage natively, similar to how multilib works. For example, we could have a USE_EXPAND
variable called LTO
which could be set to nolto
, lto
, or both at once.
LTO="lto"
would mean that the package is built with slim LTO objects (the default in our configuration)
LTO="nolto"
would mean that the package is built without LTO at all (nolto.conf
).
LTO="lto nolto"
would mean that the package is built with fat LTO objects (ltofat.conf
).
A package which is built with exclusively nolto
must link against other libraries with nolto
set (either exclusively or inclusively with nolto
or lto nolto
respectively).
A package which is built lto
may link against nolto
or lto
libraries. But if any library is lto nolto
then a rebuild is triggered if the status of it changes, to force the linker to choose the right symbols.
I'm not sure how much work this would actually be, but it would be nice to have something like this to integrate LTO into Portage natively. Furthermore it would open the door to using other compilers as well, such as clang
, to build your system. I'm a GCC guy myself, but I think the option should be there for users. If anyone has any thoughts or suggestions on this, please comment!
There is a lot of packages w/ strip-flags/replace-flags/filter-flags/... which was added years ago and probably can be dropped in now days.
For example you can get a list to analyse via $ grep -P -A1 -B1 "(replace-flags|strip-flags|filter-flags)" /var/db/pkg/*/*/*
command. many of them useful but replace-flags -O3 -O2
and strip-flags
can be retested.
So i wonder can we somehow override them. Maybe via package.cflags somehow or custom bashrc.d script or maybe custom eclass. Maybe there is a way to add overlay's internal use-flag like custom-cflags and let users to chose which packages this internal stuff will affect.
Other variants is to modify ebuilds itself or ask upstream to add custom-cflags or remove *-flags
.
So far I tested x11-libs/gtk+-2.24.31-r1
, net-im/pidgin-2.12.0
, media-libs/libsdl2-2.0.7
, app-editors/vim-8.0.1188
and app-editors/vim-core-8.0.1188
with removed flag modifiers. And everything work w/o any issues for me. Moreover despite all this scary thing was written in 2005 ( https://bugs.gentoo.org/76331 ) vim works noticeable faster, I have more than dozen plugins installed and startup was slow for editor but now startup and navigation as fast as mcedit/mcview for example.
Looks like vim is one of the packages where -O3/graphite stuff really helps.
with many undefined references. it installs w/o lto.
libtool: link: x86_64-pc-linux-gnu-gcc -m32 -Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden -O3 -pipe -march=skylake -Wl,--hash-style=gnu -flto=4 -ftree-vectorize -floop-interchange -fuse-linker-plugin -fgraphite-identity -floop-nest-optimize -Wl,--hash-style=gnu -O3 -pipe -march=skylake -flto=4 -ftree-vectorize -floop-interchange -flto=4 -fuse-linker-plugin -fgraphite-identity -floop-nest-optimize -o .libs/event-loop-test tests/event-loop-test.o -Wl,--as-needed ./.libs/libtest-runner.a /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/.libs/libwayland-client.so -L/usr/lib32/../lib32 /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/.libs/libwayland-server.so -lm -lrt -ldl -lffi -pthread /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccEsZa1n.ltrans0.ltrans.o: In function
usage':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to
__start_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccEsZa1n.ltrans0.ltrans.o: In function main': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to
__start_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccEsZa1n.ltrans0.ltrans.o: In function
find_test':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to
__start_test_section'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1463: interface-test] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/cc7INYSq.ltrans0.ltrans.o: In function usage': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to __start_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/cc7INYSq.ltrans0.ltrans.o: In function
main':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to __start_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/cc7INYSq.ltrans0.ltrans.o: In function find_test': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to __start_test_section' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:1447: fixed-test] Error 1 /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccCZ0U2p.ltrans0.ltrans.o: In function
usage':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to
__start_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccCZ0U2p.ltrans0.ltrans.o: In function main': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to
__start_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccCZ0U2p.ltrans0.ltrans.o: In function
find_test':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to
__start_test_section'
collect2: error: ld returned 1 exit status
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/cc1ScU5q.ltrans0.ltrans.o: In function usage': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to __start_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/cc1ScU5q.ltrans0.ltrans.o: In function
main':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to __start_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/cc1ScU5q.ltrans0.ltrans.o: In function find_test': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to __start_test_section' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:1411: connection-test] Error 1 make[2]: *** [Makefile:1399: client-test] Error 1 /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccNAQm0n.ltrans0.ltrans.o: In function
usage':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to
__start_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccNAQm0n.ltrans0.ltrans.o: In function main': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to
__start_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccNAQm0n.ltrans0.ltrans.o: In function
find_test':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to
__start_test_section'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1393: array-test] Error 1
libtool: link: x86_64-pc-linux-gnu-gcc -m32 -Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden -O3 -pipe -march=skylake -Wl,--hash-style=gnu -flto=4 -ftree-vectorize -floop-interchange -fuse-linker-plugin -fgraphite-identity -floop-nest-optimize -Wl,--hash-style=gnu -O3 -pipe -march=skylake -flto=4 -ftree-vectorize -floop-interchange -flto=4 -fuse-linker-plugin -fgraphite-identity -floop-nest-optimize -o .libs/list-test tests/list-test.o -Wl,--as-needed ./.libs/libtest-runner.a /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/.libs/libwayland-client.so -L/usr/lib32/../lib32 /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/.libs/libwayland-server.so -lm -lrt -ldl -lffi -pthread
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccqrOogo.ltrans0.ltrans.o: In function usage': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to __start_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccqrOogo.ltrans0.ltrans.o: In function
main':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to __start_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccqrOogo.ltrans0.ltrans.o: In function find_test': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to __start_test_section' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:1429: event-loop-test] Error 1 /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccRH3B6t.ltrans0.ltrans.o: In function
usage':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to
__start_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccRH3B6t.ltrans0.ltrans.o: In function main': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to
__start_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/ccRH3B6t.ltrans0.ltrans.o: In function
find_test':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to __stop_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to
__start_test_section'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1423: display-test] Error 1
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/cc8OshuJ.ltrans0.ltrans.o: In function usage': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:124: undefined reference to __start_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/cc8OshuJ.ltrans0.ltrans.o: In function
main':
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to __start_test_section' /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:389: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/temp/cc8OshuJ.ltrans0.ltrans.o: In function find_test': /var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to
__stop_test_section'
/var/tmp/portage/portage/dev-libs/wayland-1.14.0/work/wayland-1.14.0-abi_x86_32.x86/../wayland-1.14.0/tests/test-runner.c:107: undefined reference to __start_test_section' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:1469: list-test] Error 1
>>> Emerging (5 of 5) sys-config/ltoize-0.8-r1::lto-overlay
* Warning: Active GCC version < 7.2.0, it is recommended that you use the newest GCC if you want LTO.
* Aborting LTOize installation due to older GCC -- set I_KNOW_WHAT_I_AM_DOING=y if you want to override this behaviour.
>>> Unpacking source...
[...]
This prints and the emerge moves on. I believe it was supposed to stop after the error line.
When camlbz2 is compiled with the proposed settings, emerging dose3 fails with:
Warning 58: no cmx file was found in path for module Pef, and its interface was not compiled with -opaque
ERROR: dev-ml/dose3-5.0.1::gentoo failed (compile phase):
emake failed
If you need support, post the output of emerge --info '=dev-ml/dose3-5.0.1::gentoo'
,
the complete build log and the output of emerge -pqv '=dev-ml/dose3-5.0.1::gentoo'
.
The complete build log is located at '/var/tmp/portage/dev-ml/dose3-5.0.1/temp/build.log'.
The ebuild environment file is located at '/var/tmp/portage/dev-ml/dose3-5.0.1/temp/environment'.
Working directory: '/var/tmp/portage/dev-ml/dose3-5.0.1/work/dose3-5.0.1'
S: '/var/tmp/portage/dev-ml/dose3-5.0.1/work/dose3-5.0.1'
Messages for package dev-ml/dose3-5.0.1:
ERROR: dev-ml/dose3-5.0.1::gentoo failed (compile phase):
Based on https://bugs.webkit.org/show_bug.cgi?id=56088
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h 2017-10-09 14:40:55.050363361 +0300
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h 2017-10-09 14:45:50.271354448 +0300
@@ -316,7 +316,7 @@
EncodedJSValue JIT_STUB cti_op_to_primitive(STUB_ARGS_DECLARATION);
EncodedJSValue JIT_STUB cti_op_typeof(STUB_ARGS_DECLARATION);
EncodedJSValue JIT_STUB cti_op_urshift(STUB_ARGS_DECLARATION);
- EncodedJSValue JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION);
+ EncodedJSValue JIT_STUB cti_vm_throw(STUB_ARGS_DECLARATION) __attribute__((used));
EncodedJSValue JIT_STUB cti_to_object(STUB_ARGS_DECLARATION);
JSObject* JIT_STUB cti_op_construct_JSConstruct(STUB_ARGS_DECLARATION);
JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION);
I don't tested it further but at least it builds w/ this patch in /etc/portage/patches/dev-qt/qtscript/
Certain workarounds are only necessary in the presence of particular USE flags (see #75).
It would be nice to be able to specify workarounds that apply only in these cases, for example:
media-libs/mesa[nouveau] *FLAGS-=-flto*
*/ffmpeg[cpu_flags_x86_sse4_1] *FLAGS-=-flto*
This would require some patches to make it work. One approach that works right away without any patching at all is:
media-libs/mesa "has video_cards_nouveau ${IUSE//+} && use video_cards_nouveau && FlagSubAllFlags -flto*"
(courtesy of @pchome)
As contributors of this repo, I'd like to ask you what the best approach for doing this would be. I'll leave this thread open for any discussion or ideas on this.
Hi everyone,
I was working on refining make.conf
today and I noticed a bit of an oddity. On GCC's docs, they give a list of all optimizations enabled by default at O3:
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Curiously, they list -ftree-loop-distribution
as being enabled by default by O3, but in my own GCC it remains disabled:
>gcc --version
gcc (Gentoo 7.2.0 p1.1) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>gcc -c -Q -O3 --help=optimizers | grep distribut Tue 12 Sep 2017 09:37:44 AM EDT
-ftree-loop-distribute-patterns [enabled]
-ftree-loop-distribution [disabled]
I was wondering if anyone could check if this is the case on their systems too? Please include your GCC version in your response. If I can get at least one person to reproduce this bug I'll make a bug report in GCC.
x86_64-pc-linux-gnu-gcc -o mencoder mencoder.o parser-mecmd.o xvid_vbr.o libmpcodecs/ae.o libmpcodecs/ae_pcm.o libmpcodecs/ve.o libmpcodecs/ve_raw.o libmpdemux/muxer.o libmpdemux/muxer_avi.o libmpdemux/muxer_mpeg.o libmpdemux/muxer_rawaudio.o libmpdemux/muxer_rawvideo.o libmpcodecs/ae_lavc.o libmpcodecs/ve_lavc.o libmpdemux/muxer_lavf.o libmpcodecs/ve_nuv.o libmpcodecs/native/rtjpegn.o libmpcodecs/ae_lame.o libmpcodecs/ve_x264.o libmpcodecs/ve_xvid4.o asxparser.o bstr.o codec-cfg.o cpudetect.o edl.o fmt-conversion.o m_config.o m_option.o m_struct.o mp_msg.o mp_strings.o mpcommon.o parser-cfg.o path.o playtree.o playtreeparser.o subopt-helper.o libaf/af.o libaf/af_center.o libaf/af_channels.o libaf/af_comp.o libaf/af_delay.o libaf/af_dummy.o libaf/af_equalizer.o libaf/af_extrastereo.o libaf/af_format.o libaf/af_gate.o libaf/af_hrtf.o libaf/af_karaoke.o libaf/af_pan.o libaf/af_resample.o libaf/af_scaletempo.o libaf/af_sinesuppress.o libaf/af_stats.o libaf/af_sub.o libaf/af_surround.o libaf/af_sweep.o libaf/af_tools.o libaf/af_volnorm.o libaf/af_volume.o libaf/filter.o libaf/format.o libaf/reorder_ch.o libaf/window.o libmpcodecs/ad.o libmpcodecs/ad_alaw.o libmpcodecs/ad_dvdpcm.o libmpcodecs/ad_hwac3.o libmpcodecs/ad_hwmpa.o libmpcodecs/ad_pcm.o libmpcodecs/dec_audio.o libmpcodecs/dec_teletext.o libmpcodecs/dec_video.o libmpcodecs/img_format.o libmpcodecs/mp_image.o libmpcodecs/pullup.o libmpcodecs/vd.o libmpcodecs/vd_hmblck.o libmpcodecs/vd_lzo.o libmpcodecs/vd_mpegpes.o libmpcodecs/vd_mtga.o libmpcodecs/vd_null.o libmpcodecs/vd_raw.o libmpcodecs/vd_sgi.o libmpcodecs/vd_black.o libmpcodecs/vf.o libmpcodecs/vf_1bpp.o libmpcodecs/vf_2xsai.o libmpcodecs/vf_blackframe.o libmpcodecs/vf_boxblur.o libmpcodecs/vf_crop.o libmpcodecs/vf_cropdetect.o libmpcodecs/vf_decimate.o libmpcodecs/vf_delogo.o libmpcodecs/vf_denoise3d.o libmpcodecs/vf_detc.o libmpcodecs/vf_dint.o libmpcodecs/vf_divtc.o libmpcodecs/vf_down3dright.o libmpcodecs/vf_dsize.o libmpcodecs/vf_dvbscale.o libmpcodecs/vf_eq.o libmpcodecs/vf_eq2.o libmpcodecs/vf_expand.o libmpcodecs/vf_field.o libmpcodecs/vf_fil.o libmpcodecs/vf_filmdint.o libmpcodecs/vf_fixpts.o libmpcodecs/vf_flip.o libmpcodecs/vf_format.o libmpcodecs/vf_framestep.o libmpcodecs/vf_gradfun.o libmpcodecs/vf_halfpack.o libmpcodecs/vf_harddup.o libmpcodecs/vf_hqdn3d.o libmpcodecs/vf_hue.o libmpcodecs/vf_il.o libmpcodecs/vf_ilpack.o libmpcodecs/vf_ivtc.o libmpcodecs/vf_kerndeint.o libmpcodecs/vf_mirror.o libmpcodecs/vf_noformat.o libmpcodecs/vf_noise.o libmpcodecs/vf_ow.o libmpcodecs/vf_palette.o libmpcodecs/vf_perspective.o libmpcodecs/vf_phase.o libmpcodecs/vf_pp7.o libmpcodecs/vf_pullup.o libmpcodecs/vf_rectangle.o libmpcodecs/vf_remove_logo.o libmpcodecs/vf_rgbtest.o libmpcodecs/vf_rotate.o libmpcodecs/vf_sab.o libmpcodecs/vf_scale.o libmpcodecs/vf_smartblur.o libmpcodecs/vf_softpulldown.o libmpcodecs/vf_stereo3d.o libmpcodecs/vf_softskip.o libmpcodecs/vf_swapuv.o libmpcodecs/vf_telecine.o libmpcodecs/vf_test.o libmpcodecs/vf_tfields.o libmpcodecs/vf_tile.o libmpcodecs/vf_tinterlace.o libmpcodecs/vf_unsharp.o libmpcodecs/vf_vo.o libmpcodecs/vf_yadif.o libmpcodecs/vf_yuvcsp.o libmpcodecs/vf_yvu9.o libmpdemux/aac_hdr.o libmpdemux/asfheader.o libmpdemux/aviheader.o libmpdemux/aviprint.o libmpdemux/demuxer.o libmpdemux/demux_aac.o libmpdemux/demux_asf.o libmpdemux/demux_audio.o libmpdemux/demux_avi.o libmpdemux/demux_demuxers.o libmpdemux/demux_film.o libmpdemux/demux_fli.o libmpdemux/demux_lmlm4.o libmpdemux/demux_mf.o libmpdemux/demux_mkv.o libmpdemux/demux_mov.o libmpdemux/demux_mpg.o libmpdemux/demux_nsv.o libmpdemux/demux_pva.o libmpdemux/demux_rawaudio.o libmpdemux/demux_rawvideo.o libmpdemux/demux_realaud.o libmpdemux/demux_real.o libmpdemux/demux_roq.o libmpdemux/demux_smjpeg.o libmpdemux/demux_ts.o libmpdemux/demux_ty.o libmpdemux/demux_ty_osd.o libmpdemux/demux_viv.o libmpdemux/demux_vqf.o libmpdemux/demux_y4m.o libmpdemux/ebml.o libmpdemux/extension.o libmpdemux/mf.o libmpdemux/mp3_hdr.o libmpdemux/mp_taglists.o libmpdemux/mpeg_hdr.o libmpdemux/mpeg_packetizer.o libmpdemux/parse_es.o libmpdemux/parse_mp4.o libmpdemux/video.o libmpdemux/yuv4mpeg.o libmpdemux/yuv4mpeg_ratio.o osdep/getch2.o osdep/timer-linux.o stream/open.o stream/stream.o stream/stream_bd.o stream/stream_cue.o stream/stream_file.o stream/stream_mf.o stream/stream_null.o stream/url.o sub/eosd.o sub/find_sub.o sub/osd.o sub/spudec.o sub/sub.o sub/sub_cc.o sub/subreader.o sub/vobsub.o sub/font_load.o stream/stream_cdda.o stream/cdinfo.o stream/stream_cddb.o stream/stream_dvdnav.o stream/stream_dvd.o stream/stream_dvd_common.o libvo/aclib.o av_helpers.o av_opts.o libaf/af_lavcac3enc.o libaf/af_lavcresample.o libmpcodecs/ad_ffmpeg.o libmpcodecs/ad_spdif.o libmpcodecs/vd_ffmpeg.o libmpcodecs/vf_geq.o libmpcodecs/vf_lavc.o libmpcodecs/vf_lavcdeint.o libmpcodecs/vf_screenshot.o libmpdemux/demux_lavf.o stream/stream_ffmpeg.o sub/av_sub.o sub/font_load_ft.o libmpdemux/demux_gif.o libmpcodecs/vf_bmovl.o libaf/af_export.o osdep/mmap_anon.o libmpcodecs/vd_ijpg.o libmpcodecs/ad_liba52.o libmpcodecs/vf_ass.o sub/ass_mp.o sub/subassconvert.o libmpcodecs/ad_libdca.o libmpcodecs/ad_libmad.o stream/stream_smb.o libmpdemux/demux_mng.o libmpcodecs/ad_mpg123.o stream/stream_rtsp.o stream/freesdp/common.o stream/freesdp/errorlist.o stream/freesdp/parser.o stream/librtsp/rtsp.o stream/librtsp/rtsp_rtp.o stream/librtsp/rtsp_session.o stream/stream_netstream.o stream/asf_mmst_streaming.o stream/asf_streaming.o stream/cookies.o stream/http.o stream/network.o stream/pnm.o stream/rtp.o stream/udp.o stream/tcp.o stream/stream_rtp.o stream/stream_udp.o stream/realrtsp/asmrp.o stream/realrtsp/real.o stream/realrtsp/rmff.o stream/realrtsp/sdpplin.o stream/realrtsp/xbuffer.o libmpcodecs/vd_mpng.o libmpcodecs/vf_pp.o stream/cache2.o libmpcodecs/ad_libvorbis.o libmpdemux/demux_ogg.o libmpcodecs/vd_xanim.o libmpcodecs/vd_xvid4.o osdep/shmem.o -Wl,--version-script,binary.ver -Wl,-z,noexecstack -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-O2 -march=native -O3 -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -flto=8 -fuse-linker-plugin -pipe -fomit-frame-pointer -fno-stack-protector -w -fpie -pie -lncurses -lrt -lgnutls -lsmbclient -lpng -lz -lmng -ljpeg -lz -ljpeg -lgif -lasound -ldl -lpthread -ldvdread -lcdio_cdda -lcdio -lcdio_paranoia -lfreetype -lfontconfig -lass -lenca -lz -lbz2 -llzo2 -lmad -lvorbisenc -lvorbis -logg -lmpg123 -la52 -ldca -lswscale -lswresample -lavformat -lavcodec -lavutil -lpostproc -lxvidcore -lpthread -ldl -rdynamic -ldvdnav -lpthread -lm -lx264 -lpthread -lmp3lame
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/ccQPuP6l.ltrans12.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_map_factor'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/ccQPuP6l.ltrans12.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_map_factor'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/ccQPuP6l.ltrans12.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_map_factor'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/ccQPuP6l.ltrans12.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_map_factor'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/ccQPuP6l.ltrans12.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_80h'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/ccQPuP6l.ltrans12.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_80h'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/ccQPuP6l.ltrans12.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_80h'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/ccQPuP6l.ltrans12.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_80h'
collect2: error: ld returned 1 exit status
make: *** [Makefile:747: mencoder] Error 1
make: *** Waiting for unfinished jobs....
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/cckNglWk.ltrans18.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_map_factor'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/cckNglWk.ltrans18.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_map_factor'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/cckNglWk.ltrans18.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_map_factor'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/cckNglWk.ltrans18.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_map_factor'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/cckNglWk.ltrans18.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_80h'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/cckNglWk.ltrans18.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_80h'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/cckNglWk.ltrans18.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_80h'
/var/tmp/portage/media-video/mplayer-1.3.0-r3/temp/cckNglWk.ltrans18.ltrans.o::function render_frame_yuv420p_sse4: error: undefined reference to 'sse_int32_80h'
collect2: error: ld returned 1 exit status
make: *** [Makefile:747: mplayer] Error 1
emerge --info '=media-video/mplayer-1.3.0-r3::gentoo'
,emerge -pqv '=media-video/mplayer-1.3.0-r3::gentoo'
.Removing lto doesn't help here. Partial build.log:
/var/tmp/portage/x11-libs/wxGTK-3.0.3.1-r301/work/wxWidgets-3.0.3.1-abi_x86_64.amd64/bk-make-pch ./.pch/wxprec_xmldll/wx/wxprec.h.gch wx/wxprec.h x86_64-pc-linux-gnu-g++ -I./.pch/wxprec_xmldll -D__WX__ -DWXBUILDING -I/var/tmp/portage/x11-libs/wxGTK-3.0.3.1-r301/work/wxWidgets-3.0.3.1/src/regex -DwxUSE_GUI=0 -DWXUSINGDLL -DWXMAKINGDLL_XML -fPIC -DPIC -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/var/tmp/portage/x11-libs/wxGTK-3.0.3.1-r301/work/wxWidgets-3.0.3.1-abi_x86_64.amd64/lib/wx/include/base-unicode-3.0-gtk3 -I/var/tmp/portage/x11-libs/wxGTK-3.0.3.1-r301/work/wxWidgets-3.0.3.1/include -DWX_PRECOMP -pthread -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=both -fvisibility=hidden -fvisibility-inlines-hidden
rm -f /var/tmp/portage/x11-libs/wxGTK-3.0.3.1-r301/work/wxWidgets-3.0.3.1-abi_x86_64.amd64/lib/libwxregexu-3.0-gtk3.a
gcc-ar rc /var/tmp/portage/x11-libs/wxGTK-3.0.3.1-r301/work/wxWidgets-3.0.3.1-abi_x86_64.amd64/lib/libwxregexu-3.0-gtk3.a wxregex_regcomp.o wxregex_regexec.o wxregex_regerror.o wxregex_regfree.o
gcc-ranlib /var/tmp/portage/x11-libs/wxGTK-3.0.3.1-r301/work/wxWidgets-3.0.3.1-abi_x86_64.amd64/lib/libwxregexu-3.0-gtk3.a
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib64/crt1.o:function _start: error: undefined reference to 'main'
collect2: error: ld returned 1 exit status
make: *** [Makefile:15845: .pch/wxprec_xmldll/wx/wxprec.h.gch] Error 1
make: *** Waiting for unfinished jobs....
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib64/crt1.o:function _start: error: undefined reference to 'main'
collect2: error: ld returned 1 exit status
make: *** [Makefile:15549: .pch/wxprec_basedll/wx/wxprec.h.gch] Error 1
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib64/crt1.o:function _start: error: undefined reference to 'main'
collect2: error: ld returned 1 exit status
make: *** [Makefile:15586: .pch/wxprec_netdll/wx/wxprec.h.gch] Error 1
* ERROR: x11-libs/wxGTK-3.0.3.1-r301::THG failed (compile phase):
* emake failed
Please check net-misc/dhcp
, seems it's ok w/ graphite
and lto
.
Since it contains *.a
:
...
# Uncomment if you have problems with packages depends on net-misc/dhcp
# net-misc/dhcp lto/ltofat.conf
...
something like this can be added to workarounds
Removing lto doesn't help here. Partial build.log:
In file included from /usr/include/pango-1.0/pango/pango.h:46:0,
from /var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31/gdk/gdktypes.h:37,
from /var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31/gdk/gdkscreen.h:32,
from /var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31/gdk/gdkapplaunchcontext.h:31,
from /var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31/gdk/gdk.h:32,
from /var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31/gtk/gtkstyle.h:35,
from /var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31/gtk/gtkrc.h:35,
from /var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31/gtk/queryimmodules.c:40:
/usr/include/pango-1.0/pango/pango-utils.h:32:10: note: declared here
char ** pango_split_file_list (const char *str);
^
libtool: compile: /usr/bin/gcc-5.4.0 -m32 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31/gtk -I.. -DG_LOG_DOMAIN=\"Gtk\" -$
/var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31/gtk/gtkmountoperation-x11.c: In function ‘find_largest_sizes’:
/var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31/gtk/gtkmountoperation-x11.c:196:16: warning: variable ‘replace’ set but not used [-Wunused-but-set$
gboolean replace;
^
/bin/sh ../libtool --tag=CC --mode=link /usr/bin/gcc-5.4.0 -m32 -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=both -Wall -version-info $
libtool: link: /usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/gcc-nm .libs/gtkquery.o .libs/gtksearchengine.o .libs/gtksearchenginesimple.o .libs/fnmatch.o .libs/gtk$
libtool: link: /bin/grep -E -e "^[^_].*" ".libs/libgtk-x11-2.0.exp" > ".libs/libgtk-x11-2.0.expT"
libtool: link: mv -f ".libs/libgtk-x11-2.0.expT" ".libs/libgtk-x11-2.0.exp"
libtool: link: echo "{ global:" > .libs/libgtk-x11-2.0.ver
libtool: link: cat .libs/libgtk-x11-2.0.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libgtk-x11-2.0.ver
libtool: link: echo "local: *; };" >> .libs/libgtk-x11-2.0.ver
libtool: link: /usr/bin/gcc-5.4.0 -m32 -shared -fPIC -DPIC .libs/gtkquery.o .libs/gtksearchengine.o .libs/gtksearchenginesimple.o .libs/fnmatch.o .libs/gtk$
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: .libs/gtkmarshalers.o: multiple definition of 'g_cclosure_marshal_VOID__$
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/gtkmarshal.o: previous definition here
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: .libs/gtkmarshalers.o: multiple definition of 'g_cclosure_marshal_VOID__$
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/gtkmarshal.o: previous definition here
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: .libs/gtkmarshalers.o: multiple definition of 'g_cclosure_marshal_VOID__$
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/gtkmarshal.o: previous definition here
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: .libs/gtkmarshalers.o: multiple definition of 'g_cclosure_marshal_VOID(i$
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/gtkmarshal.o: previous definition here
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: .libs/gtkmarshalers.o: multiple definition of 'g_cclosure_marshal_VOID__$
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/gtkmarshal.o: previous definition here
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: .libs/gtkmarshalers.o: multiple definition of 'g_cclosure_marshal_VOID__$
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/gtkmarshal.o: previous definition here
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: .libs/gtkmarshalers.o: multiple definition of 'g_cclosure_marshal_VOID__$
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/gtkmarshal.o: previous definition here
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: .libs/gtkmarshalers.o: multiple definition of 'g_cclosure_marshal_VOID(i$
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/gtkmarshal.o: previous definition here
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:2426: libgtk-x11-2.0.la] Error 1
make[4]: Leaving directory '/var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31-abi_x86_32.x86/gtk'
make[3]: *** [Makefile:5081: all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31-abi_x86_32.x86/gtk'
make[2]: *** [Makefile:2340: all] Error 2
make[2]: Leaving directory '/var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31-abi_x86_32.x86/gtk'
make[1]: *** [Makefile:733: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/x11-libs/gtk+-2.24.31-r1/work/gtk+-2.24.31-abi_x86_32.x86'
make: *** [Makefile:625: all] Error 2
* ERROR: x11-libs/gtk+-2.24.31-r1::gentoo failed (compile phase):
* emake failed
Adding
media-libs/ilmbase *FLAGS+=-ffat-lto-objects
let's me emerge openexr again
Adding Graphite GCC flags without ISL emerged causes GCC failure. Perhaps you can add it as a dependancy.
Looking into this repository, I've seen an exception being made for packages which can end up being included inside an initramfs. (#31)
I'm not sure why the exception was necessary (I couldn't find the reason why genkernel was failing), but, assuming it's for good reasons, one should probably add sys-fs/zfs to the exception list for ZFS-based systems as well.
I'm not sure what I should be looking at....
6 tests failed again:
test_compileall test_pyexpat test_runpy test_support
test_threaded_import test_xmlrpc_net
make[1]: *** [Makefile:501: run_profile_task] Error 1
make[1]: Leaving directory '/var/tmp/portage/portage/dev-lang/python-3.4.6-r2/work/x86_64-pc-linux-gnu'
make: *** [Makefile:491: profile-opt] Error 2
* ERROR: dev-lang/python-3.4.6-r2::lto-overlay failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=dev-lang/python-3.4.6-r2::lto-overlay'`,
* the complete build log and the output of `emerge -pqv '=dev-lang/python-3.4.6-r2::lto-overlay'`.
* The complete build log is located at '/var/log/portage/dev-lang:python-3.4.6-r2:20180203-163814.log'.
* For convenience, a symlink to the build log is located at '/var/tmp/portage/portage/dev-lang/python-3.4.6-r2/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/portage/dev-lang/python-3.4.6-r2/temp/environment'.
* Working directory: '/var/tmp/portage/portage/dev-lang/python-3.4.6-r2/work/x86_64-pc-linux-gnu'
* S: '/var/tmp/portage/portage/dev-lang/python-3.4.6-r2/work/Python-3.4.6'
* --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
* LOG FILE: "/var/log/sandbox/sandbox-18419.log"
*
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line
F: open_wr
S: deny
P: /usr/lib64/python3.4/site-packages/__pycache__/test.try
A: /usr/lib64/python3.4/site-packages/__pycache__/test.try
R: /usr/lib64/python3.4/site-packages/__pycache__/test.try
C: ./python -m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_sundry test_curses test_distutils test_imaplib test_import test_asyncio
F: unlink
S: deny
P: /usr/lib64/python3.4/site-packages/__pycache__/test.try
A: /usr/lib64/python3.4/site-packages/__pycache__/test.try
R: /usr/lib64/python3.4/site-packages/__pycache__/test.try
C: ./python -m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_sundry test_curses test_distutils test_imaplib test_import test_asyncio
F: open_wr
S: deny
P: /usr/lib64/python3.4/site-packages/__pycache__/test.try
A: /usr/lib64/python3.4/site-packages/__pycache__/test.try
R: /usr/lib64/python3.4/site-packages/__pycache__/test.try
C: ./python -m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_sundry test_curses test_distutils test_imaplib test_import test_asyncio
F: unlink
S: deny
P: /usr/lib64/python3.4/site-packages/__pycache__/test.try
A: /usr/lib64/python3.4/site-packages/__pycache__/test.try
R: /usr/lib64/python3.4/site-packages/__pycache__/test.try
C: ./python -m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_sundry test_curses test_distutils test_imaplib test_import test_asyncio
* --------------------------------------------------------------------------------
>>> Failed to emerge dev-lang/python-3.4.6-r2, Log file:
Any of you people interested to gather on IRC as well?
Hey, just did a fresh emerge -e world and had troubles with media-libs/openjpeg-2.3.0. First it failed with lto, so I disabled it FLAGS-=-flto (sorry I didnt log the error) however later on after resuming emerge it failed again with the following error,
/tmp/portage/media-libs/openjpeg-2.3.0/work/openjpeg-2.3.0/src/lib/openjp2/dwt.c:2171:13: internal compiler error: in outer_projection_mupa, at graphite-sese-to-poly.c:1019
After disabling GRAPHITE as well, it compiled just fine. I can do a PR but looking at equery d openjpeg it seems like a common package and Im just wondering am I the only one with this error?
For LTO to work properly
/usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/liblto_plugin.so
has to point to the current active version of gcc, e.g. :
/usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/liblto_plugin.so
To fix or make sure the link is correct:
ln -sf /usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/liblto_plugin.so /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/
When you have a look at the configure output of python there is potential:
checking for --enable-optimizations... no
and further down the line
If you want a release build with all optimizations active (LTO, PGO, etc), please run ./configure --enable-optimizations
Do you see a way to incorporate that in your overlay?
This is a bit of a long running issue that unfortunately needs upstream support in order to fix. I'll detail it here for interested parties.
Upstream Gentoo bug: https://bugs.gentoo.org/603594
Upstream binutils bug: https://sourceware.org/bugzilla/show_bug.cgi?id=21479
The strip
utility in LTO builds will commonly emit errors like this for static archives:
x86_64-pc-linux-gnu-strip: /dev/shm/portage/sys-libs/zlib-1.2.8-r1/image/usr/lib64/stzjlms5/adler32.o: plugin needed to handle lto object
Originally I didn't think this was a problem since that should effectively make it a no-op. I was wrong, though -- it actually makes the static archive unusable (I believe this has something to do with the index).
The real solution to this will be introducing LTO support into strip
. However, a workaround is needed in the meantime. The linked upstream threads suggest a few options
ranlib
after strip
(requires a Portage patch, but it does seem to fix it... I'm unsure of the effects of this on non-LTO systems)-ffat-lto-objects
or remove -flto
(Obviously not ideal)@pchome has suggested a workaround that we'll be using in the meantime, which is to set the STRIP_MASK
variable to disable stripping static archives only (stripping binaries still). This is the best workaround right now until the upstream issues are sorted out. We can close this issue when things are handled properly upstream.
Something like:
for i in ${LIST}; do;
pkg-cat/pkg-name $i
to package.cflags/lto.check.tmp
emerge -1 pkg-cat/pkg-name -q
done
Maybe some flags like --keep-graphite
, --keep-lto
, or even --quick, -q
to do most common checks only.
It's ease to self write as one-string command but better to make standardised/supported and maybe redirect output to common "paste" services (app-text/pastebinit ?) to be included in bug report.
Nothing big, just figured I'd let you know.
Why not use this https://github.com/mrueg/repoman-travis ?
dev-lang/python-3.6.3-r2 hangs while building with lto on test_asyncio
, throwing an exception:
https://gist.github.com/8bd43d224a6097cbad7eb062661b6c6a
Important part:
0:01:52 load avg: 2.71 [ 25/400] test_asyncio
Executing <Task finished coro=<CoroutineTests.test_async_def_wrapped.<locals>.start() done, defined at /var/tmp/portage/dev-lang/python-3.6.3-r2/work/Python-3.6.3/Lib/test/test_asyncio/test_pep492.py:150> result=None created at /var/tmp/
portage/dev-lang/python-3.6.3-r2/work/Python-3.6.3/Lib/asyncio/base_events.py:446> took 0.419 seconds
Exception in thread Thread-85:
Traceback (most recent call last):
File "/var/tmp/portage/dev-lang/python-3.6.3-r2/work/Python-3.6.3/Lib/threading.py", line 916, in _bootstrap_inner
self.run()
File "/var/tmp/portage/dev-lang/python-3.6.3-r2/work/Python-3.6.3/Lib/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/var/tmp/portage/dev-lang/python-3.6.3-r2/work/Python-3.6.3/Lib/test/test_asyncio/test_streams.py", line 776, in server
sock.bind(('localhost', 0))
socket.gaierror: [Errno -2] Name or service not known
It installs after disabling lto in sys-config/...workarounds
`!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0-abi_x86_32.x86/ncursestw/config.log
ebuild.sh, line 124: Called src_configure
environment, line 3670: Called multilib-minimal_src_configure
configure: error: Cannot link test program for libdl
!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-libs/ncurses-6.0-r1/work/ncurses-6.0-abi_x86_64.amd64/ncursesw/config.log
environment, line 3670: Called multilib-minimal_src_configure
ebuild.sh, line 124: Called src_configure
I need to add
dev-python/notify-python *FLAGS-=-flto*
otherwise I get:
generating symbol list for `_pynotify.la'
gcc-nm .libs/pynotifymodule.o .libs/pynotify.o | | /bin/sed 's/.* //' | sort | uniq > .libs/_pynotify.exp
../libtool: eval: line 4037: syntax error near unexpected token `|'
../libtool: eval: line 4037: `gcc-nm .libs/pynotifymodule.o .libs/pynotify.o | | /bin/sed 's/.* //' | sort | uniq > .libs/_pynotify.exp'
make[2]: *** [Makefile:278: _pynotify.la] Error 2
make[2]: Leaving directory '/var/tmp/portage/dev-python/notify-python-0.1.1-r3/work/notify-python-0.1.1-python2_7/src'
make[1]: *** [Makefile:299: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-python/notify-python-0.1.1-r3/work/notify-python-0.1.1-python2_7'
make: *** [Makefile:209: all] Error 2
* ERROR: dev-python/notify-python-0.1.1-r3::gentoo failed (compile phase):
* emake failed
I noticed media-libs/mesa-17.2.3
failed to build while media-libs/mesa-17.2.2
was ok. Almost nothing changed in configs since last build and the only thing I remembered was -Wl,--as-needed
accidentally (?) missed when preparing system for LTO.
So a while ago LDFLAGS="-Wl,--hash-style=gnu ${CFLAGS}"
was copy-pasted from https://github.com/InBetweenNames/gentooLTO/blob/06cdb45ebfeddb6a91ec1d9fbf8dc611549db280/sys-config/ltoize/files/make.conf and then whole system was rebuilt w/ this. Until I noticed LDFLAGS="-Wl,--as-needed -Wl,--hash-style=gnu"
in current make.conf.lto
so copy-pasted into my make.conf again.
Busted:
libtool: link: x86_64-pc-linux-gnu-g++ -m32 -fvisibility=hidden -Werror=pointer-arith -Werror=vla -march=native -O3 -pipe -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -flto=3 -fuse-linker-plugin -Wall -fno-math-errno -fno-trapping-math -Wl,--as-needed -Wl,--hash-style=gnu -march=native -O3 -pipe -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -flto=3 -fuse-linker-plugin -o glsl_compiler glsl/main.o glsl/.libs/libstandalone.a -lz -lpthread -pthread
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/32/libstdc++.so: undefined reference to `pthread_create'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/32/libstdc++.so: undefined reference to `pthread_once'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/32/libstdc++.so: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:2111: glsl_compiler] Error 1
make[4]: Leaving directory '/var/tmp/portage/media-libs/mesa-17.2.3/work/mesa-17.2.3-abi_x86_32.x86/src/compiler'
I'm played a bit w/ this command directly in this directory and removing -Wl,--as-needed
from LDFLAGS did the trick.
I'm not sure is this related to LTO or to this https://bugs.gentoo.org/show_bug.cgi?id=as-needed bug list or misplaced library list in command.
Like my 3.4 failure, I've got no idea where to start. Thanks!
>>> Source compiled.
* --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
* LOG FILE: "/var/log/sandbox/sandbox-10633.log"
*
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line
F: open_wr
S: deny
P: /usr/lib64/python3.6/site-packages/__pycache__/test.try
A: /usr/lib64/python3.6/site-packages/__pycache__/test.try
R: /usr/lib64/python3.6/site-packages/__pycache__/test.try
C: ./python -m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_asyncio test_ctypes
F: unlink
S: deny
P: /usr/lib64/python3.6/site-packages/__pycache__/test.try
A: /usr/lib64/python3.6/site-packages/__pycache__/test.try
R: /usr/lib64/python3.6/site-packages/__pycache__/test.try
C: ./python -m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_asyncio test_ctypes
F: open_wr
S: deny
P: /usr/lib64/python3.6/site-packages/__pycache__/test.try
A: /usr/lib64/python3.6/site-packages/__pycache__/test.try
R: /usr/lib64/python3.6/site-packages/__pycache__/test.try
C: ./python -m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_asyncio test_ctypes
F: unlink
S: deny
P: /usr/lib64/python3.6/site-packages/__pycache__/test.try
A: /usr/lib64/python3.6/site-packages/__pycache__/test.try
R: /usr/lib64/python3.6/site-packages/__pycache__/test.try
C: ./python -m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_asyncio test_ctypes
* --------------------------------------------------------------------------------
`
Looks like the toolchain set we added recently has a name clash--we should probably rename this to something else or perhaps look at using the existing toolchain set. See this thread:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.