【未解决】cygwin下编译crosstool-ng在Installing C library的Building C library阶段出错:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.c:(.text+0x537): undefined reference to `_libintl_gettext’

【问题】

折腾:

【已解决】cygwin下编译crosstool-ng在Installing C library的Building C library出错:rpc/types.h:73:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘u_char’

期间,cygwin下编译crosstool-ng,

在Installing C library的Building C library阶段

出错:

[INFO ]  =================================================================
[INFO ]  Installing C library
[EXTRA]    Configuring C library
[EXTRA]    Building C library
[ERROR]    make[3]: *** [/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpcgen] Error 1
[ERROR]    make[2]: *** [sunrpc/others] Error 2
[ERROR]    make[1]: *** [all] Error 2
[ERROR]  \
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@441]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]
         /

Current command:
  'make' '-j4' '-l' 'all'
exited with error code: 2
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    2  repeat this build command
    3  abort build

ct-ng:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final>

如图:

Building C library build-libc-final sunrpc cross-rpcgen Error 1

log文件:

E:\dev_install_root\cygwin\home\develop\crosstool-ng\crosstool-ng-1.18.0_build\build.log

中详情为:

[ALL  ]    arm-arm920t-linux-gnueabi-gcc     -nostdlib -nostartfiles -o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpcgen  -Wl,-dynamic-linker=/lib/ld-linux.so.3   -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/csu/crt1.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/csu/crti.o `arm-arm920t-linux-gnueabi-gcc      --print-file-name=crtbegin.o` /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_main.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_hout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_cout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_parse.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_scan.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_util.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_svcout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_clntout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_tblout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_sample.o  -Wl,-rpath-link=/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/math:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/elf:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/dlfcn:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/nss:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/nis:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/rt:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/resolv:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/crypt:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/nptl /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/libc.so.6 /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/libc_nonshared.a -Wl,--as-needed /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/elf/ld.so -Wl,--no-as-needed -lgcc -Wl,--as-needed -lgcc_s  -Wl,--no-as-needed `arm-arm920t-linux-gnueabi-gcc      --print-file-name=crtend.o` /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/csu/crtn.o
[ALL  ]    gcc /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_hout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_cout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_parse.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_scan.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_util.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_svcout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_clntout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_tblout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_sample.o -o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpcgen
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.c:(.text+0x537): undefined reference to `_libintl_gettext'
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.c:(.text+0x590): undefined reference to `_libintl_gettext'
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.c:(.text+0x605): undefined reference to `_libintl_gettext'
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.c:(.text+0x73e): undefined reference to `_libintl_gettext'
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.c:(.text+0x793): undefined reference to `_libintl_gettext'
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.c:(.text+0xa2b): more undefined references to `_libintl_gettext' follow
[ALL  ]    /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o: bad reloc address 0x0 in section `.data'
[ALL  ]    /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: final link failed: Invalid operation
[ALL  ]    collect2: ld returned 1 exit status
[ERROR]    make[3]: *** [/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpcgen] Error 1
[ALL  ]    make[3]: *** Waiting for unfinished jobs....
[ALL  ]    make[3]: Leaving directory `/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/eglibc-2_15/sunrpc'
[ERROR]    make[2]: *** [sunrpc/others] Error 2
[ALL  ]    make[2]: Leaving directory `/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/eglibc-2_15'
[ERROR]    make[1]: *** [all] Error 2
[ALL  ]    make[1]: Leaving directory `/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final'
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@441]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]

即:

[ALL ] /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.c:(.text+0x537): undefined reference to `_libintl_gettext’

【解决过程】

1.此处,去搜相关的问题,结果找不到,最多只能找到和_libintl_gettext有关的,但是也只是mconf之类的,和我之前的问题类似。

我早就解决了那个问题了。

但是此处的:

crosstool-ng

rpc_main.c

相关的

