git-pbuilder is a wrapper around pdebuild intended for use by git-buildpackage.

Bearing this in mind, I’ve checked pdebuild manual. There I’ve found this:

--use-pdebuild-internal
    Uses a different implementation of pdebuild, which calls clean and
    build inside the chroot, using bind-mounts.

    pdebuild-internal tries to run debian/rules clean inside the chroot.
    To do so, the working directory is passed on inside the chroot, in
    the form of bind-mounting and debuild is run.

    This  option  will not protect the working directory and its parent
    directories from the build scripts.

Currently git-pbuilder does not allow to pass to pdebuild any other parameter than:

  • --builderesult
  • --pbuilder
  • --debbuildopts

There are other options that could be set, but they are passed directly to pbuilder, so too late for my expectations.

I’ve contacted with git-pbuilder author (like it was last time) and sent simple patch allowing passing options to pdebuild.

My patched version allowed me to compile glibc for Sid, on Debian Jessie without problems but now after compilation, some weird errors occured in tests. I could attach build log so everybody could see them, but there is not so much sense in it, as file has about 44 MB of pure text. ;)

Looks like problem is with build environment. Maybe it is too clear now?