I am facing a problem when trying to build my current project offline using GCC. Everything seems to compile just fine until it tries to compile the EthernetNetIf.a library. (We are still using the old Ethernet library). For some reasons, there are tones of undefined references to _rw_deallocate etc.. I believe those are low functions of C code but I have no idea why they are undefined. Maybe I am missing a library ?
ps: my project compile fine on mbed.org.
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-core-net.cpp.o): In function `Net::~Net()':
..\fwk\core\net.cpp:(.text+0xf4): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
..\fwk\core\net.cpp:(.text+0xfe): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
..\fwk\core\net.cpp:(.text+0x192): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
..\fwk\core\net.cpp:(.text+0x19c): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
..\fwk\core\net.cpp:(.text+0x230): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-core-net.cpp.o):..\fwk\core\net.cpp:(.text+0x23a): more undefined references to `__rw::__rw_deallocate(void*, unsigned int, int)' follow
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-core-net.cpp.o): In function `std::list<NetUdpSocket*, std::allocator<NetUdpSocket*> >::_C_get_node(bool)':
..\fwk\core\net.cpp:(t._ZNSt4listIP12NetUdpSocketSaIS1_EE11_C_get_nodeEb[std::list<NetUdpSocket*, std::allocator<NetUdpSocket*> >::_C_get_node(bool)]+0x3c): undefined reference to `__rw::__rw_allocate(unsigned int, int)'
..\fwk\core\net.cpp:(t._ZNSt4listIP12NetUdpSocketSaIS1_EE11_C_get_nodeEb[std::list<NetUdpSocket*, std::allocator<NetUdpSocket*> >::_C_get_node(bool)]+0x4a): undefined reference to `__rw::__rw_allocate(unsigned int, int)'
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-core-net.cpp.o): In function `std::list<NetTcpSocket*, std::allocator<NetTcpSocket*> >::_C_get_node(bool)':
..\fwk\core\net.cpp:(t._ZNSt4listIP12NetTcpSocketSaIS1_EE11_C_get_nodeEb[std::list<NetTcpSocket*, std::allocator<NetTcpSocket*> >::_C_get_node(bool)]+0x3c): undefined reference to `__rw::__rw_allocate(unsigned int, int)'
..\fwk\core\net.cpp:(t._ZNSt4listIP12NetTcpSocketSaIS1_EE11_C_get_nodeEb[std::list<NetTcpSocket*, std::allocator<NetTcpSocket*> >::_C_get_node(bool)]+0x4a): undefined reference to `__rw::__rw_allocate(unsigned int, int)'
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-core-net.cpp.o): In function `std::list<NetIf*, std::allocator<NetIf*> >::_C_get_node(bool)':
..\fwk\core\net.cpp:(t._ZNSt4listIP5NetIfSaIS1_EE11_C_get_nodeEb[std::list<NetIf*, std::allocator<NetIf*> >::_C_get_node(bool)]+0x3c): undefined reference to `__rw::__rw_allocate(unsigned int, int)'
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-core-net.cpp.o):..\fwk\core\net.cpp:(t._ZNSt4listIP5NetIfSaIS1_EE11_C_get_nodeEb[std::list<NetIf*, std::allocator<NetIf*> >::_C_get_node(bool)]+0x4a): more undefined references to `__rw::__rw_allocate(unsigned int, int)' follow
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-if-net-nettcpsocket.cpp.o): In function `std::deque<NetTcpSocketEvent, std::allocator<NetTcpSocketEvent> >::push_back(NetTcpSocketEvent const&)':
..\fwk\if\net\nettcpsocket.cpp:(t._ZNSt5dequeI17NetTcpSocketEventSaIS0_EE9push_backERKS0_[std::deque<NetTcpSocketEvent, std::allocator<NetTcpSocketEvent> >::push_back(NetTcpSocketEvent const&)]+0xa6): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-if-net-nettcpsocket.cpp.o): In function `std::deque<NetTcpSocketEvent, std::allocator<NetTcpSocketEvent> >::pop_front()':
..\fwk\if\net\nettcpsocket.cpp:(t._ZNSt5dequeI17NetTcpSocketEventSaIS0_EE9pop_frontEv[std::deque<NetTcpSocketEvent, std::allocator<NetTcpSocketEvent> >::pop_front()]+0x28): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
..\fwk\if\net\nettcpsocket.cpp:(t._ZNSt5dequeI17NetTcpSocketEventSaIS0_EE9pop_frontEv[std::deque<NetTcpSocketEvent, std::allocator<NetTcpSocketEvent> >::pop_front()]+0x52): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-if-net-nettcpsocket.cpp.o): In function `std::deque<NetTcpSocketEvent, std::allocator<NetTcpSocketEvent> >::~deque()':
..\fwk\if\net\nettcpsocket.cpp:(t._ZNSt5dequeI17NetTcpSocketEventSaIS0_EED1Ev[std::deque<NetTcpSocketEvent, std::allocator<NetTcpSocketEvent> >::~deque()]+0x2c): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
..\fwk\if\net\nettcpsocket.cpp:(t._ZNSt5dequeI17NetTcpSocketEventSaIS0_EED1Ev[std::deque<NetTcpSocketEvent, std::allocator<NetTcpSocketEvent> >::~deque()]+0x56): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-if-net-netudpsocket.cpp.o): In function `std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::push_back(NetUdpSocketEvent const&)':
..\fwk\if\net\netudpsocket.cpp:(t._ZNSt5dequeI17NetUdpSocketEventSaIS0_EE9push_backERKS0_[std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::push_back(NetUdpSocketEvent const&)]+0x1a): undefined reference to `__rw::__rw_allocate(unsigned int, int)'
..\fwk\if\net\netudpsocket.cpp:(t._ZNSt5dequeI17NetUdpSocketEventSaIS0_EE9push_backERKS0_[std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::push_back(NetUdpSocketEvent const&)]+0x2c): undefined reference to `__rw::__rw_allocate(unsigned int, int)'
..\fwk\if\net\netudpsocket.cpp:(t._ZNSt5dequeI17NetUdpSocketEventSaIS0_EE9push_backERKS0_[std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::push_back(NetUdpSocketEvent const&)]+0x7c): undefined reference to `__rw::__rw_allocate(unsigned int, int)'
..\fwk\if\net\netudpsocket.cpp:(t._ZNSt5dequeI17NetUdpSocketEventSaIS0_EE9push_backERKS0_[std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::push_back(NetUdpSocketEvent const&)]+0xa6): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-if-net-netudpsocket.cpp.o): In function `std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::pop_front()':
..\fwk\if\net\netudpsocket.cpp:(t._ZNSt5dequeI17NetUdpSocketEventSaIS0_EE9pop_frontEv[std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::pop_front()]+0x28): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
..\fwk\if\net\netudpsocket.cpp:(t._ZNSt5dequeI17NetUdpSocketEventSaIS0_EE9pop_frontEv[std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::pop_front()]+0x52): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
./lib/EthernetNetIf/LPC1768\libEthernetNetIf.a(fwk-if-net-netudpsocket.cpp.o): In function `std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::~deque()':
..\fwk\if\net\netudpsocket.cpp:(t._ZNSt5dequeI17NetUdpSocketEventSaIS0_EED1Ev[std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::~deque()]+0x2c): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
..\fwk\if\net\netudpsocket.cpp:(t._ZNSt5dequeI17NetUdpSocketEventSaIS0_EED1Ev[std::deque<NetUdpSocketEvent, std::allocator<NetUdpSocketEvent> >::~deque()]+0x56): undefined reference to `__rw::__rw_deallocate(void*, unsigned int, int)'
c:/program files (x86)/gnu tools arm embedded/4.6 2012q2/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/bin/ld.exe: build.elf: hidden symbol `__2printf' isn't defined
c:/program files (x86)/gnu tools arm embedded/4.6 2012q2/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/bin/ld.exe: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [build.elf] Erreur 1
Thanks for your help.
Hi mbed,
I am facing a problem when trying to build my current project offline using GCC. Everything seems to compile just fine until it tries to compile the EthernetNetIf.a library. (We are still using the old Ethernet library). For some reasons, there are tones of undefined references to _rw_deallocate etc.. I believe those are low functions of C code but I have no idea why they are undefined. Maybe I am missing a library ?
ps: my project compile fine on mbed.org.
Here is the output log of my build:
Thanks for your help.