linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Does LVM2 support building with LTO enablement?
@ 2019-05-10  3:00 Gang He
  2019-05-14  6:25 ` Gang He
  0 siblings, 1 reply; 4+ messages in thread
From: Gang He @ 2019-05-10  3:00 UTC (permalink / raw)
  To: linux-lvm

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Does LVM2 support building with LTO enablement?
  2019-05-10  3:00 [linux-lvm] Does LVM2 support building with LTO enablement? Gang He
@ 2019-05-14  6:25 ` Gang He
  2019-05-14  8:00   ` Zdenek Kabelac
  0 siblings, 1 reply; 4+ messages in thread
From: Gang He @ 2019-05-14  6:25 UTC (permalink / raw)
  To: linux-lvm

Hello Guys,

Anybody touched this area? 

Thanks
Gang

>>> On 2019/5/10 at 11:00, in message
<5CD4E950020000F900064DCE@prv1-mh.provo.novell.com>, "Gang He" <ghe@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@redhat.com 
> https://www.redhat.com/mailman/listinfo/linux-lvm 
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Does LVM2 support building with LTO enablement?
  2019-05-14  6:25 ` Gang He
@ 2019-05-14  8:00   ` Zdenek Kabelac
  2019-05-14  9:02     ` Gang He
  0 siblings, 1 reply; 4+ messages in thread
From: Zdenek Kabelac @ 2019-05-14  8:00 UTC (permalink / raw)
  To: LVM general discussion and development, Gang He

Dne 14. 05. 19 v 8:25 Gang He napsal(a):
> Hello Guys,
> 
> Anybody touched this area?
> 
> Thanks
> Gang


Hi

I'll take a look - although it looks like the problem is possibly with libaio ?

Is libaio usable with -flto ?

ATM libaio is mandatory for building lvm2.

BTW - why do you need to use this option - lvm2 isn't really CPU cycle bounded 
  - if there is something slow it's typically some design issue - -flto will not
really improve things here...

Zdenek

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Does LVM2 support building with LTO enablement?
  2019-05-14  8:00   ` Zdenek Kabelac
@ 2019-05-14  9:02     ` Gang He
  0 siblings, 0 replies; 4+ messages in thread
From: Gang He @ 2019-05-14  9:02 UTC (permalink / raw)
  To: linux-lvm, zkabelac

Hi Zdenek,

The main motivation is to build the most opensuse rpms with LTO enablement, LVM2 is in the list.
I will try to compile the package with LTO enablement too.
Of course, if LVM2 does not support building with LTO enablement thoroughly, I think we need not to try.

Thanks
Gang

>>> On 2019/5/14 at 16:00, in message
<59ef89f8-9642-4455-cef0-450816eace0d@redhat.com>, Zdenek Kabelac
<zkabelac@redhat.com> wrote:
> Dne 14. 05. 19 v 8:25 Gang He napsal(a):
>> Hello Guys,
>> 
>> Anybody touched this area?
>> 
>> Thanks
>> Gang
> 
> 
> Hi
> 
> I'll take a look - although it looks like the problem is possibly with libaio 
> ?
> 
> Is libaio usable with -flto ?
> 
> ATM libaio is mandatory for building lvm2.
> 
> BTW - why do you need to use this option - lvm2 isn't really CPU cycle bounded 
> 
>   - if there is something slow it's typically some design issue - -flto will 
> not
> really improve things here...
> 
> Zdenek

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-14  9:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-10  3:00 [linux-lvm] Does LVM2 support building with LTO enablement? Gang He
2019-05-14  6:25 ` Gang He
2019-05-14  8:00   ` Zdenek Kabelac
2019-05-14  9:02     ` Gang He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).