2
我想用cygwin交叉编译strace到Android模拟器。我用这个article 作为我的出发点。我按照这些instructions安装了交叉编译器。然后,我准备用使用cygwin交叉编译到arm-linux
./configure -host=arm-linux
现在的Makefile,当我做make
我得到以下错误:
$ make
make all-recursive
make[1]: Entering directory `/home/bruce/strace-4.6'
Making all in tests
make[2]: Entering directory `/home/bruce/strace-4.6/tests'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bruce/strace-4.6/tests'
make[2]: Entering directory `/home/bruce/strace-4.6'
arm-linux-gcc -DHAVE_CONFIG_H -I. -I./linux/arm -I./linux -I./linux -Wall -Wwr
ite-strings -g -O2 -MT block.o -MD -MP -MF .deps/block.Tpo -c -o block.o block.c
block.c: In function `block_ioctl':
block.c:198: error: `u64' undeclared (first use in this function)
block.c:198: error: (Each undeclared identifier is reported only once
block.c:198: error: for each function it appears in.)
block.c:271: error: `BLKTRACESTOP' undeclared (first use in this function)
make[2]: *** [block.o] Error 1
make[2]: Leaving directory `/home/bruce/strace-4.6'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bruce/strace-4.6'
make: *** [all] Error 2
这就算我追加-static Makefile中的CFLAGS变量之后(我为什么要发生做这个?)。请帮忙。
这里是线198-206:
case BLKGETSIZE64:
if (exiting(tcp)) {
uint64_t val;
if (syserror(tcp) || umove(tcp, arg, &val) < 0)
tprintf(", %#lx", arg);
else
tprintf(", %" PRIu64, val);
}
break;