RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Segfault because librpmio is missing -lpcre

From: Arkadiusz Miskiewicz <arekm@pld-linux.org>
Date: Thu 01 Nov 2007 - 14:32:43 CET
Message-Id: <200711011432.43285.arekm@pld-linux.org>
On Thursday 01 of November 2007, Arkadiusz Miskiewicz wrote:
> On Thursday 01 of November 2007, Jeff Johnson wrote:
> > There's a segfault reported last week by arekm when rpm is compiled
> > to use PCRE because of a missing linkage from rpmmire in librpmio
> > to -lpcre.
> >
> > No idea whether miscompiled or actually missing.
> >
> > Could someone take a look please?
>
> -Wl,-as-needed is too smart here
>
> [arekm@tarm ~]$ gcc test.c -lpcre
> [arekm@tarm ~]$ objdump -p a.out | grep NEEDE
>   NEEDED      libpcre.so.0
>   NEEDED      libc.so.6
> [arekm@tarm ~]$ gcc test.c -Wl,-as-needed -lpcre
> [arekm@tarm ~]$ objdump -p a.out | grep NEEDE
>   NEEDED      libc.so.6
> [arekm@tarm ~]$

Hm, a mistake here. I should link with pcreposix not pcre.

rpm doesn't link to pcreposix at all (while it should when pcre is enabled)

> > 73 de Jeff

-- 
Arkadiusz Mi¶kiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
Received on Thu Nov 1 14:32:47 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.