[libvirt] Issue with building libvirt

Hello all, I have been facing an issue when building libvirt using the following steps: 1) ./autogen.sh --prefix=/usr/ --enable-compile-warnings=error 2) make 3) make install The issue is that the above steps puts the binary in /usr/lib instead of /usr/lib64 on a 64 bit OS (RHEL). [root@c6100l lib]# cat /etc/issue Red Hat Enterprise Linux Server release 6.2 (Santiago) Kernel \r on an \m [root@c6100l lib]# uname -r 2.6.32-220.el6.x86_64 [root@c6100l sshah]# cd /usr/lib [root@c6100l lib]# ll libvirt* -rw-r--r-- 1 root root 14156670 Jan 10 13:59 libvirt.a -rwxr-xr-x 1 root root 998 Jan 10 13:59 libvirt.la -rw-r--r-- 1 root root 75920 Jan 10 13:59 libvirt-qemu.a -rwxr-xr-x 1 root root 1053 Jan 10 13:59 libvirt-qemu.la lrwxrwxrwx 1 root root 21 Jan 10 13:59 libvirt-qemu.so -> libvirt-qemu.so.0.9.4 lrwxrwxrwx 1 root root 21 Jan 10 13:59 libvirt-qemu.so.0 -> libvirt-qemu.so.0.9.4 -rwxr-xr-x 1 root root 55148 Jan 10 13:59 libvirt-qemu.so.0.9.4 lrwxrwxrwx 1 root root 16 Jan 10 13:59 libvirt.so -> libvirt.so.0.9.4 lrwxrwxrwx 1 root root 16 Jan 10 13:59 libvirt.so.0 -> libvirt.so.0.9.4 -rwxr-xr-x 1 root root 7521681 Jan 10 13:59 libvirt.so.0.9.4 This leads to a whole list of other problems. Please may I ask for your help to resolve this issue? Many Thanks, Regards, Shradha Shah

On Tue, Jan 10, 2012 at 03:37:32PM +0000, Shradha Shah wrote:
Hello all,
I have been facing an issue when building libvirt using the following steps:
1) ./autogen.sh --prefix=/usr/ --enable-compile-warnings=error 2) make 3) make install
The issue is that the above steps puts the binary in /usr/lib instead of /usr/lib64 on a 64 bit OS (RHEL).
Yes, this is the default unhelpful behaviour of autotools. If you want to build with a configuration that matches what RPM would do, then we have a convenient '--system' arg that sets everything up as you would expect, eg ./autogen.sh --system --enable-compile-warnings=error Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Thanks Daniel. On 01/10/2012 03:47 PM, Daniel P. Berrange wrote:
On Tue, Jan 10, 2012 at 03:37:32PM +0000, Shradha Shah wrote:
Hello all,
I have been facing an issue when building libvirt using the following steps:
1) ./autogen.sh --prefix=/usr/ --enable-compile-warnings=error 2) make 3) make install
The issue is that the above steps puts the binary in /usr/lib instead of /usr/lib64 on a 64 bit OS (RHEL).
Yes, this is the default unhelpful behaviour of autotools.
If you want to build with a configuration that matches what RPM would do, then we have a convenient '--system' arg that sets everything up as you would expect, eg
./autogen.sh --system --enable-compile-warnings=error
Daniel

On 01/10/2012 08:37 AM, Shradha Shah wrote:
Hello all,
I have been facing an issue when building libvirt using the following steps:
1) ./autogen.sh --prefix=/usr/ --enable-compile-warnings=error 2) make 3) make install
The issue is that the above steps puts the binary in /usr/lib instead of /usr/lib64 on a 64 bit OS (RHEL).
That's the correct defaults, according to the GNU Coding Standards which autoconf uses in generating the configure script. The fact that configure is defaulting --libdir to ${prefix}/lib rather than your desired ${prefix}/lib64 means only that RHEL is buggy for not installing a config.site override that alters the defaults for it's particular choice of preferred libdir; but that's a distro bug [1] that affects much more than libvirt, and something that libvirt should not have to work around. It does NOT affect rpms built for the the distro, since rpms are correctly built with --libdir specified in the right location. Meanwhile, the correct way to fix things is by doing: ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --enable-compile-warnings=error In fact, you can even use: ./autogen.sh --system --enable-compile-warnings=error as short-hand for setting up _all_ the default paths (including other settings, like --sysconfdir=/etc) needed for installing a self-built libvirt into the default distro locations on Fedora-based distros, including RHEL. [1] https://bugzilla.redhat.com/show_bug.cgi?id=772997 -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Thanks Eric. On 01/10/2012 04:01 PM, Eric Blake wrote:
On 01/10/2012 08:37 AM, Shradha Shah wrote:
Hello all,
I have been facing an issue when building libvirt using the following steps:
1) ./autogen.sh --prefix=/usr/ --enable-compile-warnings=error 2) make 3) make install
The issue is that the above steps puts the binary in /usr/lib instead of /usr/lib64 on a 64 bit OS (RHEL).
That's the correct defaults, according to the GNU Coding Standards which autoconf uses in generating the configure script. The fact that configure is defaulting --libdir to ${prefix}/lib rather than your desired ${prefix}/lib64 means only that RHEL is buggy for not installing a config.site override that alters the defaults for it's particular choice of preferred libdir; but that's a distro bug [1] that affects much more than libvirt, and something that libvirt should not have to work around. It does NOT affect rpms built for the the distro, since rpms are correctly built with --libdir specified in the right location. Meanwhile, the correct way to fix things is by doing:
./autogen.sh --prefix=/usr --libdir=/usr/lib64 --enable-compile-warnings=error
In fact, you can even use:
./autogen.sh --system --enable-compile-warnings=error
as short-hand for setting up _all_ the default paths (including other settings, like --sysconfdir=/etc) needed for installing a self-built libvirt into the default distro locations on Fedora-based distros, including RHEL.
participants (3)
-
Daniel P. Berrange
-
Eric Blake
-
Shradha Shah