If you encounter the above linking error with an ATmega328p and your code uses sprintf, set your LIBRARY_PATH or the linker argument -L to /usr/lib/avr/lib/avr5 instead of /usr/lib/avr/lib.
If you encounter the above linking error with an ATmega328p and your code uses sprintf, set your LIBRARY_PATH or the linker argument -L to /usr/lib/avr/lib/avr5 instead of /usr/lib/avr/lib.