Re: Compile failure due to libwrap on Ubuntu 11.10

Alex Bennee <[email protected]> Mon, 19 Dec 2011 15:57:48 +0000
Newsgroups gmane.comp.db.rrdtool.devel
Message-ID <CAJ-05NMiQj9pPpx2xMJTjVhnu_5w2ErMBtjYh8FLJgviaBXJUQ@mail.gmail.com>
On 16 December 2011 16:35, Tobias Oetiker <[email protected]> wrote:
> Hi Alex,
>
> see r2241,r2242 I have modified the configure script to use standard
> techniques to deal with libwrap, ev this helps ...

I'm afraid not in my case. But it's not the autoconf logic that's
failing, it's the libtool call. If you look at
the .la file it's correct:

15:52 ajb@sloy/x86_64 [rrdtool.git-svn] >grep "wrap" src/librrd_th.la
dependency_libs=' -lpthread /usr/lib/libxml2.la -lm -lwrap
/usr/lib/libdbi.la -ldl -lpng12 -lpangocairo-1.0 -lpango-1.0
/usr/lib/x86_64-linux-gnu/libcairo.la -lgobject-2.0 -lglib-2.0'

It just never makes it to the final CC invocation.

In fact without the attached patch I see a failure in eval while
running configure:

Test Library Functions
checking for acos... no
checking for acos in -lm... yes
checking for round... yes
./configure: eval: line 13465: unexpected EOF while looking for matching `"'
./configure: eval: line 13466: syntax error: unexpected end of file

The code looks like:

eval `./libtool --config | grep pic_flag`
CFLAGS="$CFLAGS $pic_flag"

-- 
Alex, homepage: http://www.bennee.com/~alex/
http://www.half-llama.co.uk

_______________________________________________
rrd-developers mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
0002-configure.ac-be-a-little-more-careful-when-eval-ing-.patch (text/x-patch, 1.1 KB)
From fb85884b88035549371fd2a21481f987afbb3ae5 Mon Sep 17 00:00:00 2001
From: Alex Bennee <[email protected]>
Date: Mon, 14 Nov 2011 16:06:13 +0000
Subject: [PATCH 2/2] configure.ac: be a little more careful when "eval"ing
 shell output

At least on my system the old line gave:

pic_flag=" -fPIC -DPIC"
archive_cmds="\$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
            \$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"

Which is both badly quoted and broken.
---
 configure.ac |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8453a9e..3b920bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,7 +226,7 @@ AC_CHECK_FUNC(round, , AC_CHECK_LIB(m, round))
 
 
 dnl add pic flag in any case this makes sure all our code is relocatable
-eval `./libtool --config | grep pic_flag`
+eval `./libtool --config | grep pic_flag=`
 CFLAGS="$CFLAGS $pic_flag"
 
 
-- 
1.7.8