Unsolved MinGW: Error 2
I have a project I have been regularly compiling for a long time, but haven't changed lately.
Suddenly, when I try to compile it, I get "error 2" from MinGW: It seems like the library (.a) file cannot be created or written.
My compiler is the MinGW 4.8.2 32 bit that came with a pretty up-to-date Qt installer installation.
Things I have analyzied / tried:
- The very same kit works with dozens of other projects
- The very same environment works with dozens of other projects
- The very same project compiled just fine yesterday, without any conscious changes since then
- The target path exists, and I have write permissions
- I have tried clean rebuild
- I have tried manually deleting all makefiles, and having them regenerated
- I have tried deleting the .pro.user file, and regenerate it from the .pro file (just chose the right kid, no special settings - this is the way it works with all other projects).
Any ideas what else I could try?
Hi! If you really didn't change anything then "someone else" must have changed something. Maybe the filesystem is corrupted or it's a harddrive failure?
It's a project nobody else normally works on. Plus, the files are identical to a three-month old backup as well as to the copy on the central compile server. (Where I don't have this problem, because I only run MinGW locally to get additional warnings).
It very much looks like some kind of configuration problem in Creator / MinGW, but since I let the online installer do all the magic, I know very little about that configuration.
@Asperamanca Maybe the harddrive broke your compiler binary. Don't laugh. I had issues with a crashing firefox and then I found that it was caused by the HDD that was about to die.
Here's the interesting thing: When the .a-File already exists, MinGW has no problem updating it. I only get the error when the file does not exist at all.
Also, I modify some environment variables when starting Creator. Specifically, I modify some paths that normally point to folders on the compile server and redirect them to my local drive. Reason: These paths end up in the INCPATH. When I have both my local and compile server paths in there, Creator will always jump to the files on the the compile server when "following symbols", for some reason (even though the order is clearly "local fist, remote later", which is a huge pain in the...you know where.
When I do not modify these variables, Creator can create the .a file.
I had the same configuration with Creator 3.2.2 and no issues...