RPM Community Forums

Mailing List Message of <rpm-devel>

current glob approach is broken

From: Arkadiusz Miskiewicz <arekm@rpm5.org>
Date: Tue 29 Jul 2008 - 22:23:51 CEST
Message-Id: <200807292223.51882.arekm@rpm5.org>

Hello,

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.

-- 
Arkadiusz Miƛkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
Received on Tue Jul 29 22:23:54 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.