|
From: Tom H. <th...@cy...> - 2003-03-17 15:12:24
|
In message <XFM...@lu...>
Greg Hosler <ho...@lu...> wrote:
> I recently tried building an rpm for valgrind 1.0.4
> (http://developer.kde.org/~sewardj/) (the spec file is in the tar.bz2 file)
>
> the rpm spec file looks pretty innocent.
>
> at the end of the rpm build, during dependency checking I see:
>
>
> Requires: ld-linux.so.2 libc.so.6 /bin/sh /usr/bin/perl libc.so.6(GLIBC_2.0)
> libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.2) libc.so.6(GLIBC_2.1.3)
> libc.so.6(GLIBC_PRIVATE)
> Wrote: /home/hosler/WIP/rpmbuild/RPMS/valgrind-1.0.4-1.i386.rpm
>
> When I try to install the rpm (Red Hat 7.3, all eratta applied), I get the
> following error message:
>
> rpm -ivh valgrind-1.0.4-1.i386.rpm
> error: failed dependencies:
> libc.so.6(GLIBC_PRIVATE) is needed by valgrind-1.0.4-1
>
> Now the interesting thing is:
>
> # strings /lib/libc.so.6 | grep GLIBC_PRIVATE
> GLIBC_PRIVATE
>
> so the pre-requisite symbol is infact in the library, and
> /usr/lib/rpm/find-requires found it, get when rpm goes to install, it can't
> verify that the dependency is satisfied.
The symbols in question - there are actually two - are indeed present
in glibc, but recent releases have given them a version of GLIBC_PRIVATE
to indicate that they are for internal use only. The symbols in question
are:
__pthread_clock_gettime
__pthread_clock_settime
Both of these are referenced in valgrind's special libpthread.so and
hence are picked up by rpmbuild as dependencies. The problem is that
rpm knows that those are private symbols and doesn't consider that
the glibc package satisfies them, hence the error.
You can force the install with --no-deps and it will all run just
fine, or you can hack the package building to avoid adding that
dependency, which is what I do. I have this script in my RPM sources
directory as valgrind-find-requires:
#!/bin/sh
/usr/lib/rpm/find-requires "$@" | grep -v GLIBC_PRIVATE
and then I add this macro to my valgrind.spec file:
%define __find_requires %{_sourcedir}/valgrind-find-requires
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|