Skip to content

Linking error wirth undefined reference to `strdup' in contiki build #99

@Stefan-Schmidt

Description

@Stefan-Schmidt

Trying to build the various examples for the 6lowpanclicker right now.

Initiated the manifest with master (also tried dev, same result).

Whenever I run a build for contiki which includes the lwm2m example I get this linking error.

make[1]: Entering directory '/home/stefan/Projects/ieee802154/Ci40/creatorkit/packages/button-sensor'
CC lwm2m-client-button-sensor.c
LD lwm2m-client-button-sensor.mikro-e
contiki-mikro-e.a(coap_abstractio): In function coap_RegisterUri': coap_abstraction_contiki.c:(.text.coap_RegisterUri+0x20): undefined reference tostrdup'
contiki-mikro-e.a(lwm2m_definitio): In function NewObjectType': lwm2m_definition.c:(.text.NewObjectType+0x6c): undefined reference tostrdup'
contiki-mikro-e.a(lwm2m_definitio): In function NewResourceType': lwm2m_definition.c:(.text.NewResourceType+0x6c): undefined reference tostrdup'
contiki-mikro-e.a(lwm2m_util.o): In function Lwm2mCore_SplitQuery': lwm2m_util.c:(.text.Lwm2mCore_SplitQuery+0x30): undefined reference tostrdup'
lwm2m_util.c:(.text.Lwm2mCore_SplitQuery+0x98): undefined reference to strdup' contiki-mikro-e.a(lwm2m_util.o):lwm2m_util.c:(.text.Lwm2mCore_SplitQuery+0xdc): more undefined references tostrdup' follow
collect2: error: ld returned 255 exit status
../../constrained-os/contiki/Makefile.include:280: recipe for target 'lwm2m-client-button-sensor.mikro-e' failed
make[1]: *** [lwm2m-client-button-sensor.mikro-e] Error 255
rm lwm2m-client-button-sensor.co

xc32-gcc version is v1.42 and installed into /opt/microchip/xc32/v1.42/

As compilation itself seems to work I would thing maybe the linking flags are not setup correctly? Or is there some piece of code missing providing strdup for th this arch on contiki?

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