[cmake-developers] [CMake 0015002]: GetPrerequisites : fix objdump usage under non english locale
Mantis Bug Tracker
mantis at public.kitware.com
Wed Jul 2 12:38:28 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15002
======================================================================
Reported By: Olivier Trichet
Assigned To:
======================================================================
Project: CMake
Issue ID: 15002
Category: CMake
Reproducibility: always
Severity: minor
Priority: low
Status: new
======================================================================
Date Submitted: 2014-07-02 12:38 EDT
Last Modified: 2014-07-02 12:38 EDT
======================================================================
Summary: GetPrerequisites : fix objdump usage under non
english locale
Description:
While cross-compile from linux to win32, objdump is used by GetPrerequisites to
find dependency dll.
It runs : objdump -p some.exe | grep 'DLL Name:'
Under non English locale, the output of objdump can be translated. Thus the
matching on 'DLL Name:' does not work.
The attached patch fix this issue.
Steps to Reproduce:
1) Create the CMakeLists.txt file with :
include(GetPrerequisites)
# Force the function 'get_prerequisites' to use objdump
# (Avoid to setup a crosscompiling env unix -> win32)
set(gp_tool "objdump")
get_prerequisites("cmake-3.0.0-win32-x86.exe" DEPENDENCIES 0 1 "" "")
message("Some dependencies should have been found: ${DEPENDENCIES}")
2) wget http://www.cmake.org/files/v3.0/cmake-3.0.0-win32-x86.exe
3) Choose a non english locale from "locale -a" to to setup the variable LC_ALL
4) "LC_ALL=fr cmake ." => dependency dll not found without patch
"LC_ALL=C cmake ." => dependency found
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-07-02 12:38 Olivier TrichetNew Issue
2014-07-02 12:38 Olivier TrichetFile Added:
0001-GetPrerequisites-ensure-objdump-output-is-not-locale.patch
======================================================================
More information about the cmake-developers
mailing list