Broken include/asm symlink in linux-headers-2.6.32-305-ec2

Bug #576558 reported by Anders Kaseorg
70
This bug affects 9 people
Affects Status Importance Assigned to Milestone
linux-ec2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The include/asm symlink in linux-headers-2.6.32-305-ec2 is broken. It points to asm-x86_64, which doesn’t exist:

$ ls -ld /usr/src/linux-headers-2.6.32-305-ec2/include/asm*
lrwxrwxrwx 1 root root 10 2010-05-06 13:58 /usr/src/linux-headers-2.6.32-305-ec2/include/asm -> asm-x86_64
lrwxrwxrwx 1 root root 50 2010-05-06 13:58 /usr/src/linux-headers-2.6.32-305-ec2/include/asm-generic -> ../../linux-headers-2.6.32-305/include/asm-generic
drwxr-xr-x 2 root root 4096 2010-05-06 13:58 /usr/src/linux-headers-2.6.32-305-ec2/include/asm-x86

This makes it impossible to build many kernel modules for ec2, such as anything that includes <linux/sched.h>:

$ cat > Makefile
obj-m = foo.o
$ cat > foo.c
#include <linux/module.h>
#include <linux/sched.h>
int init_module() { return 0; }
void cleanup_module() { }
$ make -C /lib/modules/2.6.32-305-ec2/build M=$PWD
make: Entering directory `/usr/src/linux-headers-2.6.32-305-ec2'
  CC [M] /tmp/foo/foo.o
In file included from /usr/src/linux-headers-2.6.32-305-ec2/arch/x86/include/asm/unistd.h:5,
                 from include/linux/unistd.h:7,
                 from /usr/src/linux-headers-2.6.32-305-ec2/arch/x86/include/asm/seccomp_64.h:4,
                 from /usr/src/linux-headers-2.6.32-305-ec2/arch/x86/include/asm/seccomp.h:4,
                 from include/linux/seccomp.h:8,
                 from include/linux/sched.h:80,
                 from /tmp/foo/foo.c:2:
/usr/src/linux-headers-2.6.32-305-ec2/arch/x86/include/asm/unistd_64.h:693:29: error: asm/asm-offsets.h: No such file or directory
make[1]: *** [/tmp/foo/foo.o] Error 1
make: *** [_module_/tmp/foo] Error 2
make: Leaving directory `/usr/src/linux-headers-2.6.32-305-ec2'

A real example is openafs (bug 576035).

Revision history for this message
Anders Kaseorg (andersk) wrote :
Changed in linux-ec2 (Ubuntu):
status: New → Confirmed
Revision history for this message
DooMMasteR (winrootkit) wrote :

wohoo got the same problem here -.- dkms for vbox e.g. fails

Revision history for this message
Jean-Philippe Roberge (jproberge) wrote :

Same problem here! I had to create symbolic links to fix that. I'm running Kernel 3.5.0-42-generic

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.