RPM Community Forums

Mailing List Message of <rpm-devel>

Re: current glob approach is broken

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Wed 30 Jul 2008 - 08:24:34 CEST
Message-ID: <20080730062434.GB6094@engelschall.com>
On Tue, Jul 29, 2008, Arkadiusz Miskiewicz wrote:

> Current glob() approach is unfortunately broken on Linux systems that use
> shared librares (and sometimes --as-needed).
>
> The glibc glob.h header on 64bit is doing:
> # define glob glob64
> which means glob in rpmmisc is not used.
>
> On 32bit without largefile enabled there is another problem - --as-needed flag
> causes that linker will happily avoid linking to librpmmisc because glibc
> already provides glob() symbol. In the end glibc glob() will be used.
>
> These issues can be solved by explictly renaming glob to for example rpm_glob
> (+ rpm_globfree + rpm_glob_t type). Then it's 100% sure that internal glob
> will be used and no symbol clash can happen.

Yes, using an rpm_ prefix is certainly the best approach for those
problems. Try to come up with a patch on HEAD, but please do not too
fast merge those things onto 5.1. Let us review those types of changes
before on HEAD, please.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Wed Jul 30 08:30:10 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.