Bugzilla – Bug 1144032
LTO: Segmentation fault when trying to link gmsh
Last modified: 2020-12-15 10:31:09 UTC
/home/abuild/rpmbuild/BUILD/gmsh-4.4.1-source/Mesh/meshGFace.cpp: In function 'meshGeneratorPeriodic':
[ 331s] /home/abuild/rpmbuild/BUILD/gmsh-4.4.1-source/Mesh/meshGFace.cpp:2076:13: internal compiler error: Segmentation fault
[ 331s] 2076 | static bool meshGeneratorPeriodic(GFace *gf, int RECUR_ITER,
[ 331s] | ^
[ 331s] Please submit a full bug report,
[ 331s] with preprocessed source if appropriate.
[ 331s] See <https://bugs.opensuse.org/> for instructions.
[ 331s] make: *** [/tmp/cckDO69I.mk:293: /tmp/libgmsh.so.4.4.1.ERGAVv.ltrans97.ltrans.o] Error 1
[ 331s] make: *** Waiting for unfinished jobs....
[ 331s] lto-wrapper: fatal error: make returned 2 exit status
[ 331s] compilation terminated.
[ 331s] /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: error: lto-wrapper failed
[ 331s] collect2: error: ld returned 1 exit status
meshGeneratorPeriodic is a huge function which calls itself iteratively.
I can see the package is built now successfully. It looks to me that you're running out-of-memory..
I'm not so sure:
out-of-memory is normally only related to a segmentation fault if the stack
overflows, but the latter is unlikely to depend on the build machine used.
(GCC will abort with different messages if heap memory is exhausted)
Also, gmsh seems to use only a bit above 500MB max per cc1plus, which all
workers provide. So this segfault doesn't seem likely to be related to OOM.
OTOH without a reliable reproducer it's also unlikely we make progress.
So, I'm tempted to close this as WORKSFORME.
Works for me.
Linking only succeeds as LTO is disabled for now.
I can confirm it's a real ICE in fre. I've been reducing the test-case.
I've just created upstream bug for that.
Should be fixed now and the package uses -flto now.