+ -
当前位置:首页 → 问答吧 → 求助:编译glibc-2.6.1出错

求助:编译glibc-2.6.1出错

时间:2007-09-16

来源:互联网

在FC6上创建ARM交叉编译环境,binutils-2.17.50.0.18 gcc-4.2.1 linux-2.6.22.6 glibc-2.6.1
前面都没出现什么问题,就是到glibc ,出错了,网上搜了一整天也没找到答案,恳请各位指教阿

-f /home/wh/embedded/build-tools/build-glibc/csu/abi-tag.h.new /home/wh/embedded/build-tools/build-glibc/csu/abi-tag.h; \
else echo >&2 'This configuration not matched in ../abi-tags'; exit 1; fi
gawk -f ../scripts/gen-as-const.awk ../glibc-ports-2.6.1/sysdeps/arm/nptl/tcb-offsets.sym \
| arm-linux-gcc -S -o /home/wh/embedded/build-tools/build-glibc/tcb-offsets.hT3 -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes -I../include -I/home/wh/embedded/build-tools/build-glibc/csu -I/home/wh/embedded/build-tools/build-glibc -I../glibc-ports-2.6.1/sysdeps/arm/elf -I../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl -I../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm -I../glibc-ports-2.6.1/sysdeps/unix/sysv/linux -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../glibc-ports-2.6.1/sysdeps/unix/sysv -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../glibc-ports-2.6.1/sysdeps/unix/arm -I../glibc-ports-2.6.1/sysdeps/unix -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../glibc-ports-2.6.1/sysdeps/arm/fpu -I../glibc-ports-2.6.1/sysdeps/arm/nptl -I../glibc-ports-2.6.1/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../glibc-ports-2.6.1 -I../nptl -I.. -I../libio -I. -nostdinc -isystem /home/wh/embedded/tools/lib/gcc/arm-linux/4.2.1/include -isystem /home/wh/embedded/tools/arm-linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DHAVE_INITFINI -x c - \
-MD -MP -MF /home/wh/embedded/build-tools/build-glibc/tcb-offsets.h.dT -MT '/home/wh/embedded/build-tools/build-glibc/tcb-offsets.h.d /home/wh/embedded/build-tools/build-glibc/tcb-offsets.h'
In file included from ../sysdeps/unix/sysdep.h:21,
from ../glibc-ports-2.6.1/sysdeps/unix/arm/sysdep.h:20,
from ../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/sysdep.h:26,
from <stdin>:1:
../sysdeps/unix/sysv/linux/sys/syscall.h:25:24: error: asm/unistd.h: 没有那个文件或目录
In file included from ../sysdeps/unix/sysv/linux/sys/param.h:24,
from ../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h:23,
from ../nptl/descr.h:30,
from ../glibc-ports-2.6.1/sysdeps/arm/nptl/tls.h:63,
from ../include/tls.h:6,
from <stdin>:2:
/home/wh/embedded/tools/arm-linux/include/linux/param.h:4:23: error: asm/param.h: 没有那个文件或目录
In file included from ../nptl/descr.h:30,
from ../glibc-ports-2.6.1/sysdeps/arm/nptl/tls.h:63,
from ../include/tls.h:6,
from <stdin>:2:
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: 在函数‘__lll_mutex_lock’中:
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h:158: 错误:‘__NR_futex’未声明 (在此函数内第一次使用)
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h:158: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h:158: 错误:所在的函数内也只报告一次。)
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: 在函数‘__lll_mutex_cond_lock’中:
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h:184: 错误:‘__NR_futex’未声明 (在此函数内第一次使用)
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: 在函数‘__lll_mutex_unlock’中:
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h:231: 错误:‘__NR_futex’未声明 (在此函数内第一次使用)
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: 在函数‘__lll_robust_mutex_unlock’中:
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h:241: 错误:‘__NR_futex’未声明 (在此函数内第一次使用)
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: 在函数‘__lll_mutex_unlock_force’中:
../glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h:251: 错误:‘__NR_futex’未声明 (在此函数内第一次使用)
In file included from ../socket/sys/socket.h:35,
from ../include/sys/socket.h:2,
from ../inet/netinet/in.h:24,
from ../include/netinet/in.h:3,
from ../resolv/resolv.h:57,
from ../include/resolv.h:12,
from ../nptl/descr.h:39,
from ../glibc-ports-2.6.1/sysdeps/arm/nptl/tls.h:63,
from ../include/tls.h:6,
from <stdin>:2:
../sysdeps/unix/sysv/linux/bits/socket.h:311:24: error: asm/socket.h: 没有那个文件或目录
make[2]: *** [/home/wh/embedded/build-tools/build-glibc/tcb-offsets.h] 错误 1
make[2]: Leaving directory `/home/wh/embedded/build-tools/glibc-2.6.1/csu'
make[1]: *** [csu/subdir_lib] 错误 2
make[1]: Leaving directory `/home/wh/embedded/build-tools/glibc-2.6.1'
make: *** [all] 错误 2

作者: happyhui   发布时间: 2007-09-16

你的环境配好了么?错误提示都是说在asm/路径下缺少文件

作者: 藕节   发布时间: 2007-09-16

谢谢楼上的大哥,我再看看,呵呵,昨天出去了一天,今天继续

作者: happyhui   发布时间: 2007-09-17

把 asm下的 链接过去了,不会出现找不到文件或目录的 问题了,不过make 时,又出现了下面的问题,我 查找了../csu/libc-tls.c:191里面就没有__ARM_NR_set_tls函数的出现
网上查也查不出来,步步艰难阿
./libio -I. -nostdinc -isystem /home/wh/embedded/tools/lib/gcc/arm-linux/4.2.1/include -isystem /home/wh/embedded/tools/arm-linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DHAVE_INITFINI -o /home/wh/embedded/build-tools/build-glibc/csu/libc-tls.o -MD -MP -MF /home/wh/embedded/build-tools/build-glibc/csu/libc-tls.o.dt -MT /home/wh/embedded/build-tools/build-glibc/csu/libc-tls.o
In file included from ../glibc-ports-2.6.1/sysdeps/arm/libc-tls.c:20:
../csu/libc-tls.c: 在函数‘__libc_setup_tls’中:
../csu/libc-tls.c:191: 错误:‘__ARM_NR_set_tls’未声明 (在此函数内第一次使用)
../csu/libc-tls.c:191: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
../csu/libc-tls.c:191: 错误:所在的函数内也只报告一次。)
make[2]: *** [/home/wh/embedded/build-tools/build-glibc/csu/libc-tls.o] 错误 1
make[2]: Leaving directory `/home/wh/embedded/build-tools/glibc-2.6.1/csu'
make[1]: *** [csu/subdir_lib] 错误 2
make[1]: Leaving directory `/home/wh/embedded/build-tools/glibc-2.6.1'
make: *** [all] 错误 2

作者: happyhui   发布时间: 2007-09-18

呵呵,谢谢大家,问题已解决,是连接出问题了

作者: happyhui   发布时间: 2007-09-19

你好 我也遇到了同样的问题
../sysdeps/unix/sysv/linux/bits/socket.h:305:24: asm/socket.h: No such file or directory
make时没有asm这个目录,不知道怎样建立连接,可否把你的解决的方法说明一下,谢谢!

作者: JammyWei   发布时间: 2008-04-02

引用:
作者: happyhui
呵呵,谢谢大家,问题已解决,是连接出问题了
有解决方案就写下来吖 哎~··没点意识的

作者: finalfantasy000   发布时间: 2008-08-10

编译完用来编译glibc 的gcc后,到linux内核目录
make ARCH=arm CROSS-COMPLIE=arm-linux- menuconfig

system type中选中pxa270(根据你自己的cpu来定)
退出保存
make(待arm目录编译完成后,可按ctrl+c停止)

把内核代码/arch/arm/include/asm 拷贝到prefix/include下
configure时 加入 --with-headers=$prefix/include

即可解决

作者: karotoo   发布时间: 2009-05-27