contiki-os/contiki — pull request #394 by tcheneau (2013-10-28 14:38:39+00:00)
Title: Fix a typo that prevents the native target from building the example

For the past few months, I tried to build the IPv6 examples (for example ipv6/rpl-udp) without much success. In order to get it to build, I had to modify the example Makefiles and add a -DUIP_CONF_IPV6 to the build command. This approach did not seem clean to me (as the build should work for all target without any modification), so I tried to see why the build would fail on the native architecture. It would appear that there is a small typo and one #define missing (see the patch), but I could be wrong.

How to reproduce the build errors:

cd examples/ipv6/rpl-udp
make TARGET=contiki

This build will fail because references to uip_ds6* functions are missing (full build error at the end of the pull request).

Regards,
Tony

---
[...]
cp ../../../tools/empty-symbols.h symbols.h
CC symbols.c
AR contiki-native.a
CC udp-client.c
LD udp-client.native
udp-client.co: In function `set_global_address':
/users/tcheneau/work/project/contiki/examples/ipv6/rpl-udp/udp-client.c:120: undefined reference to `uip_ds6_set_addr_iid'
/users/tcheneau/work/project/contiki/examples/ipv6/rpl-udp/udp-client.c:121: undefined reference to `uip_ds6_addr_add'
udp-client.co: In function `print_local_addresses':
/users/tcheneau/work/project/contiki/examples/ipv6/rpl-udp/udp-client.c:99: undefined reference to `uip_ds6_if'
/users/tcheneau/work/project/contiki/examples/ipv6/rpl-udp/udp-client.c:104: undefined reference to `uip_ds6_if'
contiki-native.a(contiki-main.o): In function `main':
/users/tcheneau/work/project/contiki/examples/ipv6/rpl-udp/../../../platform/native/./contiki-main.c:203: undefined reference to `rime_driver'
/users/tcheneau/work/project/contiki/examples/ipv6/rpl-udp/../../../platform/native/./contiki-main.c:216: undefined reference to `uip_ds6_get_link_local'
contiki-native.a(nullmac.o): In function `packet_input':
/users/tcheneau/work/project/contiki/examples/ipv6/rpl-udp/../../../core/net/mac/nullmac.c:54: undefined reference to `rime_driver'
contiki-native.a(netstack.o): In function `netstack_init':
/users/tcheneau/work/project/contiki/examples/ipv6/rpl-udp/../../../core/net/netstack.c:48: undefined reference to `rime_driver'
collect2: ld returned 1 exit status
make: *** [udp-client.native] Error 1