Problem on installation of root 6.08 on kali linux

Hello, I’m fairly new to linux, and I am trying for quite a while now to install root on kali linux (its debian version).
I am compiling with the following command:
./configure --with-x11-libdir=/usr/lib/i386-linux-gnu --with-xpm-libdir=/usr/lib/i386-linux-gnu --with-xft-libdir=/usr/lib/i386-linux-gnu --with-xext-libdir=/usr/lib/i386-linux-gnu
I run make and after a while I am getting the following error:

Also, if I run sudo apt-get install libpng-dev, I get:
libpng-dev is already the newest version (1.6.26-1).
Could you please explain me what am I doing wrong with the compilation?

P.S Thanks in advance for your time, in case I have violated any forum rule, let me know!

Please use the cmake way of building. See the instructions at