View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011315 | CMake | CMake | public | 2010-10-15 06:23 | 2016-06-10 14:31 | ||||
Reporter | Adam J Richardson #2 | ||||||||
Assigned To | Bill Hoffman | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-8 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0011315: g++.exe: CreateProcess: No such file or directory | ||||||||
Description | See also bug 0009286. On my Windows XP system, the command: make VERBOSE=1 all gets me: C:\Programs\CMake28\bin\cmake.exe -HC:\Users\buildbot\Reu2\bin\bga120\build\Reu2 -BC:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake --check-build-system CMakeFiles\Makefile.cmake 0 C:\Programs\CMake28\bin\cmake.exe -E cmake_progress_start C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\CMakeFiles C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\CMakeFiles\progress.marks make -f CMakeFiles\Makefile2 all make[1]: Entering directory `C:/Users/buildbot/Reu2/bin/bga120/build/Reu2/cmake' make -f SmallTestLib\CMakeFiles\SmallTestLib.dir\build.make SmallTestLib/CMakeFiles/SmallTestLib.dir/depend make[2]: Entering directory `C:/Users/buildbot/Reu2/bin/bga120/build/Reu2/cmake' C:\Programs\CMake28\bin\cmake.exe -E cmake_depends "MinGW Makefiles" C:\Users\buildbot\Reu2\bin\bga120\build\Reu2 C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\SmallTestLib C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\SmallTestLib C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\SmallTestLib\CMakeFiles\SmallTestLib.dir\DependInfo.cmake --color= make[2]: Leaving directory `C:/Users/buildbot/Reu2/bin/bga120/build/Reu2/cmake' make -f SmallTestLib\CMakeFiles\SmallTestLib.dir\build.make SmallTestLib/CMakeFiles/SmallTestLib.dir/build make[2]: Entering directory `C:/Users/buildbot/Reu2/bin/bga120/build/Reu2/cmake' C:\Programs\CMake28\bin\cmake.exe -E cmake_progress_report C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\CMakeFiles 17 [ 2%] Building CXX object SmallTestLib/CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.obj cd C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\SmallTestLib && C:\Programs\MinGW\bin\g++.exe -DSmallTestLib_EXPORTS -Wwrite-strings -std=c++0x -pedantic-errors -pedantic -Wall -W -Weffc++ -Wmain -Wextra -DBUILD_DLL -Wno-long-long -Wno-comment -g -gdwarf-2 -o CMakeFiles\SmallTestLib.dir\src\SmallTestLib.cc.obj -c C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\SmallTestLib\src\SmallTestLib.cc make[2]: Leaving directory `C:/Users/buildbot/Reu2/bin/bga120/build/Reu2/cmake' make[1]: Leaving directory `C:/Users/buildbot/Reu2/bin/bga120/build/Reu2/cmake' g++.exe: CreateProcess: No such file or directory make[2]: *** [SmallTestLib/CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.obj] Error 1 make[1]: *** [SmallTestLib/CMakeFiles/SmallTestLib.dir/all] Error 2 make: *** [all] Error 2 Copy-and-pasting the commands into the same command prompt (and editing only to remove the prompt and word wrapping), they work fine. The compiler suite is known to work, it is installed properly and its binaries are in the path. It is used regularly with the Code::Blocks IDE and works without problems. I'm not sure why CMake is failing to call the compiler on this system. Any thoughts? | ||||||||
Additional Information | N:\Fossils>g++ --version g++ (GCC) 4.5.1 Copyright (C) 2010 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. I'm not sure if it's related, but I have to specify the "MinGW Makefiles" generator when I run cmake for the first time. It won't auto-detect the compiler. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0022495) Bill Hoffman (manager) 2010-10-15 08:20 |
0009286 says two things: 1. we reproduced the error by not having mingw in the PATH 2. the poster for that bug said it was not CMake related... Since it works from the same command line, it must be something to do with the environment of make. What if you take the same command and create a small makefile and run it from there? Something like this: makefile foo: cd C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\SmallTestLib && C:\Programs\MinGW\bin\g++.exe -DSmallTestLib_EXPORTS -Wwrite-strings -std=c++0x -pedantic-errors -pedantic -Wall -W -Weffc++ -Wmain -Wextra -DBUILD_DLL -Wno-long-long -Wno-comment -g -gdwarf-2 -o CMakeFiles\SmallTestLib.dir\src\SmallTestLib.cc.obj -c C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\SmallTestLib\src\SmallTestLib.cc make foo The other thing you can do is add -v to the CMAKE_CXX_FLAGS so that it shows all the commands being run. My guess is that g++ is trying to run some other command and not finding it for some reason (as.exe or ld.exe). |
(0022514) Adam J Richardson #2 (reporter) 2010-10-18 04:38 |
Thanks Bill. First I'll check the PATH, though I'm sure it's fine. Here is the global PATH for the system. Wow, I had no idea it had gotten so long. By the way, this is an "nLite"'d XP system in which one of the tweaks I made was to change the name of "Program Files" to "Programs". The shorter name makes command line stuff easier. %PROGRAMFILES% on this system dereferences to "C:\Programs". C:\Programs\Windows Resource Kits\Tools\;S:\Exch;S:\Exch\FAXSRV;C:\Programs\Pervasive Software\PSQL\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programs\ATI Technologies\ATI.ACE\Core-Static;C:\Programs\GNU\GnuPG\pub;C:\Programs\GTK2-Runtime\lib;C:\Programs\GTK2-Runtime\bin;C:\Programs\ESTsoft\ALZip\;C:\Programs\MinGW\bin;C:\Programs\Xalan\bin;C:\Programs\Xerces\bin;C:\Programs\doxygen\bin;C:\Programs\Graphviz\bin;C:\Programs\Boost\stage\lib;C:\Programs\qt-win-free-mingw-3.3.4\bin;C:\Programs\Lua\5.1;C:\Programs\Lua\5.1\clibs;Q:\Workspaces\IT\Stage\Boost\Win32-GCC-Multi\Shared-Release\lib;C:\Programs\Windows Imaging\;C:\Programs\CMake28\bin;C:\Programs\Python26;C:\Programs\Python26\Scripts;C:\Programs\WinSCP\ C:\Programs\MinGW\bin is in there. I can confirm there is a g++.exe present in that folder. I can copy and paste that address into the command prompt with "cd<space>" in front. Then: " C:\Programs\MinGW\bin>g++ --version g++ (GCC) 4.5.1 Copyright (C) 2010 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. C:\Programs\MinGW\bin> " As expected. So it's not the PATH. To be continued. |
(0022515) Adam J Richardson #2 (reporter) 2010-10-18 07:33 edited on: 2010-10-21 11:58 |
Next I'll try your makefile suggestion. I've created a small Makefile called Makefile.simple. Contents: " release: cd C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\SmallTestLib && C:\Programs\MinGW\bin\g++.exe -DSmallTestLib_EXPORTS -Wwrite-strings -std=c++0x -pedantic-errors -pedantic -Wall -W -Weffc++ -Wmain -Wextra -DBUILD_DLL -s -o CMakeFiles\SmallTestLib.dir\src\SmallTestLib.cc.obj -c C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\SmallTestLib\src\SmallTestLib.cc debug: cd C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\SmallTestLib && C:\Programs\MinGW\bin\g++.exe -DSmallTestLib_EXPORTS -Wwrite-strings -std=c++0x -pedantic-errors -pedantic -Wall -W -Weffc++ -Wmain -Wextra -DBUILD_DLL -Wno-long-long -Wno-comment -g -gdwarf-2 -o CMakeFiles\SmallTestLib.dir\src\SmallTestLib.cc.obj -c C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\SmallTestLib\src\SmallTestLib.cc " And from the command line: C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake>make VERBOSE=1 -f Makefile.si mple release cd C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\SmallTestLib && C:\Program s\MinGW\bin\g++.exe -DSmallTestLib_EXPORTS -Wwrite-strings -std=c++0x -pedantic- errors -pedantic -Wall -W -Weffc++ -Wmain -Wextra -DBUILD_DLL -s -o CMakeFiles\S mallTestLib.dir\src\SmallTestLib.cc.obj -c C:\Users\buildbot\Reu2\bin\bga120\bui ld\Reu2\SmallTestLib\src\SmallTestLib.cc g++.exe: CreateProcess: No such file or directory make: *** [release] Error 1 C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake>make VERBOSE=1 -f Makefile.si mple debug cd C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake\SmallTestLib && C:\Program s\MinGW\bin\g++.exe -DSmallTestLib_EXPORTS -Wwrite-strings -std=c++0x -pedantic- errors -pedantic -Wall -W -Weffc++ -Wmain -Wextra -DBUILD_DLL -Wno-long-long -Wn o-comment -g -gdwarf-2 -o CMakeFiles\SmallTestLib.dir\src\SmallTestLib.cc.obj -c C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\SmallTestLib\src\SmallTestLib.cc g++.exe: CreateProcess: No such file or directory make: *** [debug] Error 1 C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake> So it seems there is a problem in the MinGW make environment somewhere. Next I'll try your -v suggestion. I've added it to both targets in Makefile.simple. C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake>make VERBOSE=1 -f Makefile.si mple debug 1>make.output.txt 2>&1 C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake>make VERBOSE=1 -f Makefile.si mple release 1>make.output-2.txt 2>&1 C:\Users\buildbot\Reu2\bin\bga120\build\Reu2\cmake> Rather a lot of output here, so I'll host these files myself. https://dreamtrack.dnsalias.com/downloads/makefile-debug.txt [^] https://dreamtrack.dnsalias.com/downloads/makefile-release.txt [^] It does look as if MinGW Make simply isn't seeing g++.exe. Am I interpreting this wrongly? I think I need to raise a bug with MinGW and cross-link here. [EDIT] Aha. Wait a moment. What the heck is this? " as -o CMakeFiles\SmallTestLib.dir\src\SmallTestLib.cc.obj C:\Users\ARICHA~1\Temp\ccZ6Tt4P.s " Looks like it's trying to Assemble something. What the...? [EDIT] Bug posted with Savannah. I hope that's the right place. [EDIT] Bug linked removed. Apparently Savannah is not the right place. Good gods, but that's the worst welcome I've had to an online community in years. |
(0022517) Bill Hoffman (manager) 2010-10-18 09:04 |
Did you make sure as.exe was in your PATH? You can also add make targets that print out the PATH. I have seen stuff like this if the path has quoted args in it or other odd stuff that might get messed up going by gmake. |
(0022519) Adam J Richardson #2 (reporter) 2010-10-18 09:42 edited on: 2010-10-18 09:58 |
I just checked and as.exe is in the same location as g++.exe. Seems that's not the issue, the problem is as.exe can't find the temporary file it's looking for. Apparently, cc1plus.exe doesn't compile C++ code into machine code (as I had assumed) but instead converts it to Assembly, which as.exe then compiles into machine code. The problem is that the intermediate file isn't found by as.exe (because it's not there). Now, either cc1plus.exe doesn't create the file when invoked by make.exe, or it does create it and something deletes it before as.exe can get to it. Did I miss any possibilities? [EDIT] Here are two Filemon logfiles, one for running the make command and the other for running the cc1plus command by itself. https://dreamtrack.dnsalias.com/downloads/make1.log [^] https://dreamtrack.dnsalias.com/downloads/make2.log [^] Looks like g++ is indeed deleting the file, but I don't understand why. |
(0022582) Adam J Richardson #2 (reporter) 2010-10-21 12:02 edited on: 2010-10-21 12:05 |
Looking further into it, I see miscommunications between make and g++, corruption of command line options by cc1plus, etc. I'm just going to wipe out MinGW and reinstall. Thanks for the help Bill! Oh, I'll close the bug since it's clearly not a CMake issue. [EDIT] Or at least I would, if I could figure out how. Bill, would you mind closing this for me? Thanks. |
(0041753) Kitware Robot (administrator) 2016-06-10 14:28 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-10-15 06:23 | Adam J Richardson #2 | New Issue | |
2010-10-15 08:20 | Bill Hoffman | Note Added: 0022495 | |
2010-10-15 08:20 | Bill Hoffman | Status | new => assigned |
2010-10-15 08:20 | Bill Hoffman | Assigned To | => Bill Hoffman |
2010-10-18 04:38 | Adam J Richardson #2 | Note Added: 0022514 | |
2010-10-18 07:33 | Adam J Richardson #2 | Note Added: 0022515 | |
2010-10-18 07:40 | Adam J Richardson #2 | Note Added: 0022516 | |
2010-10-18 08:00 | Adam J Richardson #2 | Note Edited: 0022515 | |
2010-10-18 08:00 | Adam J Richardson #2 | Note Deleted: 0022516 | |
2010-10-18 09:04 | Bill Hoffman | Note Added: 0022517 | |
2010-10-18 09:42 | Adam J Richardson #2 | Note Added: 0022519 | |
2010-10-18 09:58 | Adam J Richardson #2 | Note Edited: 0022519 | |
2010-10-21 11:58 | Adam J Richardson #2 | Note Edited: 0022515 | |
2010-10-21 12:02 | Adam J Richardson #2 | Note Added: 0022582 | |
2010-10-21 12:05 | Adam J Richardson #2 | Note Edited: 0022582 | |
2016-06-10 14:28 | Kitware Robot | Note Added: 0041753 | |
2016-06-10 14:28 | Kitware Robot | Status | assigned => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |