RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/ configure.ac

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Thu 01 Nov 2007 - 20:17:44 CET
Message-ID: <20071101191744.GA16979@engelschall.com>
On Thu, Nov 01, 2007, Arkadiusz Miskiewicz wrote:

> [...]
>     Separate PCREREGEXP from PCRE usage.
> [...]
>        [PCRE], [pcre],
>        [pcre], [pcre_compile], [pcre.h],
>        [no,external:none], [],
>   -    [ AC_CHECK_HEADERS(pcreposix.h)
>   +    [
>          if test ".$WITH_LUA" = .yes; then
>              WITH_LUA_SUBDIR_DEF="$WITH_LUA_SUBDIR_DEF -DLUA_USE_PCRE"
>          fi
>        ], [])
>
>   +RPM_CHECK_LIB(
>   +    [PCREPOSIX], [pcreposix],
>   +    [pcreposix], [regcomp], [pcreposix.h],
>   +    [no,external:none], [],
>   +    [], [])
>   +
>   +

I understand what you are trying to do, but instead of separating
libpcre from libpcreposix, the better solution IMHO is to add the
missing AC_CHECK_LIB(pcreposix) check to the old RPM_CHECK_LIB()
of PCRE! Because RPM currently cannot use PCRE alone anyway and
libpcreposix cannot be used without libpcre, too.

So, what the Autoconf glue for PCRE _REALLY HAS TO_ check for is
whether _both_ <pcreposix.h> _and_ -lpcreposix are available and if
available also really link against -lpcreposix or not try to use PCRE's
POSIX API at all. AFAIK the segfault just occurred because RPM thought
<pcreposix.h> is available but forgot to link against the corresponding
-lpcreposix library and this way picked up the POSIX API from glibc.

I've now tried to implement this now in HEAD.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Thu Nov 1 20:22:09 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.