[PATCH] Look in Debian's multiarch libs too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



to fix libnl detection
---
Thanks Eric!

On Thu, Sep 13, 2012 at 06:18:39AM -0600, Eric Blake wrote:
> On 09/13/2012 01:15 AM, Guido Günther wrote:
> > 
> > Since this went in ./configure fails on Debian with a netcf linked
> > against libnl1:
> 
> Where does libnl.so live on your platform?  Is it just a matter of
> expanding the for loop to find the library to run ldd on?
> 
> > configure:66413: result: no
> > No package 'libnl-3.0' found
> > configure:66429: error: Package requirements (libnl-3.0) were not met:
> 
> Ah, I think I know how to fix this one.  PKG_CHECK_MODULES defaults to a
> fatal error unless we supply a non-empty fourth argument.  Does this
> patch do it?
> 
> diff --git i/configure.ac w/configure.ac
> index 690de2a..fd89bfc 100644
> --- i/configure.ac
> +++ w/configure.ac
> @@ -2924,7 +2924,7 @@ if test "$with_linux" = "yes"; then
>              PKG_CHECK_MODULES([LIBNL_ROUTE3], [libnl-route-3.0])
>              LIBNL_CFLAGS="$LIBNL_CFLAGS $LIBNL_ROUTE3_CFLAGS"
>              LIBNL_LIBS="$LIBNL_LIBS $LIBNL_ROUTE3_LIBS"
> -        ], []) ;;
> +        ], [:]) ;;
>      esac
>      if test "$have_libnl" = no; then
>          PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [

I checked for libnetcf.so which is in /usr/lib/ but not for libnl1 which
is already in a multiarch directory (`/usr/lib/i386-linux-gnu/libnl.so).
So this fixes it:

 configure.ac |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index b5666a5..dcbe14f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2908,7 +2908,7 @@ if test "$with_linux" = "yes"; then
     # (Setting LIBNL_CFLAGS is already used by PKG_CHECK_MODULES to
     # override any probing, so if it set, you know which libnl is in use.)
     libnl_ldd=
-    for dir in /usr/lib64 /usr/lib; do
+    for dir in /usr/lib64 /usr/lib /usr/lib/*/libnl.so; do
         if test -f $dir/libnetcf.so; then
             libnl_ldd=`(ldd $dir/libnetcf.so) 2>&1`
             break
-- 
1.7.10.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]