ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have the following error when compiling the syscall.c file
syscall.c:639: error: syntax error before "mmap2"
syscall.c:639: warning: type defaults to `int' in declaration of `_syscall6'
syscall.c:639: warning: data definition has no type or storage class
syscall.c:640: error: syntax error before "getdents"
syscall.c:640: warning: type defaults to `int' in declaration of `_syscall3'
syscall.c:640: warning: data definition has no type or storage class
syscall.c:641: error: syntax error before "getdents64"
syscall.c:641: warning: type defaults to `int' in declaration of `_syscall3'
syscall.c:641: warning: data definition has no type or storage class
syscall.c:666: error: syntax error before "_llseek"
syscall.c:674: warning: return type defaults to `int'
syscall.c: In function `_syscall5':
I'm using ubuntu and the kernel version is
kl2305-04:/media/sdb1/zesto> uname -a
Linux kl2305-04 2.6.22-15-generic #1 SMP Wed Aug 20 18:39:13 UTC 2008 i686 GNU/Linux
It looks like some header file is missing somewhere. One *BIG* downside of Debian-derived distros, which includes Ubuntu, is that the kernels (along with some other software) are non-standard (i.e., non-vanilla, containing code not submitted or checked by their maintainers), which means you have the possibility of getting bit.
One thing you didn't mention: was it working before? Do you remember doing something (or not) before this happened?
Ah! A *LOT* of changes have happened since then, particularly around the time 2.6.9-12. These changes broke a few programs. Still, that shouldn't cause the kernel itself not to compile. The only possibility I can think of at the moment (I just woke up around 20 minutes ago) is that maybe the kernel is expecting a newer gcc, glibc, or associated utilities. Kind of a long shot, though.
I just realized you didn't mention what Ubuntu version you're using: if the distro is too old, all the other software will be too old for the kernel to compile right, as I mentioned above. (The kernel is picky about which version of gcc et al you use to compile it, due to the combination of old and new code present and its sheer size. This was a big problem in the days around the merger of egcs into the main gcc line.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.