cross compile error: check_fds.c:64:1: error: ‘__NR_open’ undeclared

Adrian Sandstrom adrians@gmail.com
Mon Sep 3 00:41:00 GMT 2012


 Hi,

 I'm getting the following error when I try to cross-compile for an
arm processor:

 check_fds.c: In function ‘check_one_fd’:
 check_fds.c:64:1: error: ‘__NR_open’ undeclared (first use in this function)
 check_fds.c:64:1: note: each undeclared identifier is reported only
once for each function it appears in
 make[2]: *** [/home/adrian/workspace/Sandbox/linux_ports/rm48l950/build-tools/build-glibc/csu/check_fds.o]
Error 1
 make[2]: Leaving directory
`/home/adrian/workspace/Sandbox/linux_ports/rm48l950/build-tools/glibc-2.16-ports-merge/csu'
 make[1]: *** [csu/subdir_lib] Error 2
 make[1]: Leaving directory
`/home/adrian/workspace/Sandbox/linux_ports/rm48l950/build-tools/glibc-2.16-ports-merge'
 make: *** [all] Error 2
 adrian@Iliad:~/workspace/Sandbox/linux_ports/rm48l950/build-tools/build-glibc$

 Here's the version info for packages used so far:
 gilbc: glibc-2.16-ports-merged.
 kernel headers: linux-3.5.3
 binutils: binutils-2.22.


 How can I fix this error with __NR_open?

 Not sure if they're related, but there are couple issues that made me
question if something else is awry:
 1) The configure logs for both binutils and gcc state I'm not
cross-compiling. I used the same target and prefix with both configure
scripts:
 ${TARGET} = arm-linux-gnueabi
 ${PREFIX} = /home/adrian/workspace/Sandbox/linux_ports/rm48l950/tools
 2) There was no asm directory in the include folder of the kernel
headers so in ${PREFIX}/${TARGET}/include I symlinked asm ->
asm-generic. Why was there no asm folder? Were all the files moved
into asm-generic?

 If anyone could help me fix the compiler error I would really
appreciate it; that's my main problem at the moment. If I could also
get insight into what's going on with the 2 concerns I mentioned
afterwards my week would be off to a great start :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: application/octet-stream
Size: 30080 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-help/attachments/20120903/230c1bf9/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: application/octet-stream
Size: 24559 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-help/attachments/20120903/230c1bf9/attachment-0001.obj>


More information about the Libc-help mailing list