No rule to make target 'asm-offsets.c' during make modules_prepare

Bug #233950 reported by wyldfury
32
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Below are the commands run and the error that came up during "make modules_prepare". This is being done on a machine recently upgraded to 8.04 from 7.10.

#uname -r
2.6.24-16-server
#cd /usr/src/linux-headers-2.6.24-16-server
#make mrproper
#cp /boot/config-2.6.24-16-server .config
#make modules_prepare
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
make[1]: *** No rule to make target `arch/x86/kernel/asm-offsets.c', needed by `arch/x86/kernel/asm-offsets.s'. Stop.
make: *** [prepare0] Error 2

Revision history for this message
Frederik Kriewitz (freddy436) wrote :

Same problem here.
make[1]: *** No rule to make target `arch/x86/kernel/asm-offsets.c', needed by `arch/x86/kernel/asm-offsets.s'. Stop.
The error only occures when using the config files from /boot

Revision history for this message
Jeffrey Knight (jeffrey-knight) wrote :

I get the same thing when making the headers. As a workaround, try installing linux source (i.e. aptitude install linux-source-2.6.24) and:
$ sudo make oldconfig
$ sudo make prepare (or mrproper)
This does not give the same error.

Revision history for this message
Mateus Marcelino (vdarkn) wrote :

I got almost the same error when I was making the Lucent/Agere modem driver (winmodem):

mateus@AMD64:~/Linux/agrsmUb$ sudo make module
make -C /lib/modules/2.6.24-16-generic/build SUBDIRS= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic'
  CHK include/linux/version.h
  CHK include/linux/utsrelease.h
make[2]: *** No rule to make target `arch/x86/kernel/asm-offsets.c', needed by `arch/x86/kernel/asm-offsets.s'. Stop.
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic'
make: *** [module] Error 2

I think it is a bug

Revision history for this message
Mike Rutter (dancingeek) wrote :

I get the same error when trying to build the Cisco VPN Client. This is blocking me being able to work from outside the office.

Revision history for this message
Mateus Marcelino (vdarkn) wrote :

I solved my problem... it was a simple permission problem. All you need to do is to chmod +x the entire folder... (chmod -R +x FolderName).

Dont know if this is the answer for all problems, but for mine it solved.

Cya

Revision history for this message
Jeffrey Knight (jeffrey-knight) wrote :

Hack to fix VPNC "breaking" on upgrades:

If you're having the problem that auto-updates, every time they update your linux version, "break" VPNC, try this:

find your "last known good" /lib/modules directory, i.e. /lib/modules/2.6.24-17-generic, and either copy or symbolically link
/lib/modules/2.6.24-17-generic/CiscoVPN to your newer lib dir. i.e.:

cp /lib/modules/2.6.24-17-generic/CiscoVPN /lib/modules/$(uname -r)/CiscoVPN

This simply gets around the need to constantly rebuild vpnc on each upgrade.

Hope this helps some people with broken vpnc,
Jeff

Revision history for this message
Andre Kulju (altrium-223) wrote :

Same here and non of your fixes helps me... im trying to make a custom kernel from the guide http://ubuntuforums.org/showthread.php?t=56835http://ubuntuforums.org/showthread.php?t=56835

Revision history for this message
Spock (mjurczuk) wrote :

I'm trying to build 3w-9xxx module from 3ware (driver shipped with Ubuntu kernel is oooold and there is no support for my HW RAID):
---
root@devel-ubuntu:~/driver# make
make V=1 -I/lib/modules/2.6.24-19-xen/build/drivers/scsi -C /lib/modules/2.6.24-19-xen/build SUBDIRS=/home/spock/driver modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-xen'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
        echo; \
        echo " ERROR: Kernel configuration is invalid."; \
        echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
        echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
        echo; \
        /bin/false)
mkdir -p /home/spock/driver/.tmp_versions ; rm -f /home/spock/driver/.tmp_versions/*

  WARNING: Symbol version dump /usr/src/linux-headers-2.6.24-19-xen/Module.symvers
           is missing; modules will have no dependencies and modversions.

--

make prepare gives the same result as for above users:

root@devel-ubuntu:/usr/src/linux-headers-2.6.24-19-xen# pwd
/usr/src/linux-headers-2.6.24-19-xen
root@devel-ubuntu:/usr/src/linux-headers-2.6.24-19-xen# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04
Release: 8.04
Codename: hardy
root@devel-ubuntu:/usr/src/linux-headers-2.6.24-19-xen# make prepare
  CHK include/linux/version.h
  CHK include/linux/utsrelease.h
make[1]: *** No rule to make target `arch/x86/kernel/asm-offsets.c', needed by `arch/x86/kernel/asm-offsets.s'. Stop.
make: *** [prepare0] Error 2
root@devel-ubuntu:/usr/src/linux-headers-2.6.24-19-xen#

Revision history for this message
Kirk Sayre (sayre) wrote :

I was getting the same '*** No rule to make target `arch/x86/kernel/asm-offsets.c', needed by `arch/x86/kernel/asm-offsets.s'.' error reported here. After digging into the problem a bit I think I found the problem and how to fix it. In the file /usr/src/linux-headers-x.x.x/Kbuild there are references to arch/x86/kernel/asm-offsets.c and arch/x86/kernel/asm-offsets.s. Kbuild is included in /usr/src/linux-headers-x.x.x/Makefile. When attempting to build asm-offsets.s using the build rules in Kbuild the working directory for Make is /usr/src/linux-headers-x.x.x. The directory 'arch/x86/kernel/' is not in /usr/src/linux-headers-x.x.x, it is in /usr/src/linux.

To fix Kbuild I changed all references to 'arch/x86/kernel/asm-offsets.c' to '../linux/arch/x86/kernel/asm-offsets.c' and changed all references to 'arch/x86/kernel/asm-offsets.s' to '../linux/arch/x86/kernel/asm-offsets.s'.

This may not be the best solution but it seems to make sense and work.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
PVi (petervilhan) wrote :

Hello,
if you get message No rules to make target....
try to run "make -rd".

 -r, --no-builtin-rules
            Eliminate use of the built-in implicit rules. Also clear out the
            default list of suffixes for suffix rules.
-d Print debugging information in addition to normal processing. The
            debugging information says which files are being considered for
            remaking, which file-times are being compared and with what
            results, which files actually need to be remade, which implicit
            rules are considered and which are applied---everything interest‐
            ing about how make decides what to do.

This has helped me.

Bye.
Peter

Revision history for this message
Floris (weirdall) wrote :

Good day everyone,

I had the same problem as well.
The solution for me was to aptitude install linux-source.
This will copy ( in my case ) linux-source-2.6.24.tar.bz2
Extract that file using tar jxvf linux-source-2.6.24.tar.bz2
Just a formality, but then I make a symbolic link to that directory
ln -s linux-source-2.6.24.tar.bz2 linux
Go into /usr/src/linux
Now you can compile away!

With kind regards,

Floris Groenendijk

Revision history for this message
Dyno (dyno-fu) wrote :

$ sudo apt-get install module-assistant
$ sudo m-a prepare

solved my problem.

Revision history for this message
kernel-janitor (kernel-janitor) wrote :

Hi wyldfury,

This bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux-image-`uname -r` 233950

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
vj sr (rushtovijay-yahoo) wrote :

# uname -r
2.6.24-24-generic

I am using "ubuntu 8.04, 64 bit", with all updates to current date.
The problems I am facing are exactly the same.

Solutions above #11, #12, #13 does not solve the problem for me.
I have not tried solution #9. This is a live machine and I have to update the 3ware driver to the latest as it fixes bugs.

Thanks

Revision history for this message
Marc_Richter (the-judge) wrote :

Hi everyone,
I have this issue, too! I'm using the Ubuntu 8.04 server LTS version. Steps to reproduce:
1)
cd /usr/src/linux-headers-2.6.24-25-server
2)
make clean ; make distclean ; make mrproper
3)
cp /boot/config-2.6.24-25-server /usr/src/linux-headers-2.6.24-25-server/.config
4)
make oldconfig
5)
make prepare

Result:
scripts/kconfig/conf -s arch/x86/Kconfig
  CHK include/linux/version.h
  CHK include/linux/utsrelease.h
make[1]: *** No rule to make target `arch/x86/kernel/asm-offsets.c', needed by `arch/x86/kernel/asm-offsets.s'. Stop.
make: *** [prepare0] Error 2

Additionally, neither the file `arch/x86/kernel/asm-offsets.c' nor `arch/x86/kernel/asm-offsets.s' exists within the sources of 2.6.24-25-server.

The automated message from comment #14, which tells that one has to try the latest development release of Ubuntu is something I don't understand: This issue happens on 8.04 LTS versions, which is supportet for five years until April 2013. So I don't get the point of trying a current release of the distribution instead.
Also, the comment #10 seems to be irrelevant to this issue, since it's 8.04 which is affected.

I also don't understand why this issue remains nearly untouched since 17 months now.

Please, can anybody help with this?

Revision history for this message
Marc_Richter (the-judge) wrote :

@Dyno / comment #13:
root@balthasar:/usr/src/linux# m-a prepare
Getting source for kernel version: 2.6.24-25-server
apt-get install linux-headers-2.6.24-25-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-2.6.24-25-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Done!
root@balthasar:/usr/src/linux# make prepare
  CHK include/linux/version.h
  CHK include/linux/utsrelease.h
make[1]: *** No rule to make target `arch/x86/kernel/asm-offsets.c', needed by `arch/x86/kernel/asm-offsets.s'. Stop.
make: *** [prepare0] Error 2
root@balthasar:/usr/src/linux#

Sadly this doesn't work. But thank you!

Revision history for this message
Marc_Richter (the-judge) wrote :

@PVi / comment #11:
Tried make with -rd . Was way more verbose, but didn't give me a hint. I attached the output to this issue in the hope it tells anyone more than me.

Revision history for this message
Akisan (takaki10-24) wrote :

Hi
 Did you get tarball like a linux-source-2.6.24.tar.bz2? Did you use linux-source-2.6.24 that is just only installed.
 Just only installed linux-source-2.6.24 doesn't have asm-offsets.c file.
 You have taball like a linux-source-2.6.24.tar.bz2. and Extract that file using tar. Maybe you use custom directory like a /home/oneuser/kernel/ is better.
For example I did this:
$sudo su
#mkdir /home/oneuser/kernel
#cd /home/oneuser/kernel/
#cp /usr/src/linux-source-2.6.24 /home/oneuser/kernel/
#tar xf linux-source-2.6.24
#cd linux-source-2.6.24
#ls arch/x86/kernel/

#cp /boot/config-2.6.24-* .config
#make oldconfig
#make prepare

bye.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu release http://www.ubuntu.com/getubuntu/download . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
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.