Bug 8250 - rpm wrongly 'detects' required libraries
Summary: rpm wrongly 'detects' required libraries
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm-build
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-01-07 01:40 UTC by Dag Wieers
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2001-05-22 18:17:50 UTC

Attachments (Terms of Use)

Description Dag Wieers 2000-01-07 01:40:58 UTC
rpm shouldn't include the libraries that are defined in /etc/ld.so.preload
to it Requires:-data. (The same is true for libraries defined in the
environment-variable LD_PRELOAD)

the problem arises eg. when i socksify my system, which means i add


to /etc/ld.so.preload, after socksifying all my rpm's build on that machine
requires these libraries, which is not (necessarily) true. But in my case
all my builds fail to work on other machines. Which is a major annoyance.

Thanks in advance,

Comment 1 Jeff Johnson 2000-01-07 19:51:59 UTC
This is a problem with your build system environment, rather than a problem with
rpm. Rpm currently does *nothing* to fix and/or clean the build environment
while running scripts to accomplish a build, the idea being that the builder
has a much better understanding of the build system's needs than rpm could
ever hope to implement.

If you simply need a work around, try the following:

1) Get the currently generated dependencies of your package:
	rpm -qp --requires <your_package>

2) Turn off the auto-generation of requirements by adding to yout spec file:
	AutoReq: off

3) Manually add the requirements from 1) to your spec file:
	Requires: ...

Comment 2 Jeff Johnson 2001-07-29 15:49:25 UTC
I still think that managing the build system configuration is
outside the scope of rpm.

However, you can filter autogenerated dependencies by overriding
the /usr/lib/rpm/find-requires script, and using sed to remove undesired
dependencies as in the following script
	/usr/lib/rpm/find-requires | sed -s 's/libfoo.so.[0-9]*//'
Put the script someplace like /etc/rpm/find-requires, make executable, and
configure your build system
	echo "%__find_requires /etc/rpm/find-requires" >> /etc/rpm/macros

Note You need to log in before you can comment on or make changes to this bug.