【问题标题】:Getting error when trying to run make on a github repo windows 10尝试在 github repo windows 10 上运行 make 时出错
【发布时间】:2020-02-03 00:37:53
【问题描述】:

当我尝试编译这个程序时,我得到了以下错误,我不知道如何解决它.. 我尝试了make -DCC=gcc 当我尝试谷歌搜索问题时,我从另一个帖子中得到了这个,但没有帮助,而是给了我另一个错误消息

PS \massdns> make
mkdir -p bin
cc  -O3 -std=c11 -DHAVE_EPOLL -DHAVE_SYSINFO -Wall -fstack-protector-strong main.c -o bin/massdns
process_begin: CreateProcess(NULL, cc -O3 -std=c11 -DHAVE_EPOLL -DHAVE_SYSINFO -Wall -fstack-protector-strong main.c -o bin/massdns, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:5: all] Error 2

来自 make -DCC=gcc 的错误消息

PS massdns> make -DCC=gcc
C:\ProgramData\chocolatey\lib\make\tools\install\bin\make (pid = 4284)
C:\ProgramData\chocolatey\lib\make\tools\install\bin\make is suspending for 30 seconds...done sleep(30). Continuing.
make: *** C=gcc: No such file or directory.  Stop.

一直在努力解决这个问题,如果有人可以提供帮助,那将是非常重要的


Repo 说要安装这个,做这个

Clone the git repository and cd into the project root folder. Then run make to build from source. If you are not on Linux, run make nolinux. On Windows, the Cygwin packages gcc-core, git and make are required.

编辑:我确实尝试了 make nolinux 命令,只是忘记了,因为我一直在尝试这样做,它的输出相同,这是输出

PS massdns> make nolinux
mkdir -p bin
cc  -O3 -std=c11 -Wall -fstack-protector-strong main.c -o bin/massdns
process_begin: CreateProcess(NULL, cc -O3 -std=c11 -Wall -fstack-protector-strong main.c -o bin/massdns, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:11: nolinux] Error 2

【问题讨论】:

  • 你试过make nolinux这个命令了吗?
  • @rfmodulator 是的,对不起,我忘记了,我用帖子中的输出更新了它。
  • 您可以尝试make V=1 nolinux 以获得详细输出。还有其他参数可以传递给make,它们也会显示不同级别的详细程度。 ...这里的想法是找出它找不到哪个文件。
  • @rfmodulator 感谢您提供帮助。我想当然是我的错。再次感谢您的帮助。

标签: gcc makefile cygwin


【解决方案1】:

问题解决了,当然是用户错误。

不熟悉您如何通过 Cygwin 安装程序安装包、gcc-core、git,因为这是我在安装程序上没有见过的非常独特的交互。我还必须在 Cygwin 终端内执行 git clone repo_url,并且还必须在 Cygwin 终端内运行 make 目录。

【讨论】:

  • 所有 cygwin 工具在 Cygwin 终端上工作得更好。由于存在链接,某些 CMD 根本不起作用
猜你喜欢
  • 2018-11-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-12-22
  • 2020-05-24
  • 1970-01-01
相关资源
最近更新 更多