Bug 1133088 - LTO: glusterfs build fails
Summary: LTO: glusterfs build fails
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Martin Liška
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1133084
  Show dependency treegraph
 
Reported: 2019-04-23 11:15 UTC by Martin Liška
Modified: 2019-04-24 09:11 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2019-04-23 11:15:21 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
Comment 1 Martin Liška 2019-04-23 11:20:03 UTC
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'
Comment 2 Jan Engelhardt 2019-04-24 06:41:11 UTC
Works without LTO, so it's a compiler bug or something.
Comment 3 Martin Liška 2019-04-24 09:11:44 UTC
(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