0
我想在Windows下的Cygwin下创建一个交叉编译器工具链,这样我(或者我正在帮助的人 - 我会使用Linux但是Windows更容易许多人)可以编译针对MIPS架构的源代码。构建交叉编译器的glibc在Cygwin上失败
我有一个脚本,使用下面的代码成功地构建了MIPS交叉编译工具链下x86_64的Linux上:
https://github.com/UoMCS/mips-cross-compile/tree/glibc
然而,当我在Cygwin下运行该脚本,它在失败glibc的install-headers
相以下错误:
gcc -D_RPC_THREAD_SAFE_ -D_GNU_SOURCE -DIS_IN_build -include /home/Cygwin/xc/mips-linux/tmp/build-glibc/config.h rpc_main.c \
-o /home/Cygwin/xc/mips-linux/tmp/build-glibc/sunrpc/cross-rpc_main.o -MMD -MP -MF /home/Cygwin/xc/mips-linux/tmp/build-glibc/sunrpc/cross-rpc_main.o.dt -MT /home/Cygwin/xc/mips-linux/tmp/build-glibc/sunrpc/cross-rpc_main.o -c
rpc_main.c: In function ‘find_cpp’:
rpc_main.c:329:17: error: storage size of ‘buf’ isn’t known
struct stat64 buf;
^
rpc_main.c: In function ‘checkfiles’:
rpc_main.c:1117:17: error: storage size of ‘buf’ isn’t known
struct stat64 buf;
^
Makefile:163: recipe for target '/home/Cygwin/xc/mips-linux/tmp/build-glibc/sunrpc/cross-rpc_main.o' failed
make[2]: *** [/home/Cygwin/xc/mips-linux/tmp/build-glibc/sunrpc/cross-rpc_main.o] Error 1
make[2]: Leaving directory '/home/Cygwin/xc/mips-linux/tmp/glibc-2.21/sunrpc'
Makefile:213: recipe for target 'sunrpc/install-headers' failed
make[1]: *** [sunrpc/install-headers] Error 2
make[1]: Leaving directory '/home/Cygwin/xc/mips-linux/tmp/glibc-2.21'
Makefile:9: recipe for target 'install-headers' failed
make: *** [install-headers] Error 2
我不知道为什么我在Cygwin下得到这个错误,但不是Linux,因为对于的binutils,GCC,glibc的源文件和内核相同(全部由构建脚本自动下载)。通过搜索相同的错误消息,我找不到任何有用的提示。任何人都可以提出什么可能是问题?
我使用的主机环境下列软件:
- 的Windows 7 64位
- Cygwin的2.0.0(64位)
- GCC 4.9.2
谢谢。看起来glibc根本就不会工作 - 我并不是真的想要破解源代码,以便在破解很多其他东西的情况下构建它(我会尽快尝试使用它基本搜索/替换)。 – pwaring