Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12745 Discussions

Compile erros when compling uCLinux for NIOS II

Altera_Forum
Honored Contributor II
1,430 Views

I get these series of errors when I run make in order to compile uCLinux for NIOS II. 

 

CC arch/nios2nommu/kernel/asm-offsets.s CHK include/asm-nios2nommu/asm-offsets.h UPD include/asm-nios2nommu/asm-offsets.h CC init/main.o CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o CC init/do_mounts.o CC init/do_mounts_rd.o CC init/do_mounts_initrd.o In file included from include/linux/unistd.h:9, from init/do_mounts_initrd.c:2: include/asm/unistd.h:659: error: parse error before "setsid" include/asm/unistd.h:659: warning: return type defaults to `int' include/asm/unistd.h: In function `setsid': include/asm/unistd.h:659: error: `pid_t' undeclared (first use in this function) include/asm/unistd.h:659: error: (Each undeclared identifier is reported only once include/asm/unistd.h:659: error: for each function it appears in.) include/asm/unistd.h: At top level: include/asm/unistd.h:660: error: parse error before "off_t" include/asm/unistd.h:660: warning: function declaration isn't a prototype include/asm/unistd.h: In function `write': include/asm/unistd.h:660: error: `fd' undeclared (first use in this function) include/asm/unistd.h:660: error: `buf' undeclared (first use in this function) include/asm/unistd.h:660: error: `count' undeclared (first use in this function) include/asm/unistd.h: At top level: include/asm/unistd.h:661: error: parse error before "off_t" include/asm/unistd.h:661: warning: function declaration isn't a prototype include/asm/unistd.h: In function `read': include/asm/unistd.h:661: error: `fd' undeclared (first use in this function) include/asm/unistd.h:661: error: `buf' undeclared (first use in this function) include/asm/unistd.h:661: error: `count' undeclared (first use in this function) include/asm/unistd.h: At top level: include/asm/unistd.h:662: error: parse error before "lseek" include/asm/unistd.h:662: error: parse error before "off_t" include/asm/unistd.h:662: warning: return type defaults to `int' include/asm/unistd.h:662: warning: function declaration isn't a prototype include/asm/unistd.h: In function `lseek': include/asm/unistd.h:662: error: `fd' undeclared (first use in this function) include/asm/unistd.h:662: error: `offset' undeclared (first use in this function) include/asm/unistd.h:662: error: `count' undeclared (first use in this function) include/asm/unistd.h:662: error: `off_t' undeclared (first use in this function) include/asm/unistd.h: At top level: include/asm/unistd.h:668: error: parse error before "waitpid" include/asm/unistd.h:668: error: parse error before "pid" include/asm/unistd.h:668: warning: return type defaults to `int' include/asm/unistd.h:668: warning: function declaration isn't a prototype include/asm/unistd.h: In function `waitpid': include/asm/unistd.h:668: error: `pid' undeclared (first use in this function) include/asm/unistd.h:668: error: `wait_stat' undeclared (first use in this function) include/asm/unistd.h:668: error: `options' undeclared (first use in this function) include/asm/unistd.h:668: error: `pid_t' undeclared (first use in this function) include/asm/unistd.h: At top level: include/asm/unistd.h:671: error: parse error before "wait" include/asm/unistd.h:672: warning: return type defaults to `int' make: *** Error 1 make: *** Error 2  

 

Any input appreciated. 

 

Thank you.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
475 Views

Ok maybe I'm just lucky but I've had no problems building the kernel using the external toolchain on two different Linux systems (fedora Core 13 and Kubuntu 10.04). 

 

1. Download the 20090730 tarball and do the "./checkout" step from http://www.nioswiki.com/installnios2linux (http://www.nioswiki.com/installnios2linux

2. Setup the prebuilt toolchain like http://www.nioswiki.com/operatingsystems/uclinux/binarytoolchain (http://www.nioswiki.com/operatingsystems/uclinux/binarytoolchain

3. Build the kernel like http://www.nioswiki.com/operatingsystems/uclinux/uclinuxdist (http://www.nioswiki.com/operatingsystems/uclinux/uclinuxdist). 

 

This has given me a kernel image pretty quickly. 

 

Good luck, try following the wiki recipe above and if you get stuck, let me know where you get stuck.  

David
0 Kudos
Reply