MinGW并行生成:CreateProcess错误 [英] MinGW parallel make: CreateProcess error

查看:110
本文介绍了MinGW并行生成:CreateProcess错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows 10下使用MinGW作为我的开发工具.我有一个带有约100个源文件的C项目.我创建了一个makefile来构建项目,并且每次都运行良好.

I am using MinGW under Windows 10 for my development tools. I have a C project with ~100 source files. I created a makefile to build the project, and it worked fine, every time.

但是后来我尝试通过将-j4传递给mingw32-make并告诉它并行使用四个处理器来加快构建速度.确实确实加快了构建速度,但是只是一小段时间:经过看似随机的编译次数(每次更改次数),我得到了错误

But then I tried to speed up the build by passing -j4 to mingw32-make, telling it to use four processors in parallel. This did indeed speed up the build, but only for a while: after a seemingly random number of compilations (the number changes every time), I get the error

gcc.exe:错误:CreateProcess:没有这样的文件或目录

gcc.exe: error: CreateProcess: No such file or directory

我在-j2上也遇到了此错误,但似乎不太常见.

I also get this error with -j2, but it seems to be less common.

mingw32-make --version报告

GNU Make 4.1
为i686-w64-mingw32构建

GNU Make 4.1
Built for i686-w64-mingw32

我在Qt Creator下也有一个大型C ++项目,这也表现出完全相同的问题.

I also have a large C++ project under Qt Creator, and this exhibits exactly the same problem.

有什么想法会导致此随机CreateProcess错误?

Any ideas what could be causing this random CreateProcess error?

以下是CreateProcess调用失败的示例:

Here is an example of a failing CreateProcess call:

CreateProcess(C:\Users\TonyK\AppData\Local\Temp\make44344-14.bat,C:\Users\TonyK\AppData\Local\Temp\make44344-14.bat,...)

推荐答案

我想我知道问题出在哪里:BullGuard.这个反病毒程序是我遇到的最讨厌的程序,对于认真的开发人员来说是完全不切实际的.它不止一次拒绝运行我自己编译的程序.最后一根稻草是由于它正在执行某些可疑"操作而中断了我的QtCreator开发环境(我不知道-产生了子进程之类的东西),我丢失了四个源文件!幸运的是,我当天备份了,所以只花了几个小时的工作.

I think I know what the problem was: BullGuard. This anti-virus program is the most officious that I have come across, and is completely impractical for a serious developer. More than once it has refused to run programs that I have compiled myself. The last straw was when it interrupted my QtCreator development environment because of some 'questionable' operation it was performing (I don't know -- spawning a sub-process or something), and I lost four of my source files! Luckily I had a same-day backup, so it only cost me a couple of hours' work.

所以我卸载了BullGuard.

So I uninstalled BullGuard.

现在我的并行制作就像梦一样!

And now my parallel make runs like a dream!

这篇关于MinGW并行生成:CreateProcess错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