This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Compiling newlib and event manager causes compile errors

Seen on ncs v1.0.0. Adding "CONFIG_NEWLIB_LIBC=y" to the prf.conf and building the event_manager sample will replicate the error

1> app/libapp.a(main.c.obj): In function `new_config_event':
1> ncs/nrf/samples/event_manager/build_nrf9160_pca10090ns/../src/events/config_event.h:28: undefined reference to `static_assert'
1> app/libapp.a(controller.c.obj): In function `new_control_event':
1> ncs/nrf/samples/event_manager/build_nrf9160_pca10090ns/../src/events/control_event.h:26: undefined reference to `static_assert'
1> app/libapp.a(sensor_simulated.c.obj): In function `new_measurement_event':
1> ncs/nrf/samples/event_manager/build_nrf9160_pca10090ns/../src/events/measurement_event.h:30: undefined reference to `static_assert'
1> app/libapp.a(sensor_simulated.c.obj): In function `new_ack_event':
1> ncs/nrf/samples/event_manager/build_nrf9160_pca10090ns/../src/events/ack_event.h:26: undefined reference to `static_assert'
1> zephyr/libzephyr.a(event_manager.c.obj): In function `log_event':
1> ncs/nrf/subsys/event_manager/event_manager.c:61: undefined reference to `static_assert'
1> collect2: error: ld returned 1 exit status
Build failed

Workaround was to comment out static_assert within event_manager.c and .h

Parents Reply Children
Related