- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I downloaded the latest version nios2-linux-20100621, and followed the guides from Nios wiki carefully to build the tool chain for uClinux. But I get stuck at building uClibc step, error like this
In file included from ./include/sys/syscall.h:34,
from libpthread/linuxthreads.old/restart.h:16,
from libpthread/linuxthreads.old/cancel.c:23:
./include/bits/syscalls.h:10:23: asm/traps.h: No such file or directory
make: *** Error 1
make: Leaving directory `/home/kevin/nios2-linux/uClibc'
make: *** Error 2
In order to resolve this problem, I create a dummy file traps.h with command: touch build/linux/include/asm/traps.h. After that, another error appears :(
/home/kevin/nios2-linux/toolchain-build/u-boot.mk:11: Board not defined! Using EP1S10 as default.
PATH=/home/kevin/nios2-linux/toolchain-build/build/nios2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/modelsim/modeltech/bin:/opt/altera/10.0/nios2eds/bin:/opt/altera/10.0/quartus/bin
make -C /home/kevin/nios2-linux/toolchain-build/../uClibc CROSS=nios2-linux-uclibc-
PREFIX=
DEVEL_PREFIX=/
RUNTIME_PREFIX=/
KERNEL_HEADERS=/home/kevin/nios2-linux/toolchain-build/build/linux/include
all
make: Entering directory `/home/kevin/nios2-linux/uClibc'
make: `conf' is up to date.
CC libpthread/linuxthreads.old/wrapsyscall.o
libpthread/linuxthreads.old/wrapsyscall.c:101: error: redefinition of 'msync'
./include/sys/mman.h:97: error: previous definition of 'msync' was here
make: *** Error 1
make: Leaving directory `/home/kevin/nios2-linux/uClibc'
make: *** Error 2
And I can overcome this error by commenting line 101 in file wrapsyscall.c, which define the macro msync. Try to build again, and again another error stop the build process
/home/kevin/nios2-linux/toolchain-build/u-boot.mk:11: Board not defined! Using EP1S10 as default.
PATH=/home/kevin/nios2-linux/toolchain-build/build/nios2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/modelsim/modeltech/bin:/opt/altera/10.0/nios2eds/bin:/opt/altera/10.0/quartus/bin
make -C /home/kevin/nios2-linux/toolchain-build/../uClibc CROSS=nios2-linux-uclibc-
PREFIX=
DEVEL_PREFIX=/
RUNTIME_PREFIX=/
KERNEL_HEADERS=/home/kevin/nios2-linux/toolchain-build/build/linux/include
all
make: Entering directory `/home/kevin/nios2-linux/uClibc'
make: `conf' is up to date.
CC libpthread/linuxthreads.old/wrapsyscall.o
CC libpthread/linuxthreads.old/pthread.o
STRIP -x -R .note -R .comment lib/libpthread.a
AR cr lib/libpthread.a
CC librt/mq_close.o
CC librt/mq_getsetattr.o
librt/mq_getsetattr.c: In function `__syscall_mq_getsetattr':
librt/mq_getsetattr.c:15: error: `TRAP_ID_SYSCALL' undeclared (first use in this function)
librt/mq_getsetattr.c:15: error: (Each undeclared identifier is reported only once
librt/mq_getsetattr.c:15: error: for each function it appears in.)
make: *** Error 1
make: Leaving directory `/home/kevin/nios2-linux/uClibc'
make: *** Error 2
My system is Ubuntu 10.10 64bit. I think this toolchain maybe not compatible with my system, so I tried to build on Virtual machine with CentOS 5.5 32bit with the same errors !!! I am hopeless. Is there anybody can build the toolchain nios2-linux-20100621 successfully??? Can any body help me?? Some more information about git: toolchain-build: master uClibc: v0.9.29-nios2
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
is there really a need not to use the prebuild toolchain? I also tried building the toolchain on my own but it took almost a hour and at the end there will still some problems. The traps message could be due to the compiler version of gcc. Probably you have a gcc other than 4.2.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know if it matters, but what branch are you on in linux-2.6?
Also, from my experience, you will need to build it on a 32-bit system.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Totally agree with you about the necessity of building my own toolchain. Two year ago, I finish a my project with DE2 board and uClinux. I build in simple "NAS".
Fortunately, I have an opportunity to work with uClinux and DE2 board again. With some experiences working on Linux and embedded systems, I would like do do something more deeply than I ever did, such as build toolchain, customize kernel... Maybe the problem's in the GCC 4.2 as urmel (http://www.alteraforum.com/forum/member.php?u=39183) mentioned or wrong branch in linux-2.6 ykozlov (http://www.alteraforum.com/forum/member.php?u=26158) said .I will check and post the result soon. I saw some others thread meet the same problems without answer. Thank for your attention!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After change to nios-test branch in linux-2.6, the problems above are solved. But another issues appear:
This one seems to be concerned with GCC compiler???/tmp/ccwwD57R.s: Assembler messages:
/tmp/ccwwD57R.s:1148: Internal error!
Assertion failure in md_number_to_chars at /home/kevin/nios2-linux/toolchain-build/../binutils/gas/config/tc-nios2.c line 1353.
Please report this bug.
make: *** Error 1
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/mno-hw-mul/libstdc++-v3/libsupc++'
make: *** Error 1
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/mno-hw-mul/libstdc++-v3'
make: *** Error 2
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/mno-hw-mul/libstdc++-v3'
make: *** Error 1
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/libstdc++-v3'
make: *** Error 2
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/libstdc++-v3'
make: *** Error 2
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/libstdc++-v3'
make: *** Error 2
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build'
make: *** Error 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- After change to nios-test branch in linux-2.6, the problems above are solved. But another issues appear: This one seems to be concerned with GCC compiler???
/tmp/ccwwD57R.s: Assembler messages:
/tmp/ccwwD57R.s:1148: Internal error!
Assertion failure in md_number_to_chars at /home/kevin/nios2-linux/toolchain-build/../binutils/gas/config/tc-nios2.c line 1353.
Please report this bug.
make: *** Error 1
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/mno-hw-mul/libstdc++-v3/libsupc++'
make: *** Error 1
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/mno-hw-mul/libstdc++-v3'
make: *** Error 2
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/mno-hw-mul/libstdc++-v3'
make: *** Error 1
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/libstdc++-v3'
make: *** Error 2
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/libstdc++-v3'
make: *** Error 2
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build/nios2-linux-uclibc/libstdc++-v3'
make: *** Error 2
make: Leaving directory `/home/kevin/nios2-linux/toolchain-build/build/gcc-build'
make: *** Error 2
--- Quote End --- Is this on the 64-bit host?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right, I compile on Ubuntu 10.10 64bit and GCC 4.4.
I try to compile on CentOS 5.5 32bit with default GCC 4.1, everything runs well. So I still cannot identify which GCC or 64bit architecture casue the error when building the toolchain.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page