Fatal Error Asm/unistd_32.h No Such File Or Directory
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions
Error: Asm/types.h: No Such File Or Directory
you might have Meta Discuss the workings and policies of unistd.h no such file or directory linux this site About Us Learn more about Stack Overflow the company Business Learn more about hiring
Include/uapi/linux/types.h:4:23: Fatal Error: Asm/types.h No Such File Or Directory
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is fatal error: unistd.h: no such file or directory a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up unistd_32.h and syscall_table_32.h not found up vote 1 down vote favorite I am building a system call on linux kernel 3.8.0. I added my code to pre>/usr/src/linux/kernel/sys.c But I cannot find any asm vs asm-generic unistd_32.h to add #define __NR_helloworld and syscall_table_32.h to add . long sys_helloworldThere is a file called unistd.h. But it is not seems to be the correct file
#ifndef _ASM_X86_UNISTD_H #define _ASM_X86_UNISTD_H 1 #include# ifdef CONFIG_X86_X32_ABI # define __SYSCALL_MASK (~(__X32_SYSCALL_BIT)) # else # define __SYSCALL_MASK (~0) # endif # ifdef CONFIG_X86_32 # include # define __ARCH_WANT_STAT64 # define __ARCH_WANT_SYS_IPC # define __ARCH_WANT_SYS_OLD_MMAP # define __ARCH_WANT_SYS_OLD_SELECT # else # include # include # define __ARCH_WANT_COMPAT_SYS_TIME # endif # define __ARCH_WANT_OLD_READDIR # define __ARCH_WANT_OLD_STAT # define __ARCH_WANT_SYS_ALARM # define __ARCH_WANT_SYS_FADVISE64 # define __ARCH_WANT_SYS_GETHOSTNAME # define __ARCH_WANT_SYS_GETPGRP # define __ARCH_WANT_SYS_LLSEEK # define __ARCH_WANT_SYS_NICE # define __ARCH_WANT_SYS_OLDUMOUNT # define __ARCH_WANT_SYS_OLD_GETRLIMIT # define __ARCH_WANT_SYS_OLD_UNAME # define __ARCH_WANT_SYS_PAUSE # define __ARCH_WANT_SYS_RT_SIGACTION # define __ARCH_WANT_SYS_RT_SIGSUSPEND # define __ARCH_WANT_SYS_SGETMASK # define __ARCH_WANT_SYS_SIGNAL # define __ARCH_WANT_SYS_SIGPENDING # define __ARCH_WANT_SYS_SIGPROCMASK # define __ARCH_WANT_SYS_SOCKETCALL # define __ARCH_WANT_SYS_TIME # define __ARCH_WANT_SYS_UTIME # define __ARCH_WANT_SYS_WAITPID # define __ARCH_WANT_SYS_FORK # define __ARCH_WANT_SYS_VFORK # define __ARCH_WANT_SYS_CLONE /* 64-bit Linux kernel 2.6.32-305-ec2, I saw this error. ubuntu@ip-10-218-39-204:/tmp/compcache-0.6.2$ make make -C "/lib/modules/2.6.32-305-ec2/build" M=/tmp/compcache-0.6.2 modules make[1]: Entering directory
Fatal Error: Asm/bitsperlong.h: No Such File Or Directory
`/usr/src/linux-headers-2.6.32-305-ec2' CC [M] /tmp/compcache-0.6.2/ramzswap_drv.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 include/linux/blkdev.h:6, from /tmp/compcache-0.6.2/ramzswap_drv.c:21: /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 I believe this is an error in the 64-bit 2.6.32 kernel, so you would see this on other distributions (e.g., Gentoo, http://stackoverflow.com/questions/20308003/unistd-32-h-and-syscall-table-32-h-not-found Slackware) and while compiling other kernel modules (e.g., VMWare, OpenAFS, drbd8). The good news is there is an easy fix. Edit unistd_64.h. To find the right file depending on your kernel, use this command (assuming you want to use vim). sudo vim /usr/src/linux-headers-`uname -r`/arch/x86/include/asm/unistd_64.h Then find the spot that looks like this https://heuristically.wordpress.com/2010/05/05/error-asmasm-offsets-h-no-such-file-directory/ (which is line 693 according to the build error above): #ifndef COMPILE_OFFSETS #include
#define NR_syscalls (__NR_syscall_max + 1) #endif Then change asm/ to asm-x86/ so it looks like this: #include Then save, exit the editor, and try compiling again. UPDATE From the comment link, Anders Kaseorg gives a simpler fix (slightly modified): sudo ln -nsf /usr/src/linux-headers-`uname -r`/include/asm-x86 /usr/src/linux-headers-`uname -r`/include/asm Share this:FacebookTwitterEmailPrintLike this:Like Loading... May 5, 2010 in Bugs. Tags: bug, error message, howto, linux Related posts Compcache on Ubuntu on Amazon EC2 Truncate a file from the command line Install Lexmark X1150 printer driver on Fedora 15 Post navigation ← Compcache on Ubuntu on Amazon EC2 Connecting SAS to Access 2007 (.accdb) → 8 thoughts on “error: asm/asm-offsets.h: No such file or directory” Matthias says: May 6, 2010 at 1:12 am Many thanks, this fix helped me to install drbd8 successfully on Ubunt 10.04 on ec2! Reply Pingback: Compcache on Ubuntu on CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will https://community.oracle.com/thread/3620119 not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in Oracle Linux and UEK Beta Testing All PlacesServer no such & Storage SystemsLinuxOracle Linux and UEK Beta Testing This discussion is archived 4 Replies Latest reply on Oct 17, 2014 6:50 AM by Remya Valappil-Oracle Where is asm/system.h header file on uek3 kernel version -3.8.13-35.1.2.el6uek.x86_64? Remya Valappil-Oracle Oct 16, 2014 10:52 AM I was no such file trying to compile Clearcase mvfs module on kernel version 3.8.13-35.1.2.el6uek.x86_64(OS is OL6u4) and I'm getting this error: ----------------- rm -rf *.o *.kobj *.obj *.ko *.mod.? .*.cmd .tmp_versions /usr/bin/make -C /lib/modules/3.8.13-35.1.2.el6uek.x86_64/build SUBDIRS=`pwd` make[1]: Entering directory `/usr/src/kernels/3.8.13-35.1.2.el6uek.x86_64' LD /var/adm/rational/clearcase/mvfs/mvfs_src/built-in.o CC [M] /var/adm/rational/clearcase/mvfs/mvfs_src/mvfs_vfsops.o In file included from /var/adm/rational/clearcase/mvfs/mvfs_src/mvfs_mdep_linux.h:69, from /var/adm/rational/clearcase/mvfs/mvfs_src/mvfs_systm.h:36, from /var/adm/rational/clearcase/mvfs/mvfs_src/mvfs_vfsops.c:25: /var/adm/rational/clearcase/mvfs/mvfs_src/vnode_linux.h:56:24: error: asm/system.h: No such file or directory make[2]: *** [/var/adm/rational/clearcase/mvfs/mvfs_src/mvfs_vfsops.o] Error 1 make[1]: *** [_module_/var/adm/rational/clearcase/mvfs/mvfs_src] Error 2 make[1]: Leaving directory `/usr/src/kernels/3.8.13-35.1.2.el6uek.x86_64' make: *** [all] Error 2 -------------------- I can't find the header file system.h in both these locations: [root@host asm]# pwd /usr/include/asm [root@host asm]# ls a.out.h byteorder.h ioctl.h kvm_para.h msr.h posix_types_32.h ptrace-abi.h shmbuf.h socket.h termbits.h unistd_64.h auxvec.h debugreg.h ioctls.h ldt.h msr-index.h posix_types_64.h ptrace.h sigcontext32.h sockios.h termios.h unistd.h bitsperlong.h e820.h ipcbuf.h mce.h mtrr.h posix_types.h resource.h sigcontext.h statfs.h types.h vm86.h boot.h er