undefined reference to `_libintl_gettext’

还是找不到。

2.后来去看log中,觉得有点奇怪:

之前都是用交叉编译器arm-arm920t-linux-gnueabi-gcc去操作的:

[ALL  ]    arm-arm920t-linux-gnueabi-gcc     -nostdlib -nostartfiles -o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpcgen  -Wl,-dynamic-linker=/lib/ld-linux.so.3   -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/csu/crt1.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/csu/crti.o `arm-arm920t-linux-gnueabi-gcc      --print-file-name=crtbegin.o` /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_main.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_hout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_cout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_parse.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_scan.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_util.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_svcout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_clntout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_tblout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/rpc_sample.o  -Wl,-rpath-link=/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/math:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/elf:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/dlfcn:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/nss:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/nis:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/rt:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/resolv:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/crypt:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/nptl /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/libc.so.6 /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/libc_nonshared.a -Wl,--as-needed /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/elf/ld.so -Wl,--no-as-needed -lgcc -Wl,--as-needed -lgcc_s  -Wl,--no-as-needed `arm-arm920t-linux-gnueabi-gcc      --print-file-name=crtend.o` /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/csu/crtn.o

但是,接着却变成了用gcc去操作了:

[ALL  ]    gcc /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_hout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_cout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_parse.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_scan.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_util.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_svcout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_clntout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_tblout.o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_sample.o -o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpcgen

然后接着才出错的。

然后另外注意到,前面编译此处的rpc的很多文件,也是中间用上了gcc:

[ALL  ]    make[3]: Entering directory `/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/eglibc-2_15/sunrpc'
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     rpc_main.c -c -std=gnu99 -fgnu89-inline -O -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     rpc_hout.c -c -std=gnu99 -fgnu89-inline -O -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     rpc_cout.c -c -std=gnu99 -fgnu89-inline -O -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     rpc_parse.c -c -std=gnu99 -fgnu89-inline -O -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     rpc_scan.c -c -std=gnu99 -fgnu89-inline -O -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     rpc_util.c -c -std=gnu99 -fgnu89-inline -O -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     rpc_svcout.c -c -std=gnu99 -fgnu89-inline -O -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-al
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     rpc_clntout.c -c -std=gnu99 -fgnu89-inline -O -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-a
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     rpc_tblout.c -c -std=gnu99 -fgnu89-inline -O -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-al
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     rpc_sample.c -c -std=gnu99 -fgnu89-inline -O -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-al
[ALL  ]    gcc rpc_main.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ 		-o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-
[ALL  ]    gcc rpc_hout.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ 		-o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-
[ALL  ]    gcc rpc_cout.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ 		-o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-
[ALL  ]    gcc rpc_parse.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ 		-o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-
[ALL  ]    gcc rpc_scan.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ 		-o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-
[ALL  ]    gcc rpc_util.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ 		-o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-
[ALL  ]    gcc rpc_svcout.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ 		-o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-li
[ALL  ]    gcc rpc_clntout.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ 		-o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-li
[ALL  ]    gcc rpc_tblout.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ 		-o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-li
[ALL  ]    gcc rpc_sample.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_ 		-o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-li
[ALL  ]    arm-arm920t-linux-gnueabi-gcc     -nostdlib -nostartfiles -o /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnu
[ALL  ]    gcc /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o /home
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.
[ALL  ]    /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o:rpc_main.
[ALL  ]    /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-l
[ALL  ]    /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: final link failed: Invalid operation
[ALL  ]    collect2: ld returned 1 exit status

 

所以,很是奇怪:

之前一直正常用:

arm-arm920t-linux-gnueabi-gcc

去编译的,为何中间对于

rpc_main.c

rpc_hout.c

rpc_cout.c

rpc_parse.c

rpc_scan.c

rpc_util.c

rpc_svcout.c

rpc_clntout.c

rpc_tblout.c

rpc_sample.c

去都是用gcc去编译了?

3.对于此现象,看到别人也有类似的:

http://pastebin.com/NqUVcuLw

中的:

