Re: [CMake] CMAKE - troubles finding executables/paths - Windows 7 / MinGW
Yes, I know this [1] thread is old, but it hurts me, too. This is what I found: The mingw32 installer (mingw32-get, IIRC) no longer places a key in the windows registry. So if anyone installed mingw32 in a directory other than c:/MinGW/, cmake will not find it. After adding the bin directory of the mingw install location to %PATH%, cmake will detect mingw32-make, but it will complain saying 'the compiler is not able to build a single program'. This happens because cc1.exe (which is *not* in the bin directory) cannot find the DLLs located in the bin directory. You have to manually copy the DLLs to the directory containing cc1.exe. Maybe someone finds this useful. Martin [1] https://cmake.org/pipermail/cmake/2011-May/044637.html -- Cd wrttn wtht vwls s mch trsr. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CMAKE - troubles finding executables/paths - Windows 7 / MinGW
I can't reproduce the problem although I did recently upgrade to cmake 2.8.4. It is important to have c:/MinGW/bin (or your bin location) in the system path. On Tue, May 31, 2011 at 2:00 PM, Bill Hoffman bill.hoff...@kitware.com wrote: On 5/31/2011 12:57 PM, Bill Lorensen wrote: Steve, I'm not sure why cmake won't find mingw's make. I build with mingw every day. If I run the cmake gui from a fresh build tree, I get the same error. Then I use the gui to browse to the location of make.exe and then all runs fine. That sounds like a pain... Must be something that changed in mingw... In Modules/CMakeMinGWFindMake.cmake is where the problem must be. It has this: FIND_PROGRAM(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin c:/MinGW/bin /MinGW/bin) I am guessing the installer registry changed. If one of you could try some other paths to try in this find_program, I would be happy to merge them in to CMake 2.8.5. Thanks. -Bill ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE - troubles finding executables/paths - Windows 7 / MinGW
On 6/1/2011 10:13 AM, Bill Lorensen wrote: I can't reproduce the problem although I did recently upgrade to cmake 2.8.4. It is important to have c:/MinGW/bin (or your bin location) in the system path. If c:/MinGW/bin is in your PATH then it will always work. However, it should also work without that. So, to reproduce, if you remove that from your PATH and re-run it should have the problem. -Bill ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE - troubles finding executables/paths - Windows 7 / MinGW
I have different problems if I remove it. When I run cmake cannot find several dll's required for the compilers to work are missing. So I think as part of the install process, a mingw user should add it to their path. Bill On Wed, Jun 1, 2011 at 3:44 PM, Bill Hoffman bill.hoff...@kitware.com wrote: On 6/1/2011 10:13 AM, Bill Lorensen wrote: I can't reproduce the problem although I did recently upgrade to cmake 2.8.4. It is important to have c:/MinGW/bin (or your bin location) in the system path. If c:/MinGW/bin is in your PATH then it will always work. However, it should also work without that. So, to reproduce, if you remove that from your PATH and re-run it should have the problem. -Bill ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE - troubles finding executables/paths - Windows 7 / MinGW
Steve, I'm not sure why cmake won't find mingw's make. I build with mingw every day. If I run the cmake gui from a fresh build tree, I get the same error. Then I use the gui to browse to the location of make.exe and then all runs fine. Bill On Tue, May 31, 2011 at 12:08 PM, Steve Westenbroek smwes...@usgs.gov wrote: [disclaimer: portions of the text below is from an earlier contribution that I made to stackoverflow.com; I'll cross-post any solutions as well!] Greetings, I have reached the end of my rope with Cmake; it has so much potential, but I cannot seem to make it find the basic system tools (i.e. make) in order to function. SYMPTOMS Cmake and the Cmake GUI produce the following (after deleting the CMakeCache.txt file): Processing top-level CMakelists.txt for project swb CMake Error: CMake was unable to find a build program corresponding to MinGW Makefiles. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. I am focusing on finding make in this question, however, I've also had many of the same issues with CMake failing to find libraries and other utility files (linker, nm, ar, etc.). The techniques I list below seem to enable CMake to find these files when running under Linux. SYSTEM Windows 7 (64-bit); multiple versions of MinGW (32-bit/64-bit); Cmake 2.8.4; NONSTANDARD install location for MinGW (c:/MinGW-32 ). THINGS I HAVE TRIED 1) CMakelists.txt contains SET( CMAKE_MAKE_PROGRAM c:/MinGW-32/bin/make.exe FORCE ) within the first 10 lines of the file. 2) Previous versions of CMakelists.txt contained: find_program(CMAKE_MAKE_PROGRAM NAMES make make.exe DOC Find a suitable make program for building under Windows/MinGW HINTS c:/MinGW-32/bin ) 3) Set CMAKE_MAKE_PROGRAM in a cmd.exe environment variable prior to running either CMake or CMake-GUI. 4) Use of a toolchain file which identifies CMAKE_MAKE_PROGRAM as well as CMAKE_C_COMPILER, etc. QUESTION(S) How does one enable CMake to find my make program without user intervention with the Windows 7 (64-bit) / MinGW combination? Nothing I have tried thus far seems to make any difference; Cmake simply is unable to find make.exe even when explicitly given the fully qualified name. Thanks! - Steve Westenbroek ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMAKE - troubles finding executables/paths - Windows 7 / MinGW
On 5/31/2011 12:57 PM, Bill Lorensen wrote: Steve, I'm not sure why cmake won't find mingw's make. I build with mingw every day. If I run the cmake gui from a fresh build tree, I get the same error. Then I use the gui to browse to the location of make.exe and then all runs fine. That sounds like a pain... Must be something that changed in mingw... In Modules/CMakeMinGWFindMake.cmake is where the problem must be. It has this: FIND_PROGRAM(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin c:/MinGW/bin /MinGW/bin) I am guessing the installer registry changed. If one of you could try some other paths to try in this find_program, I would be happy to merge them in to CMake 2.8.5. Thanks. -Bill ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake