2

当我在 Cygwin 终端中运行 make 批处理文件时,我得到以下输出:

mparadis@A-082-MPARADI-0 ~/pepper_19/examples$ make  
make -C dlopen  
make[1]: Entering directory `/cygdrive/c/nacl_sdk/pepper_19/examples/dlopen' /cygdrive/c/nacl_sdk/pepper_19/toolchain/win_x86_glibc/bin/i686-nacl-g++ -o dlopen_x86_32.o -c
dlopen.cc -m32 -g -O0 -pthread -std=gnu++98 -Wno-long-long -Wall  
Makefile:92: recipe for target `dlopen_x86_32.o' failed  
make[1]: *** [dlopen_x86_32.o] Error 127  
make[1]: Leaving directory `/cygdrive/c/nacl_sdk/pepper_19/examples/dlopen'  
Makefile:33: recipe for target `dlopen_TARGET' failed  
make: *** [dlopen_TARGET] Error 2

正确设置 Python 需要一些时间,因为我需要它的语言解释器包并且不知道我还没有它。我env的 Python 变量已正确设置为C:\python27. 在编译我的同事代码时,我得到了相同的结果,我可以在 Mac 或 Linux 机器上很好地编译。不幸的是,我也需要让它在我的 Cygwin 环境中工作。

任何有使用谷歌本地客户端经验或知道为什么会发生这种情况的人请告知。我已经在这个问题上呆了很长时间,我正对着电脑屏幕盯着看。

更新:

如果我将--version标志插入到 makefile 中的引用命令中,我会收到与上述相同的错误。但是,如果我从与 make 文件相同的工作目录中按原样键入命令,则会得到以下信息:

mparadis@A-082-MPRADI-0 ~/pepper_19/examples/dlopen> $ /cygdrive/c/nacl_sdk/pepper_19/toolchain/win_x86_glibc/bin/i686-nacl-g++.exe -o dlopn_x86_32.o -c dlopen.cc -m32 -g -O0 -pthread -std=gnu++98 --version

mparadis@A-082-MPRADI-0 ~/pepper_19/examples/dlopen $

换句话说,它只是想了一秒钟,然后返回到提示。

4

1 回答 1

0

tl;博士您的cygwin可能有问题,并将此返回代码提供给所有批处理文件。我的这样做。我的cygwin版本:

$ uname -srv
CYGWIN_NT-6.1-WOW64 1.7.17(0.262/5/3) 2012-10-19 14:39

从您的评论中,我看到了一个叫做“ make.bat ”的东西:

mparadis@A-082-MPARADI-0 ~/pepper_19/examples/dlopen
$ ls dlopen.cc dlopen.html eightball.cc eightball.h make.bat Makefile

你也可以用这个小bash脚本测试你的 cygwin 。

#!/bin/bash
echo echo foo %errorlevel% bar >temp.bat
./temp.bat
if [ $? -eq 127 ]; then echo "bug"; fi

如果该目标的 make 配方使用make.bat,并且您有此错误,则此 cygwin 错误导致错误 127

于 2013-10-04T15:46:29.273 回答