bash - 在 Windows 64 位 :/usr/bin/sh: -c: line 0: syntax error near unexpected token `make` 的 cygwin 上使用 `(' 时出错

标签 bash makefile cygwin mingw charniak-parser

尝试编译时this project在 cygwin64 中使用 make 时,遇到此错误:

carolyns@ugrpc /cygdrive/c/Program Files (x86)/Discourse_Parser_Dist/bllip-parser-master/bllip-parser-master
$ make
C:/Program Files (x86)/GnuWin32/bin/make -C first-stage/PARSE parseIt
/usr/bin/sh: -c: line 0: syntax error near unexpected token `('
/usr/bin/sh: -c: line 0: `C:/Program Files (x86)/GnuWin32/bin/make -C first-stage/PARSE parseIt'
make: *** [PARSE] Error 1

一些调查表明问题可能是我的 bash 版本,但我按照建议使用 V4

carolyns@ugrcpc /cygdrive/c/Program Files (x86)/Discourse_Parser_Dist/bllip-parser-master/bllip-parser-master
$ bash --version
GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

以及制作V3.81

carolyns@ugrpc /cygdrive/c/Program Files (x86)/Discourse_Parser_Dist/bllip-parser-master/bllip-parser-master
$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

我还按照 this issue 的建议添加了 SHELL :=/bin/bash

此错误的其他来源似乎与我的情况无关( echo problem )。

我也使用 MinGW64 尝试过此操作,结果相同。我也尝试过moving the folder out of the Program Files directory ,结果相同。

任何帮助将不胜感激。

最佳答案

已修复

它对我的 make 路径(包括 Program Files (x86))不满意。我移动了 make 并强制它使用新路径并得到了一个 Shiny 的新错误。

希望这可以帮助另一个 Windows 新手。

关于bash - 在 Windows 64 位 :/usr/bin/sh: -c: line 0: syntax error near unexpected token `make` 的 cygwin 上使用 `(' 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60774364/

相关文章:

bash - 在 bash 中重用字符串

c++ - 编译器错误 c++ msys-1.0.dll windows

c - 适用于 Windows 和 Cygwin 的 Makefile

Makefile 变量赋值提前执行

permissions - 如何使用 Cygwin 中的 cp.exe 并保留权限

linux - stdout, stderr 总是可以发送到常规文件吗?

linux - 如何将 ctrl+d 插入到我的 linux 脚本中?

linux - 将具有相似文件名的文件重命名为相同文件名但不同文件夹

git - 类似 GNU screen 的 Git Bash 多 session 管理器

windows - 在 Windows 7 上通过 cygwin/node.js 创建音频 Sprite 需要一些帮助