[ALL  ]    make[5]: Entering directory `/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/src/glibc-2.9/sunrpc'
[ALL  ]    gcc rpc_main.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_main.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_main.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_main.o
[ALL  ]    gcc rpc_hout.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_hout.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_hout.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_hout.o
[ALL  ]    rpc_hout.c: In function 'pdeclaration':
[ALL  ]    rpc_hout.c:584:3: warning: format not a string literal and no format arguments
[ALL  ]    rpc_main.c: In function 'h_output':
[ALL  ]    rpc_main.c:652:7: warning: format not a string literal and no format arguments
[ALL  ]    gcc rpc_cout.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_cout.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_cout.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_cout.o
[ALL  ]    gcc rpc_parse.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_parse.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_parse.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_parse.o
[ALL  ]    gcc rpc_scan.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_scan.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_scan.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_scan.o
[ALL  ]    gcc rpc_util.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_util.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_util.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_util.o
[ALL  ]    gcc rpc_svcout.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_svcout.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_svcout.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_svcout.o
[ALL  ]    gcc rpc_clntout.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_clntout.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_clntout.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_clntout.o
[ALL  ]    rpc_svcout.c: In function 'write_real_program':
[ALL  ]    rpc_svcout.c:366:3: warning: format not a string literal and no format arguments
[ALL  ]    gcc rpc_tblout.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_tblout.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_tblout.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_tblout.o
[ALL  ]    gcc rpc_sample.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_sample.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_sample.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_sample.o
[ALL  ]    gcc rpcinfo.c -c -std=gnu99 -fgnu89-inline -O2 -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-stack-protector -Wstrict-prototypes      -I../include -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc -I/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I. -I /lib/modules/3.3.0-gentoo-r1/build/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1     -D_RPC_THREAD_SAFE_ -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpcinfo.o -MD -MP -MF /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpcinfo.o.dt -MT /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpcinfo.o
[ALL  ]    gcc -nostdlib -nostartfiles -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpcgen  -Wl,-dynamic-linker=/lib64/ld-linux-x86-64.so.2   -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/csu/crt1.o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/csu/crti.o `gcc --print-file-name=crtbegin.o` /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_main.o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_hout.o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_cout.o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_parse.o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_scan.o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_util.o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_svcout.o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_clntout.o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_tblout.o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpc_sample.o  -Wl,-rpath-link=/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/math:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/elf:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/dlfcn:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/nss:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/nis:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/rt:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/resolv:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/crypt:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/nptl /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/libc.so.6 /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/libc_nonshared.a -lgcc -Wl,--as-needed -lgcc_s  -Wl,--no-as-needed `gcc --print-file-name=crtend.o` /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/csu/crtn.o
[ALL  ]    CPP='gcc -E -x c-header'  /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/elf/ld-linux-x86-64.so.2 --library-path /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/math:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/elf:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/dlfcn:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/nss:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/nis:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/rt:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/resolv:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/crypt:/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/nptl /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/xbootparam_prot.T
[ERROR]    make[5]: *** [/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef/sunrpc/xbootparam_prot.stmp] Segmentation fault
[ALL  ]    make[5]: *** Waiting for unfinished jobs....
[ALL  ]    make[5]: Leaving directory `/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/src/glibc-2.9/sunrpc'
[ERROR]    make[4]: *** [sunrpc/others] Error 2
[ALL  ]    make[4]: Leaving directory `/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/src/glibc-2.9'
[ERROR]    make[3]: *** [all] Error 2
[ALL  ]    make[3]: Leaving directory `/freescale/buildroot-2012.02-up/output/build/build-toolchain/.build/arm-unknown-linux-gnueabi/build/build-localedef'
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@172]
[ERROR]  >>        called from: do_libc_locales[scripts/build/libc/glibc.sh@116]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@306]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@595]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      '/freescale/buildroot-2012.02-up/output/host/usr/share/doc/ct-ng-1.13.4/B - Known issues.txt'
[ERROR]  
[ERROR]  (elapsed: 21:47.50)
make[2]: *** [build] Error 2
make[1]: *** [build.2] Error 2
make: *** [/freescale/buildroot-2012.02-up/output/stamps/ct-ng-toolchain-built] Error 2

 

