[buildd-tools-devel] Problem building glibc with sbuild

Gustavo Noronha Silva gustavo.noronha at collabora.co.uk
Wed Apr 22 17:03:10 UTC 2009


On Wed, 2009-04-22 at 12:13 +0100, Roger Leigh wrote:
> > gawk: ../scripts/versions.awk:72: (FILENAME=- FNR=3) warning: pipe to `sort > /build/buildd-glibc_2.9-7-i386-rPLNT1/glibc-2.9/build-tree/i386-libc/Versions.tmp': could not set close-on-exec: (fcntl: Bad file descriptor)
> > gawk: ../scripts/versions.awk:72: (FILENAME=- FNR=3) fatal: printf to "sort > /build/buildd-glibc_2.9-7-i386-rPLNT1/glibc-2.9/build-tree/i386-libc/Versions.tmp" failed (Bad file descriptor)
> 
> Hmm, that's really odd.

Yeah... I forgot to say that I am using sbuild from the
buildd.debian.net repository, by the way.

> > The build seems to work correctly when I use schroot directly. I noticed
> > that when I login to the chroot using sbuild-shell the output of
> > commands is a bit weird (ls lists stuff in a single column, instead of
> > with multiple columns as it would normally, and does with schroot).
> 
> sbuild-shell just runs /bin/sh in the chroot.  I just tried in mine, and
> it does work correctly.

Looks like a problem with the shell I was using; works with bash, so
false alarm.

> > The host is amd64, the chroot is a normal Debian i386 with no changes,
> > and sbuild is configured to use i386. glibc is the official source
> > package from Debian. Ideas?
> 
> Initial thoughts:
> 
> - Is sbuild configured to use schroot rather than sudo? ($chroot_mode)

schroot

> - Is sbuild configured to use "split" mode? ($chroot_split)

No, it's commented out.

> - Is schroot configured to use the correct kernel personality?
>   (personality=linux32)

It was not; I will try again with this and with schroot debugging, and
will let you know. About the debugging, I ran sbuild with debugging
enabled already, but failed to mention it in my first email. This is
what I have:

dpkg-buildpackage
─────────────────

D: COMMAND: dpkg-buildpackage -us -uc -b -r/usr/bin/fakeroot
D: INTCOMMAND: dpkg-buildpackage -us -uc -b -r/usr/bin/fakeroot
D: EXPCOMMAND: /usr/bin/schroot -d /build/buildd-glibc_2.9-7-i386-KcBmwt/glibc-2.9 -c unstable-i386-sbuild-8ca1d75c-5262-41be-9f1f-a3345657ff6f --run-session -q -u buildd -p -- dpkg-buildpackage -us -uc -b -r/usr/bin/fakeroot
I: /usr/bin/schroot -d /build/buildd-glibc_2.9-7-i386-KcBmwt/glibc-2.9 -c unstable-i386-sbuild-8ca1d75c-5262-41be-9f1f-a3345657ff6f --run-session -q -u buildd -p -- dpkg-buildpackage -us -uc -b -r/usr/bin/fakeroot
D: Environment set:
D:   HOME=/srv/buildd/
D:   LOGNAME=buildd
D:   APT_CONFIG=/var/lib/sbuild/apt.conf
D:   SHLVL=1
D:   _=/usr/bin/nice
D:   LC_ALL=POSIX
D:   PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/games
D:   SHELL=/bin/sh
D:   MAIL=/var/mail/buildd
D:   TERM=screen
D:   PWD=/srv/buildd/
D:   USER=buildd
D:   LANG=en_GB.UTF-8
D: Running command: /usr/bin/schroot -d /build/buildd-glibc_2.9-7-i386-KcBmwt/glibc-2.9 -c unstable-i386-sbuild-8ca1d75c-5262-41be-9f1f-a3345657ff6f --run-session -q -u buildd -p -- dpkg-buildpackage -us -uc -b -r/usr/bin/fakeroot

> To check the exact command sbuild is running, you can run sbuild with
> --debug (and you can also configure sbuild to run schroot with
> debugging enabled: $schroot_options = ['--debug=notice']).  This will
> make the build very noisy, but it might give you the exact command-line
> arguments to make it reproducibly fail.

I'll try the schroot debugging, too. Thanks!

See you,

-- 
Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Collabora Ltd.




More information about the Buildd-tools-devel mailing list