Bugzilla – Bug 1133088
LTO: glusterfs build fails
Last modified: 2019-04-24 09:11:44 UTC
Fails due to: [ 415s] collect2: error: ld returned 1 exit status The package uses symbol versioning: https://en.opensuse.org/openSUSE:LTO#Symbol_versioning
Better error output: [ 43s] libtool: link: gcc -shared -fPIC -DPIC .libs/api_la-glfs-master.o -Wl,-rpath -Wl,/home/abuild/rpmbuild/BUILD/glusterfs-5.5/libglusterfs/src/.libs -Wl,-rpath -Wl,/home/abuild/rpmbuild/BUILD/glusterfs-5.5/rpc/rpc-lib/src/.libs -Wl,-rpath -Wl,/home/abuild/rpmbuild/BUILD/glusterfs-5.5/rpc/xdr/src/.libs -Wl,-rpath -Wl,/home/abuild/rpmbuild/BUILD/glusterfs-5.5/api/src/.libs -Wl,-rpath -Wl,/usr/lib64 -L/home/abuild/rpmbuild/BUILD/glusterfs-5.5/libglusterfs/src/.libs -L/home/abuild/rpmbuild/BUILD/glusterfs-5.5/rpc/rpc-lib/src/.libs -L/home/abuild/rpmbuild/BUILD/glusterfs-5.5/rpc/xdr/src/.libs ../../libglusterfs/src/.libs/libglusterfs.so ../../rpc/rpc-lib/src/.libs/libgfrpc.so ../../rpc/xdr/src/.libs/libgfxdr.so ../../api/src/.libs/libgfapi.so -lacl /home/abuild/rpmbuild/BUILD/glusterfs-5.5/rpc/rpc-lib/src/.libs/libgfrpc.so /home/abuild/rpmbuild/BUILD/glusterfs-5.5/rpc/xdr/src/.libs/libgfxdr.so /home/abuild/rpmbuild/BUILD/glusterfs-5.5/libglusterfs/src/.libs/libglusterfs.so -ltirpc -lz -lm -luuid -lrt -ldl -lpthread -lcrypto -grecord-gcc-switches -O2 -fstack-protector-strong -flto=160 -g -g -grecord-gcc-switches -O2 -fstack-protector-strong -flto=160 -g -g -Wl,--no-undefined -Wl,-soname -Wl,api.so -Wl,-version-script -Wl,.libs/api.ver -o .libs/api.so [ 43s] /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/api.so.I7ryFP.ltrans0.ltrans.o: in function `notify': [ 43s] /home/abuild/rpmbuild/BUILD/glusterfs-5.5/api/src/glfs-master.c:68: undefined reference to `glfs_subvol_done' [ 43s] /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /home/abuild/rpmbuild/BUILD/glusterfs-5.5/api/src/glfs-master.c:95: undefined reference to `glfs_init_done' [ 43s] /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /home/abuild/rpmbuild/BUILD/glusterfs-5.5/api/src/glfs-master.c:104: undefined reference to `glfs_init_done' [ 43s] /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /home/abuild/rpmbuild/BUILD/glusterfs-5.5/api/src/glfs-master.c:109: undefined reference to `glfs_process_upcall_event'
Works without LTO, so it's a compiler bug or something.
(In reply to Jan Engelhardt from comment #2) > Works without LTO, so it's a compiler bug or something. Yes, it's a known limitation of the GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200