Bug 62391 - rpm --rebuild generates strange dependency on "CC"
rpm --rebuild generates strange dependency on "CC"
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
ftp://icarus.com/pub/eda/sdcc/sdcc-2....
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-03-30 21:34 EST by steve
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-30 21:34:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description steve 2002-03-30 21:34:29 EST
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 11:04:42 EST
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 16:56:56 EST
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 17:14:45 EST
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 17:17:33 EST
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 17:18:32 EST
No bug, it's a packaging problem, albeit subtle.

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