According to the Debian policy manual:
Installing the development package must result in installation of all the
development files necessary for compiling programs against that shared library.
Dependencies of libxml2-dev:
Depends: libxml2
Depends: libicu-dev
libxml2 is a dependency because it includes the shared library.
libicu-dev is a dependency because encoding.h from libxml2-dev includes a header from libicu-dev.
But why is libc6-dev not a dependency of libxml2-dev?
Header files from libxml2-dev include stdio.h which is from libc6-dev.
Maybe libc6-dev is an implicit dependency? Or libc-dev should be part of the build environment? But why do some other development packages have an explicit dependency on libc6-dev? For example libexif-dev:
Depends: libexif12
Depends: libc6-dev
For official debian package, debuild (or some other tool) creates the dependencies automatically. But I'm creating a development package manually and would like to know under which conditions libc6-dev should be listed as a dependency for a development package.
Debian Policy Manual, chapter 4.2. Package relationships:
It is not necessary to explicitly specify build-time relationships on a minimal set of packages that are always needed to compile, link and put in a Debian package a standard “Hello World!” program written in C or C++. The required packages are called build-essential, and an informational list can be found in /usr/share/doc/build-essential/list (which is contained in the build-essential package).
libc6-dev is in the list. So it is not required to list it as a build dependency. But if it is listed, it is not an error.