For investigating a crash, you may not need to recompile: first try installing the debug symbols package (icedove-dbg). For already known bugs, see https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=icedove
If you still want to recompile, you're missing $ sudo apt-get install build-essential but a Python error isn't what I'd expect from missing that (it's mostly the C/C++ compiler). Official packages are built inside a chroot using sbuild ( https://www.debian.org/devel/buildd/ , https://buildd.debian.org/status/fetch.php?pkg=icedove&arch=amd64&ver=1%3A45.6.0-2&stamp=1484088508&raw=0 ), but plain dpkg-buildpackage / debuild should also work.