Re: debian libmilter location(s) Re: br-msk-openldap

From: Mike Markley <mike_at_markley.org>
Date: Sun, 7 Feb 2010 00:53:17 -0800

On Sun, Feb 07, 2010 at 07:31:09PM +1100, Daniel Black <daniel.subs_at_internode.on.net> wrote:
> On Saturday 06 February 2010 12:27:01 Mike Markley wrote:
> > I did, however, find a build issue: configure is setting CC to
> > $PTHREAD_CC right before AC_SEARCH_LIBS([smfi_register] ...), so the
> > test for libmilter alwaysf ails on my system. The PTHREAD_* variables
> > don't seem to be getting populated in any obvious place in configure.ac.
> >
> > I'm *guessing* that ACX_PTHREAD is what should be populating it,
> yes that's right
> > but isn't.
> > That should really generate a warning, at a minimum, or an error
> > if pthreads is stricly required on all operating systems. If not, then
> > the FOO=$PTHREAD_FOO assignments should at least be conditional.
> the PTHREAD* definations should be set approprately by the ACX_PTHREAD even if
> the pthread libraries aren't there or needed.
>
> > I'll see why I'm missing ACX_PTHREAD and then do some tests against
> > a real directory...
> ok its defined in m4/acx_pthread.m4
>
> on a lenny box:
> apt-get install libssl-dev libmilter-dev libldap2-dev buildessential m4
> autoconf automake m4
>
> autoreconf
> automake --add-missing
> ./configure
>
> checking for the pthreads library -lpthreads... no
> checking whether pthreads work without any flags... no
> checking whether pthreads work with -Kthread... no
> checking whether pthreads work with -kthread... no
> checking for the pthreads library -llthread... no
> checking whether pthreads work with -pthread... yes
>
> ....
> checking for milter library and includes... /usr
> checking for library containing smfi_register... no
> checking for library containing smfi_register... no
> configure: error: libmilter not found
>
> So I can replicate the fault.
>
> The debian locations for include files is found at /usr/include/libmilter/*
> The assumption is therefore that the libraries are in /usr/lib/libmilter*
> which its not. It is actually in /usr/lib/libmilter/libmilter*.
>
> its come up before:
> http://lists.opendkim.org/archive/opendkim/dev/2009/11/0230.html
> http://lists.opendkim.org/archive/opendkim/dev/2009/11/0233.html
>
> if only libmilter had pkg-config or debian has standard install locations :-)
> (or probably opendkim has a more throughout search for libmilter)

My libmilter isn't in /usr/lib/libmilter. $PTHREAD_CC is simply not set
when configure reaches the point of unilaterally setting $CC to it.
Compare a successful test from config.log (with $CC set to the default):

configure:23523: checking whether SHA256_DIGEST_LENGTH is declared
configure:23553: gcc -std=gnu99 -c -I/usr/include -g -O2 -I/usr/include -I/usr/include conftest.c >&5
configure:23560: $? = 0
configure:23575: result: yes

To the check for libmilter:
configure:23600: checking for milter library and includes
configure:23643: result: /usr
configure:23667: checking for library containing smfi_register
configure:23708: -o conftest -g -O2 -I/usr/include -L/usr/lib conftest.c >&5
./configure: line 23710: -o: command not found
configure:23715: $? = 127
configure: failed program was:
[...]

The Debian package deals with the alternate libmilter location via
LDFLAGS, and has since well before I brought it over from my dkim-milter
package, so the library location is a red herring here.

Another data point: ACX_PTHREAD is just sitting there in my configure.
m4 never saw fit to replace it with something else:

$ grep -n -A3 -B3 ACX_PTHREAD configure
20197-#
20198-# Check for how to compile threaded stuff
20199-#
20200:ACX_PTHREAD
20201-
20202-#
20203-# Checks for libraries

That's why I'm skeptical that my libtool version is the issue. If
ACX_PTHREAD relied on libtool to tell it information about libraries,
it'd be another story; in this case, however, ACX_PTHREAD is simply
never being processed.

With that said, if it's just an issue on my box, then it's not a big
one. It'd be nice if autoconf worked for all (or, if I'm not a corner
case, most) people, but the average user is never going to need to run
it.

-- 
Mike Markley <mike_at_markley.org>
Physics is like sex: sure, it may give some practical results, but
that's not why we do it.
- Richard Feynman
Received on Sun Feb 07 2010 - 08:53:29 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:32:52 PST