[linux-lvm] Does LVM2 support building with LTO enablement?

Gang He ghe at suse.com
Tue May 14 06:25:50 UTC 2019


Hello Guys,

Anybody touched this area? 

Thanks
Gang

>>> On 2019/5/10 at 11:00, in message
<5CD4E950020000F900064DCE at prv1-mh.provo.novell.com>, "Gang He" <ghe at suse.com>
wrote:
> Hello List,
> 
> Our build team wants to build LVM2 with LTO enablement, but looks failed.
> The error message likes,
> 
> [   30s] gcc -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 
> -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables 
> -fstack-clash-protection -flto=160 -g -fPIC  -L../libdm -L../lib 
> -L../libdaemon/client -L../daemons/dmeventd -Wl,-z,relro,-z,now -pie -fPIE 
> -Wl,--export-dynamic -o lvm command.o dumpconfig.o formats.o lvchange.o 
> lvconvert.o lvconvert_poll.o lvcreate.o lvdisplay.o lvextend.o lvmcmdline.o 
> lvmdiskscan.o lvreduce.o lvremove.o lvrename.o lvresize.o lvscan.o 
> polldaemon.o pvchange.o pvck.o pvcreate.o pvdisplay.o pvmove.o pvmove_poll.o 
> pvremove.o pvresize.o pvscan.o reporter.o segtypes.o tags.o toollib.o 
> vgcfgbackup.o vgcfgrestore.o vgchange.o vgck.o vgcreate.o vgconvert.o 
> vgdisplay.o vgexport.o vgextend.o vgimport.o vgmerge.o vgmknodes.o lvpoll.o 
> vgimportclone.o vgreduce.o vgremove.o vgrename.o vgscan.o vgsplit.o  lvm.o \
> [   30s] 	-llvm-internal -ldevmapper-event -ldaemonclient  -ludev -ldl -lblkid 
> -ldevmapper -laio -lreadline 
> [   30s] 
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: 
> /tmp/lvm.vKOJS8.ltrans0.ltrans.o: in function `_async_wait':
> [   30s] 
> /home/abuild/rpmbuild/BUILD/LVM2.2.02.180/tools/device/bcache.c:268: 
> undefined reference to `io_getevents'
> [   30s] 
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: 
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../lib64/libaio.so: undefined 
> reference to `io_cancel'
> [   30s] collect2: error: ld returned 1 exit status
> [   30s] make[1]: *** [Makefile:143: lvm] Error 1
> [   30s] make[1]: Leaving directory 
> '/home/abuild/rpmbuild/BUILD/LVM2.2.02.180/tools'
> [   30s] make[1]: *** Waiting for unfinished jobs....
> [   30s] make[1]: Entering directory 
> '/home/abuild/rpmbuild/BUILD/LVM2.2.02.180/tools'
> [   30s]     [CC] liblvm2cmd.so
> 
> About LTO information, you can look at the links as below,
> https://lists.opensuse.org/opensuse-factory/2019-04/msg00320.html 
> https://en.opensuse.org/openSUSE:LTO 
> 
> 
> Thanks
> Gang
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com 
> https://www.redhat.com/mailman/listinfo/linux-lvm 
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/





More information about the linux-lvm mailing list