4.另外这人:

http://pastebin.com/1cAZt41y

也是的,先是arm-rpi-linux-gnueabi-gcc:

[ALL  ]    arm-rpi-linux-gnueabi-gcc     rpc_sample.c -c -std=gnu99 -fgnu89-inline -Os -U_FORTIFY_SOURCE -Wall -Winline -Wwrite-strings -fmerge-all-constants -march=armv6zk -mcpu=arm1176jzf-s -mfpu=vfp -mhard-float -mlittle-endian -mtune=arm1176jzf-s -Wstrict-prototypes        -I../include -I/Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/build/build-libc-final/sunrpc -I/Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/build/build-libc-final -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/eabi/nptl -I../ports/sysdeps/unix/sysv/linux/arm/eabi -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/eabi -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/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../nptl -I../ports  -I.. -I../libio -I. -nostdinc -isystem /Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/buildtools/lib/gcc/arm-rpi-linux-gnueabi/4.7.3/include -isystem /Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/buildtools/lib/gcc/arm-rpi-linux-gnueabi/4.7.3/include-fixed -isystem /Volumes/Crosstool/arm-rpi-linux-gnueabi/arm-rpi-linux-gnueabi/sysroot/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1    -D_RPC_THREAD_SAFE_ -o /Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/build/build-libc-final/sunrpc/rpc_sample.o -MD -MP -MF /Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/build/build-libc-final/sunrpc/rpc_sample.o.dt -MT /Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/build/build-libc-final/sunrpc/rpc_sample.o

后来也是用gcc:

[ALL  ]    gcc rpc_main.c -c -D_RPC_THREAD_SAFE_ -D_CROSS_RPCGEN_               -o /Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o -MD -MP -MF /Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o.dt -MT /Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o
[ALL  ]    In file included from rpc_main.c:51:
[ERROR]    proto.h:61: error: expected declaration specifiers or '...' before numeric constant
[ERROR]    proto.h:61: error: expected ')' before '!=' token
[ERROR]    proto.h:61: error: expected ')' before '?' token
[ALL  ]    rpc_main.c: In function 'h_output':
[ALL  ]    rpc_main.c:654: warning: format not a string literal and no format arguments
[ALL  ]    rpc_main.c:654: warning: format not a string literal and no format arguments
[ERROR]    make[3]: *** [/Volumes/CrosstoolCompile1/crosstool-ng-1.17.0/.build/arm-rpi-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_main.o] Error 1

然后出错的。

5.搜:

crosstool-ng gcc rpc_main.c

找到:

http://crosstool-ng.org/download/ibot-logs/2013-05-26.html

中的讨论,和我此处问题,有点类似。

参考后,去看看我的.config中的:

CT_TOOLCHAIN_ENABLE_NLS

然后也是没有设置:

# CT_TOOLCHAIN_ENABLE_NLS is not set

而我此处的linux kernel也是自定义的2.6.30.4:

#
# Operating System
#
CT_KERNEL_SUPPORTS_SHARED_LIBS=y
CT_KERNEL="linux"
CT_KERNEL_VERSION="custom"
CT_KERNEL_linux=y
# CT_KERNEL_bare_metal is not set
CT_KERNEL_linux_AVAILABLE=y
# CT_KERNEL_V_3_7_3 is not set
# CT_KERNEL_V_3_7_2 is not set
# CT_KERNEL_V_3_7_1 is not set
# CT_KERNEL_V_3_7 is not set
# CT_KERNEL_V_3_6 is not set
# CT_KERNEL_V_3_5 is not set
# CT_KERNEL_V_3_4 is not set
# CT_KERNEL_V_3_3 is not set
# CT_KERNEL_V_3_2 is not set
# CT_KERNEL_V_3_1 is not set
# CT_KERNEL_V_3_0 is not set
# CT_KERNEL_V_2_6_39 is not set
# CT_KERNEL_V_2_6_38 is not set
# CT_KERNEL_V_2_6_37 is not set
# CT_KERNEL_V_2_6_36 is not set
# CT_KERNEL_V_2_6_33 is not set
# CT_KERNEL_V_2_6_32 is not set
# CT_KERNEL_V_2_6_31 is not set
# CT_KERNEL_V_2_6_27 is not set
CT_KERNEL_LINUX_CUSTOM=y
CT_KERNEL_LINUX_CUSTOM_LOCATION="/home/develop/crosstool-ng/src/linux-2.6.30.4.tar.bz2"
CT_KERNEL_windows_AVAILABLE=y
CT_KERNEL_bare_metal_AVAILABLE=y

另外:

# CT_STATIC_TOOLCHAIN is not set

# CT_GDB_CROSS_STATIC is not set

根本就没有:CT_CC_STATIC_LIBSTDCXX

6.这人:

building toolchain on MacOSX – error compiling eglibc

遇到和我一样的错误,其回复者:

Re: building toolchain on MacOSX – error compiling eglibc

让去查查,是不是系统中没有安装gettext。

所以先去查查:

Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ which gettext
/usr/bin/gettext

所以很明显,是有的。只是此处不知道为何从交叉编译器,变成gcc,估计才导致此种错误的。

7。从:

building toolchain on MacOSX – error compiling eglibc

->

Re: [PATCH 1 of 1] patches/eglic/2_13: Make build of sunrpc/timezone portable

->

Re: portable build of eglibc

又去看了看:

Attachment: 120-cross-rpcgen-portable.patch

Description: Binary data

Attachment: 121-cross-rpcgen-portable.patch

Description: Binary data

Attachment: 122-cross-rpcgen-portable.patch

Description: Binary data

Attachment: 123-cross-rpcgen-portable.patch

Description: Binary data

Attachment: 124-cross-zic-portable.patch

Description: Binary data

虽然是针对eglibc 2.9的,但是好像就是用于解决此处的cygwin下编译eglibc的问题的。

所以,我之前下载到:

E:\dev_install_root\cygwin\home\develop\crosstool-ng\crosstool-ng-1.18.0\patches\eglibc\2_15

的那几个patch,是针对于eglibc 2.15的patch,如果起效果了,应该可以解决此处在cygwin下编译eglibc的问题的。

所以,现在感觉应该是去:

彻底的删除掉eglibc的代码:

即,去删除:

文件夹:E:\dev_install_root\cygwin\home\develop\crosstool-ng\crosstool-ng-1.18.0_build\.build\src\eglibc-2_15

两个文件:

E:\dev_install_root\cygwin\home\develop\crosstool-ng\crosstool-ng-1.18.0_build\.build\src\.eglibc-2_15.extracted

E:\dev_install_root\cygwin\home\develop\crosstool-ng\crosstool-ng-1.18.0_build\.build\src\.eglibc-2_15.patched

之后,再去彻底的clean一遍,再去编译,或许就可以了。

现在去clean:

Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng clean
  CLEAN config
  CLEAN config.gen
  CLEAN log

再彻底清除eglibc代码:

彻底删除:E:\dev_install_root\cygwin\home\develop\crosstool-ng\crosstool-ng-1.18.0_build\.build\src\eglibc-2_15

彻底删除:

E:\dev_install_root\cygwin\home\develop\crosstool-ng\crosstool-ng-1.18.0_build\.build\src\.eglibc-2_15.extracted

E:\dev_install_root\cygwin\home\develop\crosstool-ng\crosstool-ng-1.18.0_build\.build\src\.eglibc-2_15.patched

重新编译:

ct-ng build

然后到时候看看

编译输出中,是否有对应的

