[Bug c++/85655] New: ICE with -flto and -O2 during IPA pass: cp lto1: internal compiler error: Segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85655 Bug ID: 85655 Summary: ICE with -flto and -O2 during IPA pass: cp lto1: internal compiler error: Segmentation fault Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: steffen at hauihau dot de Target Milestone: --- Created attachment 44072 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44072=edit reduced testcase Attached testcase (derived from MariaDB 10.3.6 sql/sys_vars.cc) produces an ICE with segmenatation fault. -flto with at least -O2 is needed to trigger the ICE. schlepptop ~ # g++ -flto -O2 /tmp/sys_vars.ii during IPA pass: cp lto1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.gentoo.org/> for instructions. lto-wrapper: fatal error: /usr/x86_64-pc-linux-gnu/gcc-bin/8.1.0/g++ returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: lto-wrapper failed collect2: error: ld returned 1 exit status schlepptop ~ # g++ -v Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/8.1.0/g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/8.1.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/gentoo/tmp/portage/sys-devel/gcc-8.1.0/work/gcc-8.1.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/8.1.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.1.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.1.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/8.1.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include/g++-v8 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/8.1.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 8.1.0 p1.0' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto --without-isl --enable-libsanitizer --enable-default-pie --enable-default-ssp Thread model: posix gcc version 8.1.0 (Gentoo 8.1.0 p1.0)
[Bug tree-optimization/68797] gcc -m32 does not finish when compiling test cases from PR66070
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68797 --- Comment #4 from Steffen Hau --- Issue is still present with GCc 5.4.0 Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/gentoo/tmp/portage/sys-devel/gcc-5.4.0/work/gcc-5.4.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 5.4.0 p1.0, pie-0.6.5' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto --with-isl --disable-isl-version-check --enable-libsanitizer Thread model: posix gcc version 5.4.0 (Gentoo 5.4.0 p1.0, pie-0.6.5) Gentoo has still no ebuild for GCC 6.x, so can't test at the moment.
[Bug tree-optimization/68797] gcc -m32 does not finish when compiling test cases from PR66070
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68797 --- Comment #2 from Steffen Hau --- I have isl-0.15 installed on my system.
[Bug tree-optimization/68797] New: gcc -m32 does not finish when compiling test cases from PR66070
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68797 Bug ID: 68797 Summary: gcc -m32 does not finish when compiling test cases from PR66070 Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: steffen at hauihau dot de Target Milestone: --- I tried to compile the test case from PR66070#c1 with no luck. gcc did not finish after 2 hours. I've executed: gcc -m32 -O2 -floop-interchange -c fram_gen.c -o /dev/null GCc Version: gcc version 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5)
[Bug tree-optimization/66070] [GRAPHITE] cc1 gets killed by OOM killer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66070 --- Comment #3 from Steffen Hau --- Could you please provide the corresponding revision which fixed the issue?
[Bug lto/50394] [meta-bug] Issues with building libreoffice with LTO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50394 --- Comment #31 from Steffen Hau steffen at hauihau dot de --- Just a short update. With LTO enabled, configure thinks I have a buggy GCC: checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)... yes configure: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility I've then added -ffat-lto-objects to my ${C,CXX,Ld}FLAGS and the warning disappeared. The build failes at the same place, but instead of a segmentation fault I now get a illegal instruction error: /bin/sh: line 1: 10795 Illegal instruction SAL_USE_VCLPLUGIN=svp LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$I/ure/lib:$I/program $I/program/gengal.bin -env:BRAND_BASE_DIR=file://$S/instdir -env:CONFIGURATION_LAYERS=xcsxcu:file://$I/share/registry -env:UNO_SERVICES=file://$W/Rdb/ure/services.rdb file://$W/ComponentTarget/comphelper/util/comphelp.component file://$W/ComponentTarget/configmgr/source/configmgr.component file://$W/ComponentTarget/drawinglayer/drawinglayer.component file://$W/ComponentTarget/framework/util/fwk.component file://$W/ComponentTarget/i18npool/util/i18npool.component file://$W/ComponentTarget/package/source/xstor/xstor.component file://$W/ComponentTarget/package/util/package2.component file://$W/ComponentTarget/sax/source/expatwrap/expwrap.component file://$W/ComponentTarget/sfx2/util/sfx.component file://$W/ComponentTarget/svgio/svgio.component file://$W/ComponentTarget/svx/util/svx.component file://$W/ComponentTarget/svx/util/svxcore.component file://$W/ComponentTarget/ucb/source/core/ucb1.component file://$W/ComponentTarget/ucb/source/ucp/file/ucpfile1.component file://$W/ComponentTarget/unoxml/source/service/unoxml.component -env:UNO_TYPES= file://$I/program/types/offapi.rdb file://$I/ure/share/misc/types.rdb -env:URE_INTERNAL_LIB_DIR=file://$I/ure/lib -env:LO_LIB_DIR=file://$I/program --build-tree --destdir file://$S/extras/source/gallery --name arrows --path $W/Gallery/arrows --filenames file://$RESPONSEFILE /home/gentoo/tmp/portage/app-office/libreoffice-4.4.2.2/work/libreoffice-4.4.2.2/solenv/gbuild/Gallery.mk:72: recipe for target '/home/gentoo/tmp/portage/app-office/libreoffice-4.4.2.2/work/libreoffice-4.4.2.2/workdir/Gallery/arrows.done' failed make[1]: *** [/home/gentoo/tmp/portage/app-office/libreoffice-4.4.2.2/work/libreoffice-4.4.2.2/workdir/Gallery/arrows.done] Error 132 make[1]: *** Waiting for unfinished jobs
[Bug tree-optimization/66070] New: cc1 gets killed by OOM killer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66070 Bug ID: 66070 Summary: cc1 gets killed by OOM killer Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: steffen at hauihau dot de Target Milestone: --- Created attachment 35496 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35496action=edit preprocessed source Compiling a 32 bit version libaacplus 2.0.2 failed after some time because the lto1 process for one of the ltrans portions gets killed by the kernel OOM killer. I've then disabled LTO for the build and detected, that the cc1 process compiling fram_gen.c gets also killed by the OOM killer. I went on by lastly disabling graphite and the file compiled fine independent of LTO enabled or disabled. Here is the cmdline which leads to the OOM invocation (LTO disabled): gcc -m32 -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -fno-lto -c fram_gen.i -fPIC -DPIC -o /dev/null Please let me know if and how I can help you further.
[Bug lto/52159] ICE when building qemu with GCC 4.7 trunk: cannot read LTO decls
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52159 Steffen Hau steffen at hauihau dot de changed: What|Removed |Added CC||steffen at hauihau dot de --- Comment #3 from Steffen Hau steffen at hauihau dot de --- I don't know wether this is a GCC issue, but I have recompiled all my packages on Gentoo with GCC 5.1.0 and LD Gold from binutils 2.25 and ran into the same error for Qemu 2.3.0: x86_64-pc-linux-gnu-g++ -I/usr/include/pixman-1 -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/libpng16 -I/usr/include/libusb-1.0 -I/home/gentoo/tmp/portage/app-emulation/qemu-2.3.0/work/qemu-2.3.0/tests -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-z,relro -Wl,-z,now -pie -m64 -Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -o qemu-img qemu-img.o async.o thread-pool.o nbd.o block.o blockjob.o main-loop.o iohandler.o qemu-timer.o aio-posix.o qemu-io-cmds.o qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o qemu-coroutine-sleep.o coroutine-ucontext.o block/raw_bsd.o block/qcow.o block/vdi.o block/vmdk.o block/cloop.o block/dmg.o block/bochs.o block/vpc.o block/vvfat.o block/qcow2.o block/qcow2-refcount.o block/qcow2-cluster.o block/qcow2-snapshot.o block/qcow2-cache.o block/qed.o block/qed-gencb.o block/qed-l2-cache.o block/qed-table.o block/qed-cluster.o block/qed-check.o block/vhdx.o block/vhdx-endian.o block/vhdx-log.o block/parallels.o block/blkdebug.o block/blkverify.o block/block-backend.o block/snapshot.o block/qapi.o block/raw-posix.o block/linux-aio.o block/null.o block/mirror.o block/nbd.o block/nbd-client.o block/sheepdog.o block/accounting.o block/write-threshold.o block/curl.o libqemuutil.a libqemustub.a -lz -lbz2 -laio -lcurl -lm -lgthread-2.0 -pthread -lglib-2.0 -lz -lrt -lz -lcap-ng -luuid -lutil lto1: error: two or more sections for .gnu.lto_fprintf.bea14a90a0409768 (null):0: confused by earlier errors, bailing out make: *** [/tmp/ccPpXBxT.ltrans11.ltrans.o] Error 1 make: *** Waiting for unfinished jobs lto-wrapper: fatal error: make returned 2 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: lto-wrapper failed collect2: error: ld returned 1 exit status The same happens with LD BFD. Only workaround is to disable LTO. GCC 4.9.2 doesn't show this error and compiles the code. I was able to break down the Object List to three files which reproduce the error reliably. I compiled the files with the --save-temps switch, but I'm not able, to reproduce the error with the resulting .i files because of other compiler errors like 'abc' does not name a type or error: 'xyz' was not declared in this scope. I'll attach the preprocessed sources as well as the commandline options I've used to compile and link. Please let me know if I need to provide further information. gcc -v Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.1.0/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.1.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/gentoo/tmp/portage/sys-devel/gcc-5.1.0/work/gcc-5.1.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.1.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.1.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.1.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.1.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/5.1.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 5.1.0 p1.0, pie-0.6.3' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable
[Bug lto/52159] ICE when building qemu with GCC 4.7 trunk: cannot read LTO decls
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52159 --- Comment #4 from Steffen Hau steffen at hauihau dot de --- Created attachment 35452 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35452action=edit preprocessed sources and minimal build script
[Bug lto/50394] [meta-bug] Issues with building libreoffice with LTO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50394 Steffen Hau steffen at hauihau dot de changed: What|Removed |Added CC||steffen at hauihau dot de --- Comment #30 from Steffen Hau steffen at hauihau dot de --- Hey Jan, I'm not able to successfully compile LO (4.4.2.2) with GCC 5.1.0. I'm getting segmentation faults when gengal.bin is executed: /bin/sh: line 1: 5682 Segmentation fault SAL_USE_VCLPLUGIN=svp LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$I/ure/lib:$I/program $I/program/gengal.bin -env:BRAND_BASE_DIR=file://$S/instdir -env:CONFIGURATION_LAYERS=xcsxcu:file://$I/share/registry -env:UNO_SERVICES=file://$W/Rdb/ure/services.rdb file://$W/ComponentTarget/comphelper/util/comphelp.component file://$W/ComponentTarget/configmgr/source/configmgr.component file://$W/ComponentTarget/drawinglayer/drawinglayer.component file://$W/ComponentTarget/framework/util/fwk.component file://$W/ComponentTarget/i18npool/util/i18npool.component file://$W/ComponentTarget/package/source/xstor/xstor.component file://$W/ComponentTarget/package/util/package2.component file://$W/ComponentTarget/sax/source/expatwrap/expwrap.component file://$W/ComponentTarget/sfx2/util/sfx.component file://$W/ComponentTarget/svgio/svgio.component file://$W/ComponentTarget/svx/util/svx.component file://$W/ComponentTarget/svx/util/svxcore.component file://$W/ComponentTarget/ucb/source/core/ucb1.component file://$W/ComponentTarget/ucb/source/ucp/file/ucpfile1.component file://$W/ComponentTarget/unoxml/source/service/unoxml.component -env:UNO_TYPES= file://$I/program/types/offapi.rdb file://$I/ure/share/misc/types.rdb -env:URE_INTERNAL_LIB_DIR=file://$I/ure/lib -env:LO_LIB_DIR=file://$I/program --build-tree --destdir file://$S/extras/source/gallery --name arrows --path $W/Gallery/arrows --filenames file://$RESPONSEFILE /home/gentoo/tmp/portage/app-office/libreoffice-4.4.2.2/work/libreoffice-4.4.2.2/solenv/gbuild/Gallery.mk:72: recipe for target '/home/gentoo/tmp/portage/app-office/libreoffice-4.4.2.2/work/libreoffice-4.4.2.2/workdir/Gallery/arrows.done' failed make[1]: *** [/home/gentoo/tmp/portage/app-office/libreoffice-4.4.2.2/work/libreoffice-4.4.2.2/workdir/Gallery/arrows.done] Error 139 make[1]: *** Waiting for unfinished jobs Any ideas?
[Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375 --- Comment #213 from Steffen Hau steffen at hauihau dot de --- Hi Jan, just a short Update: Firefox since version 30 as well as Thunderbird since version 31 both compile fine with LTO enabled without the need of any additional patches. The package size was reduced by 51% (firefox ~420MB - ~207MB) and 59% (thunderbird ~480MB - ~200MB). Both programs work as intended, no crashes or unexpected behaviour so far. Best regards, Steffen
[Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375 --- Comment #212 from Steffen Hau steffen at hauihau dot de --- Hi Jan, I have binutils version 2.24 with the patch from Markus Trippelsdorf for early plugin loading, so I have no wrappers for ar, nm and ranlib. I've also symlinked the liblto_plugin.so in binutils bfd-plugins directory. I'll try to apply the 3 patches you mentioned in your blog post and see wether they help, but I think they are not relevant for elfhack portion which is failing on my system. Which firefox version did you successfully compile?
[Bug lto/61291] New: libixion-0.5.0 unable to find boost thread library as lto1 crashes with segfault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61291 Bug ID: 61291 Summary: libixion-0.5.0 unable to find boost thread library as lto1 crashes with segfault Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: steffen at hauihau dot de The configure script of libixion tries to find the correct name of the boost thread library, but each try failes with a segmentation fault in lto1. Here is a snippet from config.log: configure:15933: x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -D_REENTRANT -DMDDS_HASH_CONTAINER_BOOST -D__IXION_BUILDING_DLL -g -Os -fvisibility=hidden -pthread conftest.cpp 5 configure:15933: $? = 0 configure:15990: x86_64-pc-linux-gnu-g++ -o conftest -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -D_REENTRANT -DMDDS_HASH_CONTAINER_BOOST -D__IXION_BUILDING_DLL -g -Os -fvisibility=hidden -pthread -Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -L/usr/local/lib -Wl,-R,/usr/local/lib -L/usr/local/lib64 conftest.o -lboost_thread-mt-1_55 -lboost_system-mt -pthread 5 /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find -lboost_thread-mt-1_55 lto1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See https://bugs.gentoo.org/ for instructions. lto-wrapper: /usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0/x86_64-pc-linux-gnu-g++ returned 1 exit status /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: lto-wrapper failed collect2: error: ld returned 1 exit status configure:15990: x86_64-pc-linux-gnu-g++ -o conftest -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -D_REENTRANT -DMDDS_HASH_CONTAINER_BOOST -D__IXION_BUILDING_DLL -g -Os -fvisibility=hidden -pthread -Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -L/usr/local/lib -Wl,-R,/usr/local/lib -L/usr/local/lib64 conftest.o -lboost_thread-mt -lboost_system-mt -pthread 5 lto1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See https://bugs.gentoo.org/ for instructions. lto-wrapper: /usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0/x86_64-pc-linux-gnu-g++ returned 1 exit status /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: lto-wrapper failed collect2: error: ld returned 1 exit status It even segfaults with non-existing libraries like boost_thread-mt-1_55. I've stripped it down to the usage of -Os together with -flto. Here is a minimal snippet of code which produces the error: #include boost/thread.hpp int main () { boost::thread t; boost::mutex m; ; return 0; } I've compiled it this way: x86_64-pc-linux-gnu-g++ -c -flto=5 -Os boost_gcc_lto_segfault.cpp x86_64-pc-linux-gnu-g++ -o boost_gcc_lto_segfault -flto=5 -fuse-linker-plugin boost_gcc_lto_segfault.o -lboost_thread-mt -lboost_system-mt Please let me know if you need further information. This is the output of gcc -v: Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/misc/gentoo/tmp/portage/sys-devel/gcc-4.9.0/work/gcc-4.9.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.9.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included
[Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375 Steffen Hau steffen at hauihau dot de changed: What|Removed |Added CC||steffen at hauihau dot de --- Comment #210 from Steffen Hau steffen at hauihau dot de --- Latest firefox 29.0.1 does not compile with LTO enabled (Gentoo/GCc 4.9.0). It fails in elfhack: make[5]: Entering directory '/home/misc/gentoo/tmp/portage/www-client/firefox-29.0.1/work/mozilla-release/obj-x86_64-pc-linux-gnu/build/unix/elfhack' elfhack /home/misc/gentoo/tmp/portage/www-client/firefox-29.0.1/work/mozilla-release/obj-x86_64-pc-linux-gnu/_virtualenv/bin/python /home/misc/gentoo/tmp/portage/www-client/firefox-29.0.1/work/mozilla-release/config/expandlibs_exec.py --depend .deps/elfhack.pp --target elfhack -- x86_64-pc-linux-gnu-g++ -o elfhack -march=native -pipe -ggdb -flto=5 -fuse-linker-plugin -mno-avx -std=gnu++0x -MD -MP -MF .deps/elfhack.pp -Wl,-O1 -Wl,--as-needed -march=native -pipe -ggdb -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags host_elf.o host_elfhack.o x86_64-pc-linux-gnu-gcc -o dummy dummy.o -lpthread -Wl,-O1 -Wl,--as-needed -march=native -pipe -ggdb -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -Wl,-z,noexecstack -Wl,-z,text -Wl,-rpath-link,/home/misc/gentoo/tmp/portage/www-client/firefox-29.0.1/work/mozilla-release/obj-x86_64-pc-linux-gnu/dist/bin -Wl,-rpath-link,/usr/lib x86_64-pc-linux-gnu-g++ -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -march=native -pipe -ggdb -flto=5 -fuse-linker-plugin -mno-avx -fno-strict-aliasing -fno-rtti -fno-math-errno -std=gnu++0x -pthread -pipe -fexceptions -DNDEBUG -DTRIMMED -O2 -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,-h,test-array.so -o test-array.so -lpthread -Wl,-O1 -Wl,--as-needed -march=native -pipe -ggdb -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -Wl,-z,noexecstack -Wl,-z,text -Wl,-rpath-link,/home/misc/gentoo/tmp/portage/www-client/firefox-29.0.1/work/mozilla-release/obj-x86_64-pc-linux-gnu/dist/bin -Wl,-rpath-link,/usr/lib test-array.o -nostartfiles x86_64-pc-linux-gnu-g++ -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -march=native -pipe -ggdb -flto=5 -fuse-linker-plugin -mno-avx -fno-strict-aliasing -fno-rtti -fno-math-errno -std=gnu++0x -pthread -pipe -fexceptions -DNDEBUG -DTRIMMED -O2 -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,-h,test-ctors.so -o test-ctors.so -lpthread -Wl,-O1 -Wl,--as-needed -march=native -pipe -ggdb -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -Wl,-z,noexecstack -Wl,-z,text -Wl,-rpath-link,/home/misc/gentoo/tmp/portage/www-client/firefox-29.0.1/work/mozilla-release/obj-x86_64-pc-linux-gnu/dist/bin -Wl,-rpath-link,/usr/lib test-ctors.o -nostartfiles === === If you get failures below, please file a bug describing the error === and your environment (compiler and linker versions), and use === --disable-elf-hack until this is fixed. === # Fail if the library doesn't have INIT .dynamic info readelf -d test-ctors.so | grep '(INIT)' 0x000c (INIT) 0x0 /home/misc/gentoo/tmp/portage/www-client/firefox-29.0.1/work/mozilla-release/obj-x86_64-pc-linux-gnu/build/unix/elfhack/elfhack -b -f test-ctors.so === === If you get failures below, please file a bug describing the error === and your environment (compiler and linker versions), and use === --disable-elf-hack until this is fixed. === # Fail if the library doesn't have INIT_ARRAY .dynamic info test-ctors.so: Reduced by 12096 bytes readelf -d test-array.so | grep '(INIT_ARRAY)' # Fail if the backup file doesn't exist [ -f 'test-ctors.so.bak' ] 0x0019 (INIT_ARRAY) 0x9790 # Fail if the new library doesn't contain less relocations /home/misc/gentoo/tmp/portage/www-client/firefox-29.0.1/work/mozilla-release/obj-x86_64-pc-linux-gnu/build/unix/elfhack/elfhack -b -f test-array.so test-array.so: [ $(objdump -R test-ctors.so.bak | wc -l) -gt $(objdump -R test-ctors.so | wc -l) ] Reduced by 12088 bytes # Fail if the backup file doesn't exist [ -f 'test-array.so.bak' ] # Fail if the new library doesn't contain less relocations [ $(objdump -R test-array.so.bak | wc -l) -gt $(objdump -R test-array.so | wc -l) ] # Will either crash or return exit code 1 if elfhack is broken LD_PRELOAD=/home/misc/gentoo/tmp/portage/www-client/firefox-29.0.1/work/mozilla-release/obj-x86_64-pc-linux-gnu/build/unix/elfhack/test-array.so /home/misc/gentoo/tmp/portage/www-client/firefox-29.0.1/work/mozilla-release
[Bug lto/60964] boost = 1.54 failes to compile with LTO enabled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60964 Steffen Hau steffen at hauihau dot de changed: What|Removed |Added URL||https://svn.boost.org/trac/ ||boost/ticket/9766 --- Comment #3 from Steffen Hau steffen at hauihau dot de --- I can confirm that replaceing -march=native with -march=corei7-avx solves the issue and boost compiles fine afterwards. Is a testcase still needed? I have no idea how to strip down the affected boost module to reproduce the issue. The developer is not able to reproduce the but he had another idea with adding target attributes to some functions to give gcc some hints. I'll try to compile boost with his patch and march=native to see if that helps. I've added the boost bug as reference.
[Bug lto/60964] New: boost = 1.54 failes to compile with LTO enabled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60964 Bug ID: 60964 Summary: boost = 1.54 failes to compile with LTO enabled Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: steffen at hauihau dot de Created attachment 32682 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32682action=edit Output of boost-1.55 build I tried to compile boost 1.55 on my gentoo system and it the log library failed with: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include/avx2intrin.h: In function ‘_ZN5boost3log11v2_mt_posix3aux20dump_data_wchar_avx2EPKvmRSt13basic_ostreamIwSt11char_traitsIwEE.part.4’: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include/avx2intrin.h:737:62: error: ‘__builtin_ia32_psrlwi256’ needs isa option -m32 return (__m256i)__builtin_ia32_psrlwi256 ((__v16hi)__A, __B); There are a lot more of these lines with other builtin. I've attached the build log. To command to reproduce the isse is: bjam -j3 -q -d+2 --user-config=user-config.jam -sICU_PATH=/usr --boost-build=tools/build/v2/ --prefix=../boost-1.55-build --layout=system threading=multi link=shared --with-log And the conent of the user-config.jam is (all in one line): using gcc : 4.8 : g++ : cflags-march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin cxxflags-march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -std=gnu++98 linkflags-Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags ; The error occurs under Gentoo (GCC 4.8.2) as well as under OpenSUSE 13.1 (GCC 4.8.1), both systems equipped with Core i7 Sandy Bridge. On an older AMD Athlon X2 with Ubuntu 14.04 I get an internal compiler error instead of the wrong isa error. Please let me know if you need further information.
[Bug lto/59183] New: configure of pdsh successfuly checks for function shl_load when lto is enabled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59183 Bug ID: 59183 Summary: configure of pdsh successfuly checks for function shl_load when lto is enabled Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: steffen at hauihau dot de Created attachment 31243 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31243action=edit Output directories with -save-temps of both gcc runs with disabled and enabled lto Hi all, I was running into an issue when I tried to compile pdsh 2.26 (a parallel shell, see https://computing.llnl.gov/linux/pdsh.html). When lto is enabled, configure successfully checks for function shl_load, but fails when lto is disabled. With enabled lto: gcc -o shl_load_test -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -save-temps shl_load_test.c gcc: warning: -pipe ignored because -save-temps specified gcc: warning: -pipe ignored because -save-temps specified [Leaving LTRANS /tmp/ccSSsJJ4.args] [Leaving LTRANS shl_load_test.ltrans.out] gcc: warning: -pipe ignored because -save-temps specified [Leaving LTRANS /tmp/cc259S6e.mk] [Leaving LTRANS shl_load_test.ltrans0.o] With disabled lto: gcc -o shl_load_test -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -save-temps shl_load_test.c gcc: warning: -pipe ignored because -save-temps specified shl_load_test.o:shl_load_test.c:function f: error: undefined reference to 'shl_load' shl_load_test.c:69: error: undefined reference to 'shl_load' collect2: error: ld returned 1 exit status The latter one is the desired result, as this function is not present on my system. I have this issue also with another package (libsidplay) where configure checks successfully for strnicmp and stricmp, which are both not present. Disabled lto here does also prevent configure from successfully checking for these two functions. I've compared the piece of code, which configure uses to check for these functions and it is identical to the code that the configure from pdsh uses to check for shl_load (replace shl_load with strnicmp/stricmp). Here is the output of gcc -v: COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.2/lto-wrapper Ziel: x86_64-pc-linux-gnu Konfiguriert mit: /home/misc/gentoo/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --with-cloog --disable-isl-version-check --enable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --with-multilib-list=m32,m64 --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/python --enable-checking=release --disable-libgcj --enable-libstdcxx-time --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.2 p1.0, pie-0.5.8' Thread-Modell: posix gcc-Version 4.8.2 (Gentoo 4.8.2 p1.0, pie-0.5.8) Please let me know wether you need more input/files from me.