Link to home
Start Free TrialLog in
Avatar of Wanting2LearnMan
Wanting2LearnManFlag for United Kingdom of Great Britain and Northern Ireland

asked on

error: asm/page.h: No such file or directory

I'm following the instructions here:http://doc.slitaz.org/en:scratchbook:base-system
to build slitaz.

When I'm building busybox and do the make command I get the following error:
/slitazLinux/src/busybox-1.2.2/util-linux/mkswap.c:44:59: error: asm/page.h: No such file or directory
make[1]: *** [/slitazLinux/src/busybox-1.2.2/util-linux/mkswap.o] Error 1
make: *** [_all] Error 2

I have checked and this file indeed does not exist.

How do I solve this problem??
Avatar of larsrohr
larsrohr
Flag of United States of America image

You'll need to install kernel-headers.
On SlitazLinux, this should do it:

 # tazpkg recharge
 # tazpkg get-install kernel-headers

Avatar of Wanting2LearnMan

ASKER

Hi,thanks for the reply,
Im actually building the slitaz Linux on a suse Linux os,
So, does the above still apply?

Thanks
I think in that case you'd want the kernel headers for your Suse OS, if I'm following the busybox build instructions correctly.  I believe you can install "linux-kernel-headers" using YaST2, or this command may work for root:
  zypper in linux-kernel-headers

Otherwise, you can locate a suitable linux-kernel-headers rpm online, and download and install it manually.

Installing the kernel headers certainly won't hurt anything.  So go ahead and install them on whatever Linux OS is being used for compiling.
Hi larsrohr,

It tells me they are already installed:

zypper in linux-kernel-headers

Loading repository data...
Reading installed packages...
'linux-kernel-headers' is already installed.
No update candidate for 'linux-kernel-headers'.
Resolving package dependencies...

Nothing to do.


Any other thoughts??

Thanks
I have the following page.h files:
./linux-2.6.20/arch/powerpc/boot/page.h
./linux-2.6.20/include/asm-sh/page.h
./linux-2.6.20/include/asm-v850/page.h
./linux-2.6.20/include/asm-um/page.h
./linux-2.6.20/include/asm-m32r/page.h
./linux-2.6.20/include/asm-frv/page.h
./linux-2.6.20/include/asm-s390/page.h
./linux-2.6.20/include/asm-avr32/page.h
./linux-2.6.20/include/asm-arm26/page.h
./linux-2.6.20/include/asm-cris/arch-v10/page.h
./linux-2.6.20/include/asm-cris/page.h
./linux-2.6.20/include/asm-cris/arch-v32/page.h
./linux-2.6.20/include/asm-sparc/page.h
./linux-2.6.20/include/asm-sparc64/page.h
./linux-2.6.20/include/asm-m68k/page.h
./linux-2.6.20/include/asm-m68knommu/page.h
./linux-2.6.20/include/asm-h8300/page.h
./linux-2.6.20/include/asm-mips/page.h
./linux-2.6.20/include/asm-ia64/page.h
./linux-2.6.20/include/asm-ppc/page.h
./linux-2.6.20/include/asm-i386/page.h
./linux-2.6.20/include/asm-xtensa/page.h
./linux-2.6.20/include/asm-powerpc/page.h
./linux-2.6.20/include/asm-generic/page.h
./linux-2.6.20/include/asm-alpha/page.h
./linux-2.6.20/include/asm-arm/page.h
./linux-2.6.20/include/asm-sh64/page.h
./linux-2.6.20/include/asm-x86_64/page.h
./linux-2.6.20/include/asm-parisc/page.h

Do I have to simply change the  asm/page.h to be e.g.  asm-x86_64/page.h or something else?

Thanks
I changes it to asm-x86_64/page.h and am still getitng:

slitazLinux/src/busybox-1.2.2/util-linux/mkswap.c:45:66: error: asm-x86_64/page.h: No such file or directory

Do I have to set up a link or something to pick these up??
Let me check with an opensuse installation myself, and get back to you.
I'm torn between 1) commenting the page.h include out of the busybox Makefile (it may not actually be needed) and 2) creating appropriate symlinks on your system.
thanks :)
OK, so far it appears that you'll want to edit your /slitazLinux/src/busybox-1.2.2/util-linux/mkswap.c and just delete lines 44-45 (well, at least line 44):
 
#include <asm/page.h>                   /* for PAGE_SIZE and PAGE_SHIFT */
                                /* we also get PAGE_SIZE via getpagesize() */

Open in new window

Feel free to make a copy of the file first (e.g. mkswap.c.bak).  Are you comfortable with editing that file, using vi or emacs or other text editor?

Once mkswap.c has that include line removed, retry your make.
busybox should build just fine after that.
But you'll probably want to continue with the instructions, and make sure that the ISO image you ultimately create works right.
ASKER CERTIFIED SOLUTION
Avatar of larsrohr
larsrohr
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The first one did the trick larsrohr :)

Thanks very much.

When I comment this page out, where is it picking it up from???

I also have another build problem but I'll post another question, just to award more points :)

Offhand, I'd say that some of the code was likely updated or re-used from projects where PAGE_SIZE was previously needed, but it's either no longer used, or perhaps is now handled by system calls rather than header file info.

I'm glad it worked out.