eglibc 解压,并打补丁

的信息,如果有,再去确认:

是不是对应的

libc/sunrpc/proto.h

libc/sunrpc/rpc/types.h

libc/timezone/zic.c

libc/sunrpc/Makefile

libc/Makeconfig

等文件,是否改变了。

 

关于补丁,其中最核心的,感觉是:

100-fix_cross_rpcgen.patch

对此,去搜了下,发现别处也有:

(1)https://dev.openwrt.org.cn/browser/trunk/toolchain/eglibc/patches/2.15/100-fix_cross_rpcgen.patch?rev=668

(2)http://enduser.subsignal.org/~trondah/tree/toolchain/eglibc/patches/2.15/100-fix_cross_rpcgen.patch

(3)https://code.hiwifi.com/changeset/3/trunk/toolchain

中也有:

  • eglibc/patches/2.15
  • eglibc/patches/2.15/001-fix_autoconf_macro.patch

  • eglibc/patches/2.15/050-all_glibc-2.14-leak-revert-crash.patch

  • eglibc/patches/2.15/100-fix_cross_rpcgen.patch

  • eglibc/patches/2.15/110-fix_cross_zic.patch

  • eglibc/patches/2.15/120-use_host_cflags.patch

  • eglibc/patches/2.15/200-add-dl-search-paths.patch

  • 此处,目测:

    100-Remove-test-for-__builtin_expect.patch

    001-fix_autoconf_macro.patch

    中好像是有冲突,因为都修改了configure文件。

    但是先不管,去重新编译再说。

    8.此处继续去编译了。

    看到期间有显示,对于eglibc的解压和打补丁:

    [EXTRA]    Extracting 'eglibc-ports-2_15'
    [EXTRA]    Patching 'eglibc-ports-2_15'

    结果最后还是出现那个:

    [INFO ]  =================================================================
    [INFO ]  Installing pass-2 core C compiler
    [EXTRA]    Configuring gcc
    [EXTRA]    Building gcc
    [EXTRA]    Installing gcc
    [INFO ]  Installing pass-2 core C compiler: done in 1048.05s (at 69:32)
    [EXTRA]  Saving state to restart at step 'libc'...
    [INFO ]  =================================================================
    [INFO ]  Installing C library
    [EXTRA]    Configuring C library
    [EXTRA]    Building C library
    [ERROR]    rpc/types.h:73:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_char'
    [ERROR]    rpc/types.h:74:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_short'
    [ERROR]    rpc/types.h:75:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_int'
    [ERROR]    rpc/types.h:76:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_long'
    [ERROR]    rpc/types.h:77:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'quad_t'
    [ERROR]    rpc/types.h:78:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u_quad_t'
    [ERROR]    rpc/types.h:79:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fsid_t'
    [ERROR]    rpc/types.h:83:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'daddr_t'
    [ERROR]    rpc/types.h:84:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'caddr_t'
    [ERROR]    make[3]: *** [/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-final/sunrpc/cross-rpc_parse.o] Error 1
    [ERROR]    make[2]: *** [sunrpc/others] Error 2
    [ERROR]    make[1]: *** [all] Error 2
    [ERROR]  \
    [ERROR]  >>
    [ERROR]  >>  Build failed in step 'Installing C library'
    [ERROR]  >>        called in step '(top-level)'
    [ERROR]  >>
    [ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
    [ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@441]
    [ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
    [ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
    [ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]
             /
    
    Current command:
      'make' '-j4' '-l' 'all'
    exited with error code: 2
    Please fix it up and finish by exiting the shell with one of these values:
        1  fixed, continue with next build command
        2  repeat this build command
        3  abort build

    的错误,很明显,是之前的patch,都没生效。

    所以,接下来,应该花点时间,去研究一下,为何此处的patch没有生效:

     

     

    【总结】



    发表评论

    电子邮件地址不会被公开。 必填项已用*标注

    无觅相关文章插件,快速提升流量