Re: [CMake] CMake/CPack /w BundleUtilities on Windows with NSIS fails
On 13/02/2014 19:44, Bill Hoffman wrote: HI Bill, On 2/13/2014 2:23 PM, Bill Somerville wrote: I would really like to know why it is going wrong with dumpbin in package generation because using objtool is too slow! Sounds like a PATH issue. Try getting dumpbin to work from the command line that you are using. GetPrerequisites.cmake doesn't expect dumpbin on the PATH, it uses find_binary with some hard codes paths to find it and runs it with a full absolute path. It does try to inject the path of the found dumpbin + '..\..\Common7\IDE' into PATH before using it. This extra PATH element is where the DLLs that dumbin uses are located. This is where the problem lies. For some reason the set(ENV{PATH} ...) command is working in the cmake install target driven BundleUtilities::fixup_bundle call to GetPrerequisites::get_prerequisites. But when the package target is built the same code fails to update the PATH. Clearly CPack is doing something different (and deficient) when it processes the install () commands from CMakeLists.txt :( Can anyone help with how I can get CPack to behave the same a CMake for the same CMakeLists.txt? I would revert to my fix to force GetPrerequisites to use objdump but not only is it slow but also it doesn't copy the prerequisites into the package unless the package target is run twice. -Bill Bill. -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake/CPack /w BundleUtilities on Windows with NSIS fails
On 2/13/2014 2:23 PM, Bill Somerville wrote: I would really like to know why it is going wrong with dumpbin in package generation because using objtool is too slow! Sounds like a PATH issue. Try getting dumpbin to work from the command line that you are using. -Bill -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake/CPack /w BundleUtilities on Windows with NSIS fails
On 13/02/2014 18:10, Bill Somerville wrote: Hi, I have a CMake script that runs on Windows with MinGW Makefiles that builds the install target OK. It is a Qt GUI application and uses BundleUtilities::fixup_bundle to pull in and link/rpath prerequisites. When I build the package target with an NSIS packager it looks like the fixup_bundle stage breaks in some way. I get several of the following message box pop up in the install phase. --- link.exe - System Error --- The program can't start because mspdb80.dll is missing from your computer. Try reinstalling the program to fix this problem. --- OK --- If I dismiss them all the build finishes without error but none of the prerequisite libraries or Qt plugins are in the install kit (they go in /w the install target as expected). I suspect a PATH problem but have no idea how to debug this further. OK, so I have progressed a bit. This is something to do with the MS tool dumpbin which is used to analyse binaries for prerequisites as part of BundleUtilities::fixup_bundle. It looks for a suitable tool and on Windows prefers dumpbin over MinGW objdump. In my case even though I am using MinGW for builds, I have MSVC installed too. So for the install target dumpbin seems to work ok to analyse the binaries. I still don't understand why the package target goes wrong as described in the OP. Looking at the GetPrerequisites.cmake module I see that I can force the choice of binary analysis tool by defining the variable gp_tool. So I define it to "objdump" before executing fixup_bundle and it seems to work. the only problem is that it takes about 15 minutes (on i7 processor!) to complete a package generation that takes less than a minute when dumpbin is used :( I would really like to know why it is going wrong with dumpbin in package generation because using objtool is too slow! TIA Bill. Regards Bill. -- 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://www.cmake.org/mailman/listinfo/cmake
[CMake] CMake/CPack /w BundleUtilities on Windows with NSIS fails
Hi, I have a CMake script that runs on Windows with MinGW Makefiles that builds the install target OK. It is a Qt GUI application and uses BundleUtilities::fixup_bundle to pull in and link/rpath prerequisites. When I build the package target with an NSIS packager it looks like the fixup_bundle stage breaks in some way. I get several of the following message box pop up in the install phase. --- link.exe - System Error --- The program can't start because mspdb80.dll is missing from your computer. Try reinstalling the program to fix this problem. --- OK --- If I dismiss them all the build finishes without error but none of the prerequisite libraries or Qt plugins are in the install kit (they go in /w the install target as expected). I suspect a PATH problem but have no idea how to debug this further. TIA Bill. -- 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://www.cmake.org/mailman/listinfo/cmake