Bug 62391

Summary: rpm --rebuild generates strange dependency on "CC"
Product: [Retired] Red Hat Linux Reporter: steve
Component: rpm-buildAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: ftp://icarus.com/pub/eda/sdcc/sdcc-2.3.0-1.src.rpm
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-03-31 02:34:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description steve 2002-03-31 02:34:29 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.18 alpha)

Description of problem:
Writing a spec file for sdcc-2.3.0 is easy, and it builds src and binary rpms
fine, but find-requires generates a nonsense dependency on "CC"


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Download ftp://icarus.com/pub/eda/sdcc/sdcc-2.3.0-1.src.rpm
2.rpm --rebuild sdcc-2.3.0-1.src.rpm
3.Watch the strange dependencies
	

Actual Results:  In Requires:

Requires: ld-linux.so.2 libc.so.6.1 libm.so.6.1 libncurses.so.5 libnsl.so.1.1
libpanel.so.5 libstdc++-libc6.2-2.so.3 CC libc.so.6.1(GLIBC_2.0)
libc.so.6.1(GLIBC_2.1) libc.so.6.1(GLIBC_2.1.3) libm.so.6.1(GLIBC_2.0)

Where did the "CC" come from?

Expected Results:  That "CC" in the requirements does not belong there.


Additional info:

Comment 1 Jeff Johnson 2002-04-01 16:04:42 UTC
This is probably a packaging problem,
not an rpm problem.

Diagnose by installing into a build root
using
	rpm -bi --short-circuit
and then running find-requires manually
	find <RPM_BUILD_ROOT directory | /usr/lib/rpm/find-requires
(Note: substitute the path for the token "<RPM_BUILD_ROOT directory>")

Comment 2 steve 2002-04-06 21:56:56 UTC
I run find-reqiures on the build root as you suggest, and the following
is what I get. Where does that "CC" (and the blank line before it) come
from? It can't be a legitimate dependency.

icarus.com[1] % find . | /usr/lib/rpm/find-requires
ld-linux.so.2
libc.so.6.1
libm.so.6.1
libncurses.so.5
libnsl.so.1.1
libpanel.so.5
libstdc++-libc6.2-2.so.3

CC
libc.so.6.1(GLIBC_2.0)
libc.so.6.1(GLIBC_2.1)
libc.so.6.1(GLIBC_2.1.3)
libm.so.6.1(GLIBC_2.0)

Comment 3 steve 2002-04-06 22:14:45 UTC
Here's the bug. In appears that find-requires is catching some
Makefiles that were installed in the share/lib directory as
scripts and trying to find the interpreter. There is no #! line
in the makefile, but is changes the "CC = " line into a script
interpreter and generates the bogus CC dependency.

I can work around this by removing the Makefiles (I don't really
need them) but I insist that find-requires really does have a bug
here.


Comment 4 Jeff Johnson 2002-04-06 22:17:33 UTC
Either run find-requires with sh -x or
do
	find . -type f -exec grep -l CC {} \;
to find the file that contains the CC.

After finding the file, fix your build. rpm will
not look at non-executable files, so the "fix" may
be as simple as doing
	chmod -x <file>

Comment 5 Jeff Johnson 2002-04-06 22:18:32 UTC
No bug, it's a packaging problem, albeit subtle.