Skip to content

undefined reference to `__locale_ctype_ptr' issue #1491

@ChoiYouJung

Description

@ChoiYouJung

Issue template

  • Hardware description: i.MX-RT1060 MCU
  • RTOS: No
  • Installation type: MCUXpresso IDE
  • Version or commit hash: humble

Steps to reproduce the issue

(1) Work in progress(purpose)
I want to operate the micro-ros-arduino library on a non-official board in MCUXpresso IDE.

(2) Code Behavior Description

  • Creating 1 publishers and 1 timers on 1 node to publish ros message
  • The code is written based on the examples in micro_ros_arduino/examples/micro-ros_publisher.
  • Uses precompiled libraries from Teensy 4.1, a supported board.

Expected behavior

  • Build works fine.

Actual behavior

  • The build fails with the following error
  • error content
Invoking: MCU C++ Linker
arm-none-eabi-c++ -nostdlib ........

c:/nxp/mcuxpressoide_11.4.0_6237/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe:
D:\mros_ws\project\lib\libmicroros.a(librmw-validate_node_name.c.obj): in function `rmw_validate_node_name':
validate_node_name.c:(.text.rmw_validate_node_name+0x5e): undefined reference to `__locale_ctype_ptr'

c:/nxp/mcuxpressoide_11.4.0_6237/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe:
D:\mros_ws\project\lib\libmicroros.a(librmw-validate_full_topic_name.c.obj): in function `rmw_validate_full_topic_name':
validate_full_topic_name.c:(.text.rmw_validate_full_topic_name+0xbe): undefined reference to `__locale_ctype_ptr'

c:/nxp/mcuxpressoide_11.4.0_6237/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: 
D:\mros_ws\project\lib\libmicroros.a(librcl-validate_topic_name.c.obj): in function `rcl_validate_topic_name':
validate_topic_name.c:(.text.rcl_validate_topic_name+0x46): undefined reference to `__locale_ctype_ptr'

c:/nxp/mcuxpressoide_11.4.0_6237/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: validate_topic_name.c:(.text.rcl_validate_topic_name+0xb6): undefined reference to `__locale_ctype_ptr'
c:/nxp/mcuxpressoide_11.4.0_6237/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.4.0.202103011116/tools/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: validate_topic_name.c:(.text.rcl_validate_topic_name+0x164): undefined reference to `__locale_ctype_ptr'

Additional information

  • The operating system of the MCUXpresso IDE is Windows 10.

  • What else have you tried:
    Build by adding the files with errors (validate_topic_name.c, validate_full_topic_name.c, validate_node_name.c) to the folder

  • On further attempts, the build succeeded.

  • Question: What should I do to fix that error? Or what could be causing that error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions