[buildd-tools-devel] Bug#775539: sbuild: overwrites DEB_BUILD_OPTIONS environment variable when cross-building

Wookey wookey at wookware.org
Sat Jan 17 01:01:02 UTC 2015


+++ Vagrant Cascadian [2015-01-16 16:09 -0800]:
> Package: sbuild
> Version: 0.65.0-1
> Severity: normal
> 
> Thanks for maintaining sbuild!  Very excited to have cross-build support
> in sbuild and enough of a toolchain within debian to make use of it!
> 
> I think sbuild is somehow invoking the else statement in the following code:
> 
>   $ git grep -A 2 -B 4 nocheck
>   lib/Sbuild/Build.pm-    # Add cross environment config
>   lib/Sbuild/Build.pm-    if ($host_arch ne $build_arch) {
>   lib/Sbuild/Build.pm-            $buildenv{'CONFIG_SITE'} = "/etc/dpkg-cross/cross-config." . $host_arch;
>   lib/Sbuild/Build.pm-            if (defined($buildenv{'DEB_BUILD_OPTIONS'})) {
>   lib/Sbuild/Build.pm:                    $buildenv{'DEB_BUILD_OPTIONS'} .= " nocheck";
>   lib/Sbuild/Build.pm-            } else {
>   lib/Sbuild/Build.pm:                    $buildenv{'DEB_BUILD_OPTIONS'} = "nocheck";
>   lib/Sbuild/Build.pm-            }
>   lib/Sbuild/Build.pm-    }

I'm not sure why that's going wrong. Is it checking whether
DEB_BUILD_OPTIONS is set in the config file only (as opposed to in the
environment?

I can;t really help you much with that, but I can answer the bit about dpkg-cross. 

> I'm not sure how exactly sbuild makes use of dpkg-cross, 

It uses it in order to have a set of autoconf cache variables to
supply configured values when build-time tests are not
available. That's what that CONFIG_SITE is set for.

> but it looks
> like dpkg-cross may be deprecated already, so perhaps other options
> will need to be explored:
> 
>   https://bugs.debian.org/771496

Yes, well it's 'sort-of' deprecated. It depends a bit who you
ask. dpkg-cross does two, rather separate things
1) provide autoconf cache variables (and cmake toolchain config)
2) convert packages (libraries/headers) into -cross packages

the 2nd function has been largely superceded by multiarch, although
not entirely - it's still needed to make -cross build-dependencies for
the 'supported' gcc cross-toolchain build method. And it's still
useful if you want to do non-multiarch cross-building.

But the first function is still needed until we work out a better way
(work which was started at the bootstrap sprint, but need some more
design work). This function should be moved into a different
package. Perhaps 'cross-support', but it hasn't been yet.

Unfortunately dpkg-cross has been removed from jessie due to above
bug, which breaks cross-building to some degree. I've put it back into
the emdebian.org tools/debian jessie repo so that things work again,
but we should sort this out properly really.

It was only today that I remembered that we still need it for this, so
litting it fall out of jessie was a mistake. I'll take a look at
fixing that bug.

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/



More information about the Buildd-tools-devel mailing list