Missing locale setting

Sysprogs forums Forums VisualGDB Missing locale setting

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #35628
    mhilden-mhs
    Participant

    Hi all,

    I am getting a warning from the Perl infrastructure when I am building my VisualGDB 6.0 project that is targeted to the ESP-IDF v4.4 toolchain.

    This is what I’m seeing. From what I can tell, this needs to be resolved via a Visual Studio setting (I am on version 17.9.7 and Windows 11), but this issue has persisted for a few versions. My code works fine but I’d like this warning to go away for me and everyone else on our team. Where do I find the setting to configure the locale and make Perl happy?

    Thanks,

    ~Matt

    <hr />

    -- Found PythonInterp: C:/sysgcc/esp32/esp-idf/v4.4/python-env/Scripts/python.exe (found version "3.8.10")
    -- Found Perl: C:/Strawberry/perl/bin/perl.exe (found version "5.38.0")
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    (possibly more locale environment variables)
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the system default locale ("English_United States.1252").
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    (possibly more locale environment variables)
    LANG = "en_US.UTF-8"
    are supported and installed on your system.

    #35629
    support
    Keymaster

    Hi,

    VisualGDB forces the locale to be en_US.UTF-8 as otherwise some build tools would show localized error messages, confusing the message parsing logic (e.g. trying to understand the base directory for the relative paths in subsequent messages).

    You can try overriding the environment of the CMake/Make commands via VisualGDB Project Properties -> Build Settings. It should override the default value.

    #35630
    mhilden-mhs
    Participant

    Thanks for your reply. I played around in the CMake section of the VisualGDB Project Properties but I still can figure it out. Can you please provide some specific values to use (and where to place them) so I can increase my chances of overriding the build environment correctly?

     

    #35631
    support
    Keymaster

    Hi,

    The exact setting depends on how your project is setup. If you would like us to point out a specific setting, please make sure you can reproduce the problem on a new project created from scratch, and than share the screenshots showing how the project was created (every step of the wizard and every other window where you changed any settings).

    #35632
    mhilden-mhs
    Participant

    This is happening on a brand new “blink” sample project with absolutely no changes from default. Screenshots and build details are below.

    <hr />

     

    Running CMake: C:\Users\mhilden\AppData\Local\VisualGDB\CMake\bin\cmake.exe ../../.. -G "Ninja" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_MAKE_PROGRAM=c:/SysGCC/esp32/tools/ninja/1.10.2/ninja.exe -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 -DIDF_TARGET=esp32
    -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.43.0.windows.1") 
    -- The C compiler identification is GNU 8.4.0
    -- The CXX compiler identification is GNU 8.4.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/sysgcc/esp32/tools/xtensa-esp32-elf/esp-2021r2-patch1/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/sysgcc/esp32/tools/xtensa-esp32-elf/esp-2021r2-patch1/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/sysgcc/esp32/tools/xtensa-esp32-elf/esp-2021r2-patch1/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Building ESP-IDF components for target esp32
    -- Checking Python dependencies...
    Python requirements from C:\sysgcc\esp32\esp-idf\v4.4\requirements.txt are satisfied.
    C:/sysgcc/esp32/esp-idf/v4.4/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources
    -- Project sdkconfig file C:/Users/mhilden/Documents/mhs/ltot-ph2/fw/EmbeddedProject1/sdkconfig
    Loading defaults file C:/Users/mhilden/Documents/mhs/ltot-ph2/fw/EmbeddedProject1/sdkconfig.defaults...
    CMake Deprecation Warning at C:/sysgcc/esp32/esp-idf/v4.4/components/mbedtls/mbedtls/CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.
    
    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.
    
    
    CMake Warning (dev) at C:/sysgcc/esp32/esp-idf/v4.4/components/mbedtls/mbedtls/CMakeLists.txt:49 (find_package):
    Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
    are removed. Run "cmake --help-policy CMP0148" for policy details. Use
    the cmake_policy command to set the policy and suppress this warning.
    
    This warning is for project developers. Use -Wno-dev to suppress it.
    
    -- Found PythonInterp: C:/sysgcc/esp32/esp-idf/v4.4/python-env/Scripts/python.exe (found version "3.8.10") 
    -- Found Perl: C:/Strawberry/perl/bin/perl.exe (found version "5.38.0") 
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    (possibly more locale environment variables)
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the system default locale ("English_United States.1252").
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    (possibly more locale environment variables)
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    -- App "blink" version: flow-tester-circuithub-00133590
    -- Adding linker script C:/Users/mhilden/Documents/mhs/ltot-ph2/fw/EmbeddedProject1/build/VisualGDB/Debug/esp-idf/esp_system/ld/memory.ld
    -- Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/esp_system/ld/esp32/sections.ld.in
    -- Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/esp_rom/esp32/ld/esp32.rom.ld
    -- Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/esp_rom/esp32/ld/esp32.rom.api.ld
    -- Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
    -- Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
    -- Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
    -- Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
    -- Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
    -- Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/soc/esp32/ld/esp32.peripherals.ld
    -- Components: app_trace app_update asio bootloader bootloader_support bt cbor cmock coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_ipc esp_lcd esp_local_ctrl esp_netif esp_phy esp_pm esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos hal heap idf_test ieee802154 jsmn json led_strip libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter tinyusb ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
    -- Component paths: C:/sysgcc/esp32/esp-idf/v4.4/components/app_trace C:/sysgcc/esp32/esp-idf/v4.4/components/app_update C:/sysgcc/esp32/esp-idf/v4.4/components/asio C:/sysgcc/esp32/esp-idf/v4.4/components/bootloader C:/sysgcc/esp32/esp-idf/v4.4/components/bootloader_support C:/sysgcc/esp32/esp-idf/v4.4/components/bt C:/sysgcc/esp32/esp-idf/v4.4/components/cbor C:/sysgcc/esp32/esp-idf/v4.4/components/cmock C:/sysgcc/esp32/esp-idf/v4.4/components/coap C:/sysgcc/esp32/esp-idf/v4.4/components/console C:/sysgcc/esp32/esp-idf/v4.4/components/cxx C:/sysgcc/esp32/esp-idf/v4.4/components/driver C:/sysgcc/esp32/esp-idf/v4.4/components/efuse C:/sysgcc/esp32/esp-idf/v4.4/components/esp-tls C:/sysgcc/esp32/esp-idf/v4.4/components/esp32 C:/sysgcc/esp32/esp-idf/v4.4/components/esp_adc_cal C:/sysgcc/esp32/esp-idf/v4.4/components/esp_common C:/sysgcc/esp32/esp-idf/v4.4/components/esp_eth C:/sysgcc/esp32/esp-idf/v4.4/components/esp_event C:/sysgcc/esp32/esp-idf/v4.4/components/esp_gdbstub C:/sysgcc/esp32/esp-idf/v4.4/components/esp_hid C:/sysgcc/esp32/esp-idf/v4.4/components/esp_http_client C:/sysgcc/esp32/esp-idf/v4.4/components/esp_http_server C:/sysgcc/esp32/esp-idf/v4.4/components/esp_https_ota C:/sysgcc/esp32/esp-idf/v4.4/components/esp_https_server C:/sysgcc/esp32/esp-idf/v4.4/components/esp_hw_support C:/sysgcc/esp32/esp-idf/v4.4/components/esp_ipc C:/sysgcc/esp32/esp-idf/v4.4/components/esp_lcd C:/sysgcc/esp32/esp-idf/v4.4/components/esp_local_ctrl C:/sysgcc/esp32/esp-idf/v4.4/components/esp_netif C:/sysgcc/esp32/esp-idf/v4.4/components/esp_phy C:/sysgcc/esp32/esp-idf/v4.4/components/esp_pm C:/sysgcc/esp32/esp-idf/v4.4/components/esp_ringbuf C:/sysgcc/esp32/esp-idf/v4.4/components/esp_rom C:/sysgcc/esp32/esp-idf/v4.4/components/esp_serial_slave_link C:/sysgcc/esp32/esp-idf/v4.4/components/esp_system C:/sysgcc/esp32/esp-idf/v4.4/components/esp_timer C:/sysgcc/esp32/esp-idf/v4.4/components/esp_websocket_client C:/sysgcc/esp32/esp-idf/v4.4/components/esp_wifi C:/sysgcc/esp32/esp-idf/v4.4/components/espcoredump C:/sysgcc/esp32/esp-idf/v4.4/components/esptool_py C:/sysgcc/esp32/esp-idf/v4.4/components/expat C:/sysgcc/esp32/esp-idf/v4.4/components/fatfs C:/sysgcc/esp32/esp-idf/v4.4/components/freemodbus C:/sysgcc/esp32/esp-idf/v4.4/components/freertos C:/sysgcc/esp32/esp-idf/v4.4/components/hal C:/sysgcc/esp32/esp-idf/v4.4/components/heap C:/sysgcc/esp32/esp-idf/v4.4/components/idf_test C:/sysgcc/esp32/esp-idf/v4.4/components/ieee802154 C:/sysgcc/esp32/esp-idf/v4.4/components/jsmn C:/sysgcc/esp32/esp-idf/v4.4/components/json C:/sysgcc/esp32/esp-idf/v4.4/examples/common_components/led_strip C:/sysgcc/esp32/esp-idf/v4.4/components/libsodium C:/sysgcc/esp32/esp-idf/v4.4/components/log C:/sysgcc/esp32/esp-idf/v4.4/components/lwip C:/Users/mhilden/Documents/mhs/ltot-ph2/fw/EmbeddedProject1/main C:/sysgcc/esp32/esp-idf/v4.4/components/mbedtls C:/sysgcc/esp32/esp-idf/v4.4/components/mdns C:/sysgcc/esp32/esp-idf/v4.4/components/mqtt C:/sysgcc/esp32/esp-idf/v4.4/components/newlib C:/sysgcc/esp32/esp-idf/v4.4/components/nghttp C:/sysgcc/esp32/esp-idf/v4.4/components/nvs_flash C:/sysgcc/esp32/esp-idf/v4.4/components/openssl C:/sysgcc/esp32/esp-idf/v4.4/components/openthread C:/sysgcc/esp32/esp-idf/v4.4/components/partition_table C:/sysgcc/esp32/esp-idf/v4.4/components/perfmon C:/sysgcc/esp32/esp-idf/v4.4/components/protobuf-c C:/sysgcc/esp32/esp-idf/v4.4/components/protocomm C:/sysgcc/esp32/esp-idf/v4.4/components/pthread C:/sysgcc/esp32/esp-idf/v4.4/components/sdmmc C:/sysgcc/esp32/esp-idf/v4.4/components/soc C:/sysgcc/esp32/esp-idf/v4.4/components/spi_flash C:/sysgcc/esp32/esp-idf/v4.4/components/spiffs C:/sysgcc/esp32/esp-idf/v4.4/components/tcp_transport C:/sysgcc/esp32/esp-idf/v4.4/components/tcpip_adapter C:/sysgcc/esp32/esp-idf/v4.4/components/tinyusb C:/sysgcc/esp32/esp-idf/v4.4/components/ulp C:/sysgcc/esp32/esp-idf/v4.4/components/unity C:/sysgcc/esp32/esp-idf/v4.4/components/usb C:/sysgcc/esp32/esp-idf/v4.4/components/vfs C:/sysgcc/esp32/esp-idf/v4.4/components/wear_levelling C:/sysgcc/esp32/esp-idf/v4.4/components/wifi_provisioning C:/sysgcc/esp32/esp-idf/v4.4/components/wpa_supplicant C:/sysgcc/esp32/esp-idf/v4.4/components/xtensa
    -- Configuring done (13.2s)
    -- Generating done (1.3s)
    -- Build files have been written to: C:/Users/mhilden/Documents/mhs/ltot-ph2/fw/EmbeddedProject1/build/VisualGDB/Debug
    perl: warning: Falling back to the system default locale ("English_United States.1252").
    
    ========== Project Configuration Summary ==========
    EmbeddedProject1 configured in 00:17
    ========== Configuration: 1 Succeeded, 0 Failed, 0 Skipped ==========
    Attachments:
    You must be logged in to view attached files.
    #35636
    support
    Keymaster

    Hi,

    Thanks for the screenshots. For this project type you can override the LANG variable via VisualGDB Project Properties as shown below:

    Attachments:
    You must be logged in to view attached files.
    #35638
    mhilden-mhs
    Participant

    Thanks for your suggestion – I implemented the changes as you suggested and here is the new output. Is this what you were expecting?

    Removing C:\Users\mhilden\Documents\mhs\ltot-ph2\fw\EmbeddedProject1/build/VisualGDB/Debug…
    Reconfiguring project due to missing Makefile…
    Running CMake: C:\Users\mhilden\AppData\Local\VisualGDB\CMake\bin\cmake.exe ../../.. -G “Ninja” -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_MAKE_PROGRAM=c:/SysGCC/esp32/tools/ninja/1.10.2/ninja.exe -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 -DIDF_TARGET=esp32
    — Found Git: C:/Program Files/Git/cmd/git.exe (found version “2.43.0.windows.1”)
    — The C compiler identification is GNU 8.4.0
    — The CXX compiler identification is GNU 8.4.0
    — The ASM compiler identification is GNU
    — Found assembler: C:/sysgcc/esp32/tools/xtensa-esp32-elf/esp-2021r2-patch1/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
    — Detecting C compiler ABI info
    — Detecting C compiler ABI info – done
    — Check for working C compiler: C:/sysgcc/esp32/tools/xtensa-esp32-elf/esp-2021r2-patch1/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe – skipped
    — Detecting C compile features
    — Detecting C compile features – done
    — Detecting CXX compiler ABI info
    — Detecting CXX compiler ABI info – done
    — Check for working CXX compiler: C:/sysgcc/esp32/tools/xtensa-esp32-elf/esp-2021r2-patch1/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe – skipped
    — Detecting CXX compile features
    — Detecting CXX compile features – done
    — Building ESP-IDF components for target esp32
    — Checking Python dependencies…
    Python requirements from C:\sysgcc\esp32\esp-idf\v4.4\requirements.txt are satisfied.
    C:/sysgcc/esp32/esp-idf/v4.4/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources
    — Project sdkconfig file C:/Users/mhilden/Documents/mhs/ltot-ph2/fw/EmbeddedProject1/sdkconfig
    Loading defaults file C:/Users/mhilden/Documents/mhs/ltot-ph2/fw/EmbeddedProject1/sdkconfig.defaults…
    CMake Deprecation Warning at C:/sysgcc/esp32/esp-idf/v4.4/components/mbedtls/mbedtls/CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a …<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

    CMake Warning (dev) at C:/sysgcc/esp32/esp-idf/v4.4/components/mbedtls/mbedtls/CMakeLists.txt:49 (find_package):
    Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
    are removed. Run “cmake –help-policy CMP0148” for policy details. Use
    the cmake_policy command to set the policy and suppress this warning.

    This warning is for project developers. Use -Wno-dev to suppress it.

    — Found PythonInterp: C:/sysgcc/esp32/esp-idf/v4.4/python-env/Scripts/python.exe (found version “3.8.10”)
    — Found Perl: C:/Strawberry/perl/bin/perl.exe (found version “5.38.0”)
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    (possibly more locale environment variables)
    LANG = “test”
    are supported and installed on your system.
    perl: warning: Falling back to the system default locale (“English_United States.1252”).
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    (possibly more locale environment variables)
    LANG = “test”
    are supported and installed on your system.
    — App “blink” version: flow-tester-circuithub-00133590
    — Adding linker script C:/Users/mhilden/Documents/mhs/ltot-ph2/fw/EmbeddedProject1/build/VisualGDB/Debug/esp-idf/esp_system/ld/memory.ld
    — Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/esp_system/ld/esp32/sections.ld.in
    — Adding linker script C:/sysgcc/esp32/esp-idf/v4.4/components/esp_rom/esp32/ld/esp32.rom.ld

    #35639
    support
    Keymaster

    Hi,

    We wouldn’t expect any specific output, since we don’t use Strawberry Perl. It’s generally up to you to figure out what LANG value will make it happy; all we can do is show how to override it on the VisualGDB side.

    You can double-check that VisualGDB passes the correct value to ESP-IDF by dumping the command-line used by VisualGDB (with the environment) into a batch file as shown here. The file will contain all environment variables including LANG and running it manually should produce the same results as via VisualGDB. You can then experiment with different values by editing the file, and once you find the value that works, enter it via VisualGDB Project Properties.

    #35644
    mhilden-mhs
    Participant

    Thanks for your help. The clue I needed was that it might be Strawberry Perl that’s to blame. I don’t use this anymore (it was for an old project) so I uninstalled it, rebooted my Windows machine, and then re-built the Python portion of the VisualGDB project via the VisualGDB project settings dialog. The locale error is gone now.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.