1.下载内核
2.make mrproper
3.make headers_check
make INSTALL_HDR_PATH=dest headers_install
cp -rv dest/include/* /tmp/k_include/
1.下载GLIBC-2.10.1.TAR.BZ2
2.tar -jxf GLIBC-2.10.1.TAR.BZ2 && cd glibc-2.10.1
3.echo "CFLAGS += -march=i486 -mtune=native -U_FORTIFY_SOURCE -fno-stack-protector" > configparms
4.mkdir ../build &&cd ../build
5.../glibc-2.10.1/configure --enable-profile --prefix=/usr --enable-kernel=2.6.25 --with-headers=/tmp/k_include/
6.
常见错误:
1)
/home/patrick/glibc-build/elf/librtld.os: In function `print_statistics':
/home/patrick/glibc-2.5.1/elf/rtld.c:2830: undefined reference to `__stack_chk_fail_local'
/home/patrick/glibc-build/elf/librtld.os: In function `process_dl_debug':
/home/patrick/glibc-2.5.1/elf/rtld.c:2466: undefined reference to `__stack_chk_fail_local'
/home/patrick/glibc-build/elf/librtld.os: In function `process_envvars':
/home/patrick/glibc-2.5.1/elf/rtld.c:2725: undefined reference to `__stack_chk_fail_local'
/home/patrick/glibc-build/elf/librtld.os: In function `dl_main':
/home/patrick/glibc-2.5.1/elf/rtld.c:2346: undefined reference to `__stack_chk_fail_local'
/home/patrick/glibc-build/elf/librtld.os: In function `print_search_path':
/home/patrick/glibc-2.5.1/elf/dl-load.c:1571: undefined reference to `__stack_chk_fail_local'
/home/patrick/glibc-build/elf/librtld.os:/home/patrick/glibc-2.5.1/elf/dl-load.c:1791: more undefined
加上”-fno-stack-protector“
2)selinux.h:26:29: error: sys/capability.h
LIBPCAP的头文件,找一下,加到CFLAGS,重新编译
或者修改config.h,删掉LIBCAP的宏定义
阅读(1410) | 评论(0) | 转发(0) |