I have machine with 32GiB RAM, so I don't think that RAM shortage might
be an issue.
VTK ( https://vtk.org/download/) version 8.2.0
I just copied existing vtk-8.1.0 ebuild to vtk-8.2.0.ebuild
and emerged that. It doesn't go far outside vanilla stuff, it pretty
much does what I'd do when compiling manuallly.
Emerge with ordinary "-march=native -O3 pipe" CFLAGS works fine.
But when I try to compile it with LTO flags:
CFLAGS="-march=native -pipe -O3 -flto=1 -ffat-lto-objects -pipe
-fuse-linker-plugin -fno-delete-null-pointer-checks"
CXXFLAGS="${CFLAGS} -fpermissive"
LDFLAGS="-Wl,-O3 -Wl,--sort-common -Wl,-flto=1 -Wl,--as-needed
-ffat-lto-objects -fno-delete-null-pointer-checks"
it fails with:
[ 16%] Building CXX object
Common/Core/CMakeFiles/vtkCommonCore.dir/vtkTypeFloat64Array.cxx.o
cd
/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/vtk-8.2.0_build/Common/Core
&& /usr/bin/x86_64-pc-linux-gnu-g++ -DVTK_IN_VTK -DvtkCommonCore_EXPORTS
-I/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/vtk-8.2.0_build/Common/DataModel
-I/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/vtk-8.2.0_build/Common/Core
-I/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/VTK-8.2.0/Common/Core
-I/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/vtk-8.2.0_build/Utilities/KWIML
-I/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/VTK-8.2.0/Utilities/KWIML
-I/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/vtk-8.2.0_build/Utilities/KWSys
-I/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/VTK-8.2.0/Utilities/KWSys
-I/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/vtk-8.2.0_build/ThirdParty/utf8
-I/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/VTK-8.2.0/ThirdParty/utf8
-D__STDC_CONSTANT_MACROS -D_UNICODE -march=native -pipe -O3 -flto=1
-ffat-lto-objects -pipe -fuse-linker-plugin
-fno-delete-null-pointer-checks -fpermissive -fPIC
-fvisibility=hidden -std=c++11 -o
CMakeFiles/vtkCommonCore.dir/vtkTypeFloat64Array.cxx.o -c
/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/vtk-8.2.0_build/Common/Core/vtkTypeFloat64Array.cxx
during RTL pass: ira
In file included from
/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/VTK-8.2.0/Common/Core/vtkGenericDataArray.h:353,
from
/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/VTK-8.2.0/Common/Core/vtkSOADataArrayTemplate.h:32,
from
/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/VTK-8.2.0/Common/Core/vtkSOADataArrayTemplate.txx:19,
from
/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/VTK-8.2.0/Common/Core/vtkSOADataArrayTemplateInstantiate.cxx:23:
/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/VTK-8.2.0/Common/Core/vtkGenericDataArray.txx:
In member function ‘vtkGenericDataArray<vtkSOADataArrayTemplate<unsigned
long>, unsigned long>::InsertNextTuple(double const*)’:
/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/VTK-8.2.0/Common/Core/vtkGenericDataArray.txx:699:1:
internal compiler error: Segmentation fault
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
make[2]: *** [Common/Core/CMakeFiles/vtkCommonCore.dir/build.make:2276:
Common/Core/CMakeFiles/vtkCommonCore.dir/vtkSOADataArrayTemplateInstantiate.cxx.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory
'/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/vtk-8.2.0_build'
make[1]: *** [CMakeFiles/Makefile2:300:
Common/Core/CMakeFiles/vtkCommonCore.dir/all] Error 2
make[1]: Leaving directory
'/var/tmp/portage/sci-libs/vtk-8.2.0-r4/work/vtk-8.2.0_build'
make: *** [Makefile:130: all] Error 2
* ERROR: sci-libs/vtk-8.2.0-r4::mine failed (compile phase):