Bug 14666 - missing symlinks in kernel-headers causes compiles to fail
Summary: missing symlinks in kernel-headers causes compiles to fail
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 6.2
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Pete Zaitcev
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-07-26 15:16 UTC by Paul C. DeLong
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-07-27 21:02:36 UTC
Embargoed:


Attachments (Terms of Use)
gzipped tar of text files containing command output from rpm command-lines (68.38 KB, application/x-gzip)
2000-07-27 18:14 UTC, Paul C. DeLong
no flags Details

Description Paul C. DeLong 2000-07-26 15:16:00 UTC
In the process of upgrading the "kernel-headers" RPM from v2.2.14-5.0 to
v2.2.16-3, two symlinks which were present in the previous version are now
absent in the current version.  Without these symlinks, certain compiles
fail.  Specifically, any C code which includes the header file
"/usr/include/sys/param.h" will fail to compile.  The missing symlinks
in-question are the following:

   /usr/include/asm -> ../src/linux/include/asm
   /usr/include/linux -> ../src/linux/include/linux

Here is a contrived code example (which will fail to build):

#include <stdio.h>
#include <sys/param.h>

int main() {
  printf("Hello world\n");
}

PS: What's the point of the "Component Text" field in the bugzilla page if
I can't submit a component that isn't in the list?  I tried submitting
"kernel-headers", but I got rejected and had to type the whole Description
over again.  Pain in my ass...

Comment 1 Bob Matthews 2000-07-26 17:43:31 UTC
I can not reproduce this bug.  Installing "kernel-headers-2.2.16-i386.rpm" on my
machine
results in correct symlinks.  Furthermore, a quick check of the rpm SPEC file
shows the 
following commands being executed:

cd /usr/include
rm -f linux asm
ln -snf ../src/linux/include/linux linux
ln -snf ../src/linux/include/asm asm

Were you running as root when you installed the rpm?

Comment 2 Paul C. DeLong 2000-07-26 18:11:00 UTC
I was running as "root" when I installed the RPM.  However, unless you made a
typo in your reply to me, it looks like you installed a different RPM than I
did.  I installed the RPM "kernel-headers-2.2.16-3.i386.rpm", whereas you're
telling me that you installed an RPM by the name
"kernel-headers-2.2.16-i386.rpm"  (it's missing the "-3" suffix to the "2.2.16"
version number).  And when I do an "rpm -qlp" on the file, the two symlinks
in-question are missing from the list.

As far as I'm aware, this is the latest binary kernel RPM file.  I got it off of
the tux.org mirror, but I think it was also the latest according to a search I
did on the RedHat updates page.  I'll check again to see if another update was
slipped by since I last checked.  Are you sure you're using the latest RPM?


Comment 3 Bob Matthews 2000-07-26 19:22:08 UTC
You are right about the typo.  However, I still get correct behavior from this
RPM.  Please execute the command:

rpm -U -vv --force kernel-headers-2.2.16-3.i386.rpm

and attach the last 50 or so lines of output to this bug report, along with the
output of a 'uname -a' command.

Comment 4 Paul C. DeLong 2000-07-27 18:14:20 UTC
Created attachment 1613 [details]
gzipped tar of text files containing command output from rpm command-lines

Comment 5 Paul C. DeLong 2000-07-27 18:19:11 UTC
Okay, I attached a gzipped-tar of command output that would help debug the
problem.

However, there were two snags.  Firstly, in order for it to be useful, I gave
more than just the last 50 lines of the rpm command output.  Also, the command
you told me to use failed due to dependency problems, so I had to install both
"kernel-headers" and "kernel-source" on the same command-line.


Comment 6 Bob Matthews 2000-07-27 20:26:35 UTC
The output that you included shows that the symlinks were created on your
machine.  From
the file typescript.3.txt:

...
D: running preinstall script (if any)
kernel-headers-2.2.16-3
GZDIO:     467 reads,  3817852 total bytes in 0.009 secs
D: running postinstall scripts (if any)
+ cd /usr/src
+ rm -f linux
+ ln -snf linux-2.2.16 linux
+ cd /usr/include
+ rm -f linux asm
+ ln -snf ../src/linux/include/linux linux
+ ln -snf ../src/linux/include/asm asm
...

Comment 7 Paul C. DeLong 2000-07-27 21:02:33 UTC
Okay, I didn't notice that earlier.

But that's on lines 1498 and 1499.  Later on in "transcript.3.txt", on lines
2870 and 2871, the symlinks get removed again.  It looks like there's an
"order-of-operations" problem going on here.  Perhaps the symlinks want to be
created in the "postuninstall" stage.

...
D:    file: /usr/src/linux-2.2.14/README.kernel-sources action: remove
D:    file: /usr/src/linux-2.2.14 action: remove
cannot remove /usr/src/linux-2.2.14 - directory not empty
D:    file: /usr/include/linux action: remove
D:    file: /usr/include/asm action: remove
D:    file: /boot/kernel.h action: remove
D: running postuninstall script (if any)
+ [ -L /usr/src/linux ]
++ ls -l /usr/src/linux
++ awk { print $11 }
+ [ linux-2.2.16 = linux-2.2.14 ]
+ exit 0
D: removing database entry
...


Comment 8 Paul C. DeLong 2000-07-28 05:36:02 UTC
It looks like you forgot to enter a comment explaining why the bug is 
resolved.  Is a new RPM being released with the bug fix?
_____

Please go to this URL:

http://www.redhat.com/swr/i386/kernel-headers-2.2.16-3.i386_fl.html

This file list does not show the symlinks:

/usr/include/asm
/usr/include/linux



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