[libvirt] libvirt build failure with --disable-shared

Hi, I am facing an error with libvirt build where it fails if I try to disable shared libraries. Though I opened up the issue on gitlab, not sure if that was the right place to open one. Kindly do let me know if this should be opened up at some other place. Build failure with libvirt-4.1.0 using the command: CFLAGS="-fPIC" ./configure --enable-static --disable-shared --prefix=/home/ubuntu/libvirt-4.1.0/out https://gitlab.com/libvirt/libvirt/issues/1 - Rahul

On Thu, Mar 15, 2018 at 12:24:41AM -0400, Rahul Sharma wrote:
Hi,
I am facing an error with libvirt build where it fails if I try to disable shared libraries. Though I opened up the issue on gitlab, not sure if that was the right place to open one. Kindly do let me know if this should be opened up at some other place.
Build failure with libvirt-4.1.0 using the command: CFLAGS="-fPIC" ./configure --enable-static --disable-shared --prefix=/home/ubuntu/libvirt-4.1.0/out
As mentioned on the issue, building statically linked libvirt is not something we support or test. If it has ever worked in the past it is only be luck, not design. Libvirt depends on a huge set of libraries most of which are not even available as static builds in common distros. Those which do provide static versions, often still need to dynmamically load modules eg glibc loads NSS modules for domain/user/group name lookups. gnutls loads modules for hardware token / crypto plugins. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Hello Rahul, On Thu, 2018-03-15 at 00:24 -0400, Rahul Sharma wrote:
Hi,
I am facing an error with libvirt build where it fails if I try to disable shared libraries. Though I opened up the issue on gitlab, not sure if that was the right place to open one. Kindly do let me know if this should be opened up at some other place.
No bug report on gitlab will ever be read, see yours in #1 ;) Read this page for more infos on how to report a bug: https ://libvirt.org/bugs.html
Build failure with libvirt-4.1.0 using the command: CFLAGS="-fPIC" ./configure --enable-static --disable-shared --prefix=/home/ubuntu/libvirt-4.1.0/out
Building only static libs looks fishy to me... what is the reason behing that? virDomainLifecycleTypeToString is declared by the VIR_ENUM_DECL macro and implemented by VIR_ENUM_IMPL one. The VIR_ENUM_IMPL for that type can be found in both tools/virsh-domain.c and src/conf/domain_conf.c, hence the error. I'm not sure virsh should be built with static libvirt libs at all. -- Cedric
- Rahul -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
participants (3)
-
Cedric Bosdonnat
-
Daniel P. Berrangé
-
Rahul Sharma