[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need 32 bit supported GCC 4.9 debian binaries for Renesas SH7757 Processor



Hi Wookey,

We have tried to build GCC 4.9 Toolchain Source using rebootstrap method you have mentioned but we are getting following while fetching source.

        Get:4 http://http.debian.net sid/main Sources [8080 kB]
        Fetched 8300 kB in 8min 47s (15.7 kB/s)
W: Failed to fetch http://http.debian.net/debian/dists/sid/main/source/Sources Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.
        I: Copying back the cached apt archive contents
        I: new cache content gnupg-agent_2.0.28-2_i386.deb added
        I: new cache content gnupg2_2.0.28-2_i386.deb added
        I: unmounting dev/pts filesystem
        I: unmounting run/shm filesystem
        I: unmounting proc filesystem
        I: cleaning the build env
I: removing directory /var/cache/pbuilder/build//27405 and its subdirectories

    I have also attached whole compilation log file with this mail.

    Please let me know if you have any idea to resolve this issue.

Regards,
Ritesh Prajapati,
System Level Solutions (India) Pvt.Ltd.

On Monday 29 June 2015 10:44 PM, Wookey wrote:
+++ John Paul Adrian Glaubitz [2015-06-29 11:44 +0200]:
On 06/29/2015 11:25 AM, Ritesh Prajapati wrote:
     Does anyone knows location from where i can get 32 bit supported
Debian binaries to compile and install GCC 4.9 toolchain for Renesas
SH7757 Processor?
You will probably need to do that yourself, see:

https://wiki.debian.org/BuildingCrossCompilers
So you can trivially make a gcc source package to run on i386
targetting sh4 by installing cross-gcc-dev and doing:
HOST_LIST=i386 TARGET_LIST=sh4 cross-gcc-gensource 4.9

You can then build that by enabling sh4 as a foreign architecture,
updating and building the package. This only works simply if you have
up-to-date sh libc, libc-dev and libgcc1 packages for sh4 already,
qwhich of course we don't currently have in debian.

If not you need to do a bootstrap build:
The easiest way to do this is to use rebootstrap:
https://wiki.debian.org/HelmutGrohne/rebootstrap
git clone git.debian.org:/git/users/helmutg/rebootstrap.git
then
pbuilder --execute bootstrap.sh HOST_ARCH=sh4

This is tried weekly here:
https://jenkins.debian.net/view/rebootstrap/job/rebootstrap_sh4_gcc49/
and builds past the cross-compiler bootstrap, so that gets you what
you want.


Wookey

W: /root/.pbuilderrc does not exist
I: Building the build Environment
I: extracting base tarball [/var/cache/pbuilder/base.tgz]
I: creating local configuration
I: copying local configuration
I: mounting /proc filesystem
I: mounting /run/shm filesystem
I: mounting /dev/pts filesystem
I: policy-rc.d already exists
I: Obtaining the cached apt archive contents
set -e
set -u

export DEB_BUILD_OPTIONS="nocheck parallel=1"
export DH_VERBOSE=1
RESULT="/tmp/result"
HOST_ARCH=undefined
# select gcc version from gcc-defaults package unless set
GCC_VER=
: ${MIRROR:="http://http.debian.net/debian"}
ENABLE_MULTILIB=no
ENABLE_MULTIARCH_GCC=yes
REPODIR=/tmp/repo
APT_GET="apt-get --no-install-recommends -y -o Debug::pkgProblemResolver=true -o Debug::pkgDepCache::Marker=1 -o Debug::pkgDepCache::AutoInstall=1"
DEFAULT_PROFILES=cross
LIBC_NAME=glibc
DROP_PRIVS=buildd
GCC_NOLANG=d,go,java,jit,objc,objc++
ENABLE_DEBBINDIFF=no

# evaluate command line parameters of the form KEY=VALUE
for param in "$@"; do
	echo "bootstrap-configuration: $param"
	eval $param
done
bootstrap-configuration: HOST_ARCH=sh4

# test whether element $2 is in set $1
set_contains() {
	case " $1 " in
		*" $2 "*) return 0; ;;
		*) return 1; ;;
	esac
}

# add element $2 to set $1
set_add() {
	case " $1 " in
		"  ") echo "$2" ;;
		*" $2 "*) echo "$1" ;;
		*) echo "$1 $2" ;;
	esac
}

# remove element $2 from set $1
set_discard() {
	local word result
	if set_contains "$1" "$2"; then
		result=
		for word in $1; do
			test "$word" = "$2" || result="$result $word"
		done
		echo "${result# }"
	else
		echo "$1"
	fi
}

# create a set from a string of words with duplicates and excess white space
set_create() {
	local word result
	result=
	for word in $1; do
		result=`set_add "$result" "$word"`
	done
	echo "$result"
}

# intersect two sets
set_intersect() {
	local word result
	result=
	for word in $1; do
		if set_contains "$2" "$word"; then
			result=`set_add "$result" "$word"`
		fi
	done
	echo "$result"
}

# compute the set of elements in set $1 but not in set $2
set_difference() {
	local word result
	result=
	for word in $1; do
		if ! set_contains "$2" "$word"; then
			result=`set_add "$result" "$word"`
		fi
	done
	echo "$result"
}

# compute the union of two sets $1 and $2
set_union() {
	local word result
	result=$1
	for word in $2; do
		result=`set_add "$result" "$word"`
	done
	echo "$result"
}

check_arch() {
	local FILE_RES
	FILE_RES=`file -b "$1"`
	case "$FILE_RES" in
		"ELF 32-bit "*)
			if test 32 != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_BITS`; then
				echo "bit mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		"ELF 64-bit "*)
			if test "$2" = hppa64; then :
			elif test 64 != "`dpkg-architecture "-a$2" -qDEB_HOST_ARCH_BITS`"; then
				echo "bit mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*)
			echo "not an ELF binary"
			echo "got $FILE_RES"
			return 1
		;;
	esac
	case "$FILE_RES" in
		*"-bit LSB "*)
			if test little != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_ENDIAN`; then
				echo "endianess mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*"-bit MSB "*)
			if test "$2" = hppa64; then :
			elif test big != "`dpkg-architecture "-a$2" -qDEB_HOST_ARCH_ENDIAN`"; then
				echo "endianess mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*)
			echo "unknown ELF endianess"
			echo "got $FILE_RES"
			return 1
		;;
	esac
	case "$FILE_RES" in
		*" version 1 (SYSV),"*|*", version 1 (GNU/Linux), "*)
			if test linux != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_OS`; then
				echo "os mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*" version 1 (FreeBSD)",*)
			if test kfreebsd != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_OS`; then
				echo "os mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*" version 1, "*)
			echo "skipping os check for $FILE_RES"
		;;
		*)
			echo "unknown ELF os"
			echo "got $FILE_RES"
			return 1
		;;
	esac
	case "$FILE_RES" in
		*", Intel 80386, version "*)
			if test i386 != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", x86-64, version "*)
			if test amd64 != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", ARM, version "*|*", ARM, EABI5 version "*)
			if test arm != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", ARM aarch64, version "*)
			if test arm64 != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", Motorola 68020, version "*|*", Motorola m68k, 68020, version "*)
			if test m68k != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", IA-64, version "*)
			if test ia64 != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", MIPS, MIPS-II version "*|*", MIPS, MIPS-I version "*)
			case `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU` in
				mips|mipsel) ;;
				*)
					echo "cpu mismatch"
					echo "expected $2"
					echo "got $FILE_RES"
					return 1
				;;
			esac
		;;
		*", MIPS, MIPS-III version "*|*", MIPS, MIPS64 version "*)
			if test mips64el != "`dpkg-architecture "-a$2" -qDEB_HOST_ARCH_CPU`"; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", OpenRISC"*)
			if test or1k != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", PowerPC or cisco 4500, version "*)
			case `dpkg-architecture "-a$2" -qDEB_HOST_ARCH_CPU` in
				powerpc|powerpcel) ;;
				*)
					echo "cpu mismatch"
					echo "expected $2"
					echo "got $FILE_RES"
					return 1
				;;
			esac
		;;
		*", 64-bit PowerPC or cisco 7500, version "*)
			case "`dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`" in
				ppc64|ppc64el) ;;
				*)
					echo "cpu mismatch"
					echo "expected $2"
					echo "got $FILE_RES"
					return 1
				;;
			esac
		;;
		*", IBM S/390, version "*)
			case "`dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`" in
				s390|s390x) ;;
				*)
					echo "cpu mismatch"
					echo "expected $2"
					echo "got $FILE_RES"
					return 1
				;;
			esac
		;;
		*", Alpha (unofficial), version "*)
			if test alpha != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", SPARC version "*|*", SPARC, version "*)
			if test sparc != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", SPARC V9, relaxed memory ordering, version "*)
			if test sparc64 != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", PA-RISC, version "*)
			if test hppa != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", PA-RISC, 2.0 (LP64) version "*)
			if test "$2" != hppa64; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*", Renesas SH, version "*)
			if test sh4 != `dpkg-architecture -a$2 -qDEB_HOST_ARCH_CPU`; then
				echo "cpu mismatch"
				echo "expected $2"
				echo "got $FILE_RES"
				return 1
			fi
		;;
		*)
			echo "unknown ELF cpu"
			echo "got $FILE_RES"
			return 1
		;;
	esac
	return 0
}

apt_get_remove() {
	local pkg pkgs
	pkgs=""
	for pkg in "$@"; do
		dpkg-query -s "$pkg" >/dev/null 2>&1 && pkgs=`set_add "$pkgs" "$pkg"`
	done
	if test -n "$pkgs"; then
		$APT_GET remove $pkgs
	fi
}

apt-get update
Get:1 http://ftp.us.debian.org sid InRelease [204 kB]
Get:2 http://ftp.us.debian.org sid/main i386 Packages/DiffIndex [7876 B]
Get:3 http://ftp.us.debian.org sid/main Translation-en/DiffIndex [7876 B]
Get:4 http://ftp.us.debian.org sid/main i386 2015-06-30-0842.21.pdiff [13.0 kB]
Get:5 http://ftp.us.debian.org sid/main i386 2015-06-30-1442.21.pdiff [20.9 kB]
Get:6 http://ftp.us.debian.org sid/main i386 2015-06-30-2043.02.pdiff [50.6 kB]
Get:7 http://ftp.us.debian.org sid/main i386 2015-07-01-0246.34.pdiff [39.6 kB]
Get:8 http://ftp.us.debian.org sid/main i386 2015-07-01-0246.34.pdiff [39.6 kB]
Get:9 http://ftp.us.debian.org sid/main 2015-06-30-0842.21.pdiff [33 B]
Get:10 http://ftp.us.debian.org sid/main 2015-06-30-1442.21.pdiff [3529 B]
Get:11 http://ftp.us.debian.org sid/main 2015-06-30-2043.02.pdiff [2158 B]
Get:12 http://ftp.us.debian.org sid/main 2015-07-01-0246.34.pdiff [4162 B]
Get:13 http://ftp.us.debian.org sid/main 2015-07-01-0246.34.pdiff [4162 B]
Fetched 353 kB in 13s (25.5 kB/s)
Reading package lists...
$APT_GET install pinentry-curses # avoid installing pinentry-gtk (via reprepro)
Reading package lists...
Building dependency tree...
Reading state information...
  MarkInstall pinentry-curses [ i386 ] < none -> 0.9.4-2 > ( utils ) FU=1
  Installing libglib2.0-0 as Depends of pinentry-curses
    MarkInstall libglib2.0-0 [ i386 ] < none -> 2.44.1-1.1 > ( libs ) FU=0
    Installing libffi6 as Depends of libglib2.0-0
      MarkInstall libffi6 [ i386 ] < none -> 3.1-2+b2 > ( libs ) FU=0
  Installing libsecret-1-0 as Depends of pinentry-curses
    MarkInstall libsecret-1-0 [ i386 ] < none -> 0.18.2-1 > ( libs ) FU=0
    Installing libsecret-common as Depends of libsecret-1-0
      MarkInstall libsecret-common [ i386 ] < none -> 0.18.2-1 > ( libs ) FU=0
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following extra packages will be installed:
  libffi6 libglib2.0-0 libsecret-1-0 libsecret-common
Suggested packages:
  pinentry-doc
Recommended packages:
  libglib2.0-data shared-mime-info xdg-user-dirs
The following NEW packages will be installed:
  libffi6 libglib2.0-0 libsecret-1-0 libsecret-common pinentry-curses
debconf: delaying package configuration, since apt-utils is not installed
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2711 kB of archives.
After this operation, 5902 kB of additional disk space will be used.
Selecting previously unselected package libffi6:i386.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 12129 files and directories currently installed.)
Preparing to unpack .../libffi6_3.1-2+b2_i386.deb ...
Unpacking libffi6:i386 (3.1-2+b2) ...
Selecting previously unselected package libglib2.0-0:i386.
Preparing to unpack .../libglib2.0-0_2.44.1-1.1_i386.deb ...
Unpacking libglib2.0-0:i386 (2.44.1-1.1) ...
Selecting previously unselected package libsecret-common.
Preparing to unpack .../libsecret-common_0.18.2-1_all.deb ...
Unpacking libsecret-common (0.18.2-1) ...
Selecting previously unselected package libsecret-1-0:i386.
Preparing to unpack .../libsecret-1-0_0.18.2-1_i386.deb ...
Unpacking libsecret-1-0:i386 (0.18.2-1) ...
Selecting previously unselected package pinentry-curses.
Preparing to unpack .../pinentry-curses_0.9.4-2_i386.deb ...
Unpacking pinentry-curses (0.9.4-2) ...
Setting up libffi6:i386 (3.1-2+b2) ...
Setting up libglib2.0-0:i386 (2.44.1-1.1) ...
No schema files found: doing nothing.
Setting up libsecret-common (0.18.2-1) ...
Setting up libsecret-1-0:i386 (0.18.2-1) ...
Setting up pinentry-curses (0.9.4-2) ...
Processing triggers for libc-bin (2.19-18) ...
$APT_GET install build-essential debhelper reprepro
Reading package lists...
Building dependency tree...
Reading state information...
  MarkInstall debhelper [ i386 ] < none -> 9.20150628 > ( devel ) FU=1
  Installing file as Depends of debhelper
    MarkInstall file [ i386 ] < none -> 1:5.22+15-2 > ( utils ) FU=0
    Installing libmagic1 as Depends of file
      MarkInstall libmagic1 [ i386 ] < none -> 1:5.22+15-2 > ( libs ) FU=0
  Installing po-debconf as Depends of debhelper
    MarkInstall po-debconf [ i386 ] < none -> 1.0.18 > ( devel ) FU=0
    Installing gettext as Depends of po-debconf
      MarkInstall gettext [ i386 ] < none -> 0.19.4-1 > ( devel ) FU=0
      Installing libcroco3 as Depends of gettext
        MarkInstall libcroco3 [ i386 ] < none -> 0.6.8-3+b1 > ( libs ) FU=0
        Installing libxml2 as Depends of libcroco3
          MarkInstall libxml2 [ i386 ] < none -> 2.9.2+dfsg1-3 > ( libs ) FU=0
          Installing libicu52 as Depends of libxml2
            MarkInstall libicu52 [ i386 ] < none -> 52.1-9 > ( libs ) FU=0
      Installing libunistring0 as Depends of gettext
        MarkInstall libunistring0 [ i386 ] < none -> 0.9.3-5.2+b1 > ( libs ) FU=0
      Installing gettext-base as Depends of gettext
        MarkInstall gettext-base [ i386 ] < none -> 0.19.4-1 > ( utils ) FU=0
        Installing libasprintf0c2 as Depends of gettext-base
          MarkInstall libasprintf0c2 [ i386 ] < none -> 0.19.4-1 > ( libs ) FU=0
    Installing intltool-debian as Depends of po-debconf
      MarkInstall intltool-debian [ i386 ] < none -> 0.35.0+20060710.2 > ( devel ) FU=0
  Installing man-db as Depends of debhelper
    MarkInstall man-db [ i386 ] < none -> 2.7.0.2-5 > ( doc ) FU=0
    Installing groff-base as Depends of man-db
      MarkInstall groff-base [ i386 ] < none -> 1.22.3-1 > ( text ) FU=0
    Installing bsdmainutils as Depends of man-db
      MarkInstall bsdmainutils [ i386 ] < none -> 9.0.6 > ( utils ) FU=0
    Installing libpipeline1 as Depends of man-db
      MarkInstall libpipeline1 [ i386 ] < none -> 1.4.0-1 > ( libs ) FU=0
  MarkInstall reprepro [ i386 ] < none -> 4.16.0-1 > ( utils ) FU=1
  Installing libarchive13 as Depends of reprepro
    MarkInstall libarchive13 [ i386 ] < none -> 3.1.2-11+b1 > ( libs ) FU=0
    Installing liblzo2-2 as Depends of libarchive13
      MarkInstall liblzo2-2 [ i386 ] < none -> 2.08-1.2 > ( libs ) FU=0
    Installing libnettle6 as Depends of libarchive13
      MarkInstall libnettle6 [ i386 ] < none -> 3.1.1-3 > ( libs ) FU=0
  Installing libgpgme11 as Depends of reprepro
    MarkInstall libgpgme11 [ i386 ] < none -> 1.5.5-2 > ( libs ) FU=0
    Installing gnupg2 as Depends of libgpgme11
      MarkInstall gnupg2 [ i386 ] < none -> 2.0.28-2 > ( utils ) FU=0
      Installing gnupg-agent as Depends of gnupg2
        MarkInstall gnupg-agent [ i386 ] < none -> 2.0.28-2 > ( utils ) FU=0
        Installing libassuan0 as Depends of gnupg-agent
          MarkInstall libassuan0 [ i386 ] < none -> 2.2.1-1 > ( libs ) FU=0
        Installing libpth20 as Depends of gnupg-agent
          MarkInstall libpth20 [ i386 ] < none -> 2.0.7-20 > ( libs ) FU=0
      Installing libcurl3-gnutls as Depends of gnupg2
        MarkInstall libcurl3-gnutls [ i386 ] < none -> 7.43.0-1 > ( libs ) FU=0
        Installing libgnutls-deb0-28 as Depends of libcurl3-gnutls
          MarkInstall libgnutls-deb0-28 [ i386 ] < none -> 3.3.15-7 > ( libs ) FU=0
          Installing libhogweed4 as Depends of libgnutls-deb0-28
            MarkInstall libhogweed4 [ i386 ] < none -> 3.1.1-3 > ( libs ) FU=0
          Installing libp11-kit0 as Depends of libgnutls-deb0-28
            MarkInstall libp11-kit0 [ i386 ] < none -> 0.23.1-2 > ( libs ) FU=0
          Installing libtasn1-6 as Depends of libgnutls-deb0-28
            MarkInstall libtasn1-6 [ i386 ] < none -> 4.5-2 > ( libs ) FU=0
        Installing libgssapi-krb5-2 as Depends of libcurl3-gnutls
          MarkInstall libgssapi-krb5-2 [ i386 ] < none -> 1.13.2+dfsg-2 > ( libs ) FU=0
          Installing libk5crypto3 as Depends of libgssapi-krb5-2
            MarkInstall libk5crypto3 [ i386 ] < none -> 1.13.2+dfsg-2 > ( libs ) FU=0
            Installing libkeyutils1 as Depends of libk5crypto3
              MarkInstall libkeyutils1 [ i386 ] < none -> 1.5.9-5+b1 > ( libs ) FU=0
            Installing libkrb5support0 as Depends of libk5crypto3
              MarkInstall libkrb5support0 [ i386 ] < none -> 1.13.2+dfsg-2 > ( libs ) FU=0
          Installing libkrb5-3 as Depends of libgssapi-krb5-2
            MarkInstall libkrb5-3 [ i386 ] < none -> 1.13.2+dfsg-2 > ( libs ) FU=0
        Installing libidn11 as Depends of libcurl3-gnutls
          MarkInstall libidn11 [ i386 ] < none -> 1.30-1 > ( libs ) FU=0
        Installing libldap-2.4-2 as Depends of libcurl3-gnutls
          MarkInstall libldap-2.4-2 [ i386 ] < none -> 2.4.40+dfsg-1+b2 > ( libs ) FU=0
          Installing libsasl2-2 as Depends of libldap-2.4-2
            MarkInstall libsasl2-2 [ i386 ] < none -> 2.1.26.dfsg1-13 > ( libs ) FU=0
            Installing libsasl2-modules-db as Depends of libsasl2-2
              MarkInstall libsasl2-modules-db [ i386 ] < none -> 2.1.26.dfsg1-13 > ( libs ) FU=0
        Installing librtmp1 as Depends of libcurl3-gnutls
          MarkInstall librtmp1 [ i386 ] < none -> 2.4+20150115.gita107cef-1+b2 > ( libs ) FU=0
        Installing libssh2-1 as Depends of libcurl3-gnutls
          MarkInstall libssh2-1 [ i386 ] < none -> 1.5.0-2+b1 > ( libs ) FU=0
      Installing libksba8 as Depends of gnupg2
        MarkInstall libksba8 [ i386 ] < none -> 1.3.3-1 > ( libs ) FU=0
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
build-essential is already the newest version.
The following extra packages will be installed:
  bsdmainutils file gettext gettext-base gnupg-agent gnupg2 groff-base
  intltool-debian libarchive13 libasprintf0c2 libassuan0 libcroco3
  libcurl3-gnutls libgnutls-deb0-28 libgpgme11 libgssapi-krb5-2 libhogweed4
  libicu52 libidn11 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
  libksba8 libldap-2.4-2 liblzo2-2 libmagic1 libnettle6 libp11-kit0
  libpipeline1 libpth20 librtmp1 libsasl2-2 libsasl2-modules-db libssh2-1
  libtasn1-6 libunistring0 libxml2 man-db po-debconf
Suggested packages:
  wamerican wordlist whois vacation dh-make gettext-doc gnupg-doc parcimonie
  xloadimage groff lrzip gnutls-bin gpgsm krb5-doc krb5-user less www-browser
  libmail-box-perl inoticoming lzip
Recommended packages:
  curl wget lynx-cur autopoint libasprintf-dev libgettextpo-dev
  ca-certificates krb5-locales libsasl2-modules xml-core libmail-sendmail-perl
The following NEW packages will be installed:
  bsdmainutils debhelper file gettext gettext-base gnupg-agent gnupg2
  groff-base intltool-debian libarchive13 libasprintf0c2 libassuan0 libcroco3
  libcurl3-gnutls libgnutls-deb0-28 libgpgme11 libgssapi-krb5-2 libhogweed4
  libicu52 libidn11 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
  libksba8 libldap-2.4-2 liblzo2-2 libmagic1 libnettle6 libp11-kit0
  libpipeline1 libpth20 librtmp1 libsasl2-2 libsasl2-modules-db libssh2-1
  libtasn1-6 libunistring0 libxml2 man-db po-debconf reprepro
0 upgraded, 42 newly installed, 0 to remove and 0 not upgraded.
Need to get 1744 kB/19.4 MB of archives.
After this operation, 67.4 MB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ sid/main gnupg-agent i386 2.0.28-2 [293 kB]
Get:2 http://ftp.us.debian.org/debian/ sid/main gnupg2 i386 2.0.28-2 [1451 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 1744 kB in 26s (65.5 kB/s)
Selecting previously unselected package libpipeline1:i386.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 12236 files and directories currently installed.)
Preparing to unpack .../libpipeline1_1.4.0-1_i386.deb ...
Unpacking libpipeline1:i386 (1.4.0-1) ...
Selecting previously unselected package groff-base.
Preparing to unpack .../groff-base_1.22.3-1_i386.deb ...
Unpacking groff-base (1.22.3-1) ...
Selecting previously unselected package bsdmainutils.
Preparing to unpack .../bsdmainutils_9.0.6_i386.deb ...
Unpacking bsdmainutils (9.0.6) ...
Selecting previously unselected package man-db.
Preparing to unpack .../man-db_2.7.0.2-5_i386.deb ...
Unpacking man-db (2.7.0.2-5) ...
Selecting previously unselected package libasprintf0c2:i386.
Preparing to unpack .../libasprintf0c2_0.19.4-1_i386.deb ...
Unpacking libasprintf0c2:i386 (0.19.4-1) ...
Selecting previously unselected package libidn11:i386.
Preparing to unpack .../libidn11_1.30-1_i386.deb ...
Unpacking libidn11:i386 (1.30-1) ...
Selecting previously unselected package libkeyutils1:i386.
Preparing to unpack .../libkeyutils1_1.5.9-5+b1_i386.deb ...
Unpacking libkeyutils1:i386 (1.5.9-5+b1) ...
Selecting previously unselected package libnettle6:i386.
Preparing to unpack .../libnettle6_3.1.1-3_i386.deb ...
Unpacking libnettle6:i386 (3.1.1-3) ...
Selecting previously unselected package libhogweed4:i386.
Preparing to unpack .../libhogweed4_3.1.1-3_i386.deb ...
Unpacking libhogweed4:i386 (3.1.1-3) ...
Selecting previously unselected package libp11-kit0:i386.
Preparing to unpack .../libp11-kit0_0.23.1-2_i386.deb ...
Unpacking libp11-kit0:i386 (0.23.1-2) ...
Selecting previously unselected package libtasn1-6:i386.
Preparing to unpack .../libtasn1-6_4.5-2_i386.deb ...
Unpacking libtasn1-6:i386 (4.5-2) ...
Selecting previously unselected package libgnutls-deb0-28:i386.
Preparing to unpack .../libgnutls-deb0-28_3.3.15-7_i386.deb ...
Unpacking libgnutls-deb0-28:i386 (3.3.15-7) ...
Selecting previously unselected package libsasl2-modules-db:i386.
Preparing to unpack .../libsasl2-modules-db_2.1.26.dfsg1-13_i386.deb ...
Unpacking libsasl2-modules-db:i386 (2.1.26.dfsg1-13) ...
Selecting previously unselected package libsasl2-2:i386.
Preparing to unpack .../libsasl2-2_2.1.26.dfsg1-13_i386.deb ...
Unpacking libsasl2-2:i386 (2.1.26.dfsg1-13) ...
Selecting previously unselected package libldap-2.4-2:i386.
Preparing to unpack .../libldap-2.4-2_2.4.40+dfsg-1+b2_i386.deb ...
Unpacking libldap-2.4-2:i386 (2.4.40+dfsg-1+b2) ...
Selecting previously unselected package libmagic1:i386.
Preparing to unpack .../libmagic1_1%3a5.22+15-2_i386.deb ...
Unpacking libmagic1:i386 (1:5.22+15-2) ...
Selecting previously unselected package libicu52:i386.
Preparing to unpack .../libicu52_52.1-9_i386.deb ...
Unpacking libicu52:i386 (52.1-9) ...
Selecting previously unselected package libxml2:i386.
Preparing to unpack .../libxml2_2.9.2+dfsg1-3_i386.deb ...
Unpacking libxml2:i386 (2.9.2+dfsg1-3) ...
Selecting previously unselected package libcroco3:i386.
Preparing to unpack .../libcroco3_0.6.8-3+b1_i386.deb ...
Unpacking libcroco3:i386 (0.6.8-3+b1) ...
Selecting previously unselected package libksba8:i386.
Preparing to unpack .../libksba8_1.3.3-1_i386.deb ...
Unpacking libksba8:i386 (1.3.3-1) ...
Selecting previously unselected package liblzo2-2:i386.
Preparing to unpack .../liblzo2-2_2.08-1.2_i386.deb ...
Unpacking liblzo2-2:i386 (2.08-1.2) ...
Selecting previously unselected package libpth20:i386.
Preparing to unpack .../libpth20_2.0.7-20_i386.deb ...
Unpacking libpth20:i386 (2.0.7-20) ...
Selecting previously unselected package libssh2-1:i386.
Preparing to unpack .../libssh2-1_1.5.0-2+b1_i386.deb ...
Unpacking libssh2-1:i386 (1.5.0-2+b1) ...
Selecting previously unselected package libunistring0:i386.
Preparing to unpack .../libunistring0_0.9.3-5.2+b1_i386.deb ...
Unpacking libunistring0:i386 (0.9.3-5.2+b1) ...
Selecting previously unselected package file.
Preparing to unpack .../file_1%3a5.22+15-2_i386.deb ...
Unpacking file (1:5.22+15-2) ...
Selecting previously unselected package gettext-base.
Preparing to unpack .../gettext-base_0.19.4-1_i386.deb ...
Unpacking gettext-base (0.19.4-1) ...
Selecting previously unselected package libkrb5support0:i386.
Preparing to unpack .../libkrb5support0_1.13.2+dfsg-2_i386.deb ...
Unpacking libkrb5support0:i386 (1.13.2+dfsg-2) ...
Selecting previously unselected package libk5crypto3:i386.
Preparing to unpack .../libk5crypto3_1.13.2+dfsg-2_i386.deb ...
Unpacking libk5crypto3:i386 (1.13.2+dfsg-2) ...
Selecting previously unselected package libkrb5-3:i386.
Preparing to unpack .../libkrb5-3_1.13.2+dfsg-2_i386.deb ...
Unpacking libkrb5-3:i386 (1.13.2+dfsg-2) ...
Selecting previously unselected package libgssapi-krb5-2:i386.
Preparing to unpack .../libgssapi-krb5-2_1.13.2+dfsg-2_i386.deb ...
Unpacking libgssapi-krb5-2:i386 (1.13.2+dfsg-2) ...
Selecting previously unselected package gettext.
Preparing to unpack .../gettext_0.19.4-1_i386.deb ...
Unpacking gettext (0.19.4-1) ...
Selecting previously unselected package intltool-debian.
Preparing to unpack .../intltool-debian_0.35.0+20060710.2_all.deb ...
Unpacking intltool-debian (0.35.0+20060710.2) ...
Selecting previously unselected package po-debconf.
Preparing to unpack .../po-debconf_1.0.18_all.deb ...
Unpacking po-debconf (1.0.18) ...
Selecting previously unselected package debhelper.
Preparing to unpack .../debhelper_9.20150628_all.deb ...
Unpacking debhelper (9.20150628) ...
Selecting previously unselected package libassuan0:i386.
Preparing to unpack .../libassuan0_2.2.1-1_i386.deb ...
Unpacking libassuan0:i386 (2.2.1-1) ...
Selecting previously unselected package gnupg-agent.
Preparing to unpack .../gnupg-agent_2.0.28-2_i386.deb ...
Unpacking gnupg-agent (2.0.28-2) ...
Selecting previously unselected package librtmp1:i386.
Preparing to unpack .../librtmp1_2.4+20150115.gita107cef-1+b2_i386.deb ...
Unpacking librtmp1:i386 (2.4+20150115.gita107cef-1+b2) ...
Selecting previously unselected package libcurl3-gnutls:i386.
Preparing to unpack .../libcurl3-gnutls_7.43.0-1_i386.deb ...
Unpacking libcurl3-gnutls:i386 (7.43.0-1) ...
Selecting previously unselected package gnupg2.
Preparing to unpack .../gnupg2_2.0.28-2_i386.deb ...
Unpacking gnupg2 (2.0.28-2) ...
Selecting previously unselected package libarchive13:i386.
Preparing to unpack .../libarchive13_3.1.2-11+b1_i386.deb ...
Unpacking libarchive13:i386 (3.1.2-11+b1) ...
Selecting previously unselected package libgpgme11:i386.
Preparing to unpack .../libgpgme11_1.5.5-2_i386.deb ...
Unpacking libgpgme11:i386 (1.5.5-2) ...
Selecting previously unselected package reprepro.
Preparing to unpack .../reprepro_4.16.0-1_i386.deb ...
Unpacking reprepro (4.16.0-1) ...
Setting up libpipeline1:i386 (1.4.0-1) ...
Setting up groff-base (1.22.3-1) ...
Setting up bsdmainutils (9.0.6) ...
update-alternatives: using /usr/bin/bsd-write to provide /usr/bin/write (write) in auto mode
update-alternatives: using /usr/bin/bsd-from to provide /usr/bin/from (from) in auto mode
Setting up man-db (2.7.0.2-5) ...
Building database of manual pages ...
Setting up libasprintf0c2:i386 (0.19.4-1) ...
Setting up libidn11:i386 (1.30-1) ...
Setting up libkeyutils1:i386 (1.5.9-5+b1) ...
Setting up libnettle6:i386 (3.1.1-3) ...
Setting up libhogweed4:i386 (3.1.1-3) ...
Setting up libp11-kit0:i386 (0.23.1-2) ...
Setting up libtasn1-6:i386 (4.5-2) ...
Setting up libgnutls-deb0-28:i386 (3.3.15-7) ...
Setting up libsasl2-modules-db:i386 (2.1.26.dfsg1-13) ...
Setting up libsasl2-2:i386 (2.1.26.dfsg1-13) ...
Setting up libldap-2.4-2:i386 (2.4.40+dfsg-1+b2) ...
Setting up libmagic1:i386 (1:5.22+15-2) ...
Setting up libicu52:i386 (52.1-9) ...
Setting up libxml2:i386 (2.9.2+dfsg1-3) ...
Setting up libcroco3:i386 (0.6.8-3+b1) ...
Setting up libksba8:i386 (1.3.3-1) ...
Setting up liblzo2-2:i386 (2.08-1.2) ...
Setting up libpth20:i386 (2.0.7-20) ...
Setting up libssh2-1:i386 (1.5.0-2+b1) ...
Setting up libunistring0:i386 (0.9.3-5.2+b1) ...
Setting up file (1:5.22+15-2) ...
Setting up gettext-base (0.19.4-1) ...
Setting up libkrb5support0:i386 (1.13.2+dfsg-2) ...
Setting up libk5crypto3:i386 (1.13.2+dfsg-2) ...
Setting up libkrb5-3:i386 (1.13.2+dfsg-2) ...
Setting up libgssapi-krb5-2:i386 (1.13.2+dfsg-2) ...
Setting up gettext (0.19.4-1) ...
Setting up intltool-debian (0.35.0+20060710.2) ...
Setting up po-debconf (1.0.18) ...
Setting up debhelper (9.20150628) ...
Setting up libassuan0:i386 (2.2.1-1) ...
Setting up gnupg-agent (2.0.28-2) ...
Setting up librtmp1:i386 (2.4+20150115.gita107cef-1+b2) ...
Setting up libcurl3-gnutls:i386 (7.43.0-1) ...
Setting up gnupg2 (2.0.28-2) ...
Setting up libarchive13:i386 (3.1.2-11+b1) ...
Setting up libgpgme11:i386 (1.5.5-2) ...
Setting up reprepro (4.16.0-1) ...
Processing triggers for libc-bin (2.19-18) ...

if test -z "$DROP_PRIVS"; then
	drop_privs_exec() {
		exec env -- "$@"
	}
else
	$APT_GET install adduser fakeroot
	if ! getent passwd "$DROP_PRIVS" >/dev/null; then
		adduser --system --group --home /tmp/buildd --no-create-home --shell /bin/false "$DROP_PRIVS"
	fi
	drop_privs_exec() {
		# Two "--" are necessary here. The first is for start-stop-daemon, the second is for env.
		exec /sbin/start-stop-daemon --start --pidfile /dev/null --chuid "$DROP_PRIVS:$DROP_PRIVS" --chdir "`pwd`" --startas /usr/bin/env -- -- "$@"
	}
fi
Reading package lists...
Building dependency tree...
Reading state information...
  MarkInstall fakeroot [ i386 ] < none -> 1.20.2-1 > ( utils ) FU=1
  Installing libfakeroot as Depends of fakeroot
    MarkInstall libfakeroot [ i386 ] < none -> 1.20.2-1 > ( utils ) FU=0
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
adduser is already the newest version.
The following NEW packages will be installed:
  fakeroot libfakeroot
debconf: delaying package configuration, since apt-utils is not installed
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/131 kB of archives.
After this operation, 298 kB of additional disk space will be used.
Selecting previously unselected package libfakeroot:i386.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 14041 files and directories currently installed.)
Preparing to unpack .../libfakeroot_1.20.2-1_i386.deb ...
Unpacking libfakeroot:i386 (1.20.2-1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../fakeroot_1.20.2-1_i386.deb ...
Unpacking fakeroot (1.20.2-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libfakeroot:i386 (1.20.2-1) ...
Setting up fakeroot (1.20.2-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Adding system user `buildd' (UID 104) ...
Adding new group `buildd' (GID 108) ...
Adding new user `buildd' (UID 104) with group `buildd' ...
Not creating home directory `/tmp/buildd'.
drop_privs() {
	( drop_privs_exec "$@" )
}

if test "$ENABLE_MULTIARCH_GCC" = yes; then
	$APT_GET install quilt
	if test "$GCC_VER" = 5; then
		echo "deb $MIRROR experimental main" > /etc/apt/sources.list.d/tmp-experimental.list
		apt-get update
		$APT_GET -t experimental install cross-gcc-dev
		rm /etc/apt/sources.list.d/tmp-experimental.list
		apt-get update
	else
		$APT_GET install cross-gcc-dev
	fi
fi
Reading package lists...
Building dependency tree...
Reading state information...
  MarkInstall quilt [ i386 ] < none -> 0.63-3 > ( vcs ) FU=1
  Installing diffstat as Depends of quilt
    MarkInstall diffstat [ i386 ] < none -> 1.58-1 > ( devel ) FU=0
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following extra packages will be installed:
  diffstat
Suggested packages:
  procmail graphviz default-mta mail-transport-agent
Recommended packages:
  less
The following NEW packages will be installed:
  diffstat quilt
debconf: delaying package configuration, since apt-utils is not installed
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/341 kB of archives.
After this operation, 899 kB of additional disk space will be used.
Selecting previously unselected package diffstat.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 14089 files and directories currently installed.)
Preparing to unpack .../diffstat_1.58-1_i386.deb ...
Unpacking diffstat (1.58-1) ...
Selecting previously unselected package quilt.
Preparing to unpack .../archives/quilt_0.63-3_all.deb ...
Unpacking quilt (0.63-3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up diffstat (1.58-1) ...
Setting up quilt (0.63-3) ...
Reading package lists...
Building dependency tree...
Reading state information...
  MarkInstall cross-gcc-dev [ i386 ] < none -> 39 > ( devel ) FU=1
  Installing realpath as Depends of cross-gcc-dev
    MarkInstall realpath [ i386 ] < none -> 8.23-4 > ( utils ) FU=0
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following extra packages will be installed:
  realpath
The following NEW packages will be installed:
  cross-gcc-dev realpath
debconf: delaying package configuration, since apt-utils is not installed
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/45.1 kB of archives.
After this operation, 222 kB of additional disk space will be used.
Selecting previously unselected package realpath.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 14184 files and directories currently installed.)
Preparing to unpack .../realpath_8.23-4_all.deb ...
Unpacking realpath (8.23-4) ...
Selecting previously unselected package cross-gcc-dev.
Preparing to unpack .../cross-gcc-dev_39_all.deb ...
Unpacking cross-gcc-dev (39) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up realpath (8.23-4) ...
Setting up cross-gcc-dev (39) ...

obtain_source_package() {
	drop_privs apt-get source "$1"
}

# work around dpkg bug #764216
sed -i 's/^\(use Dpkg::BuildProfiles qw(get_build_profiles\));$/\1 parse_build_profiles evaluate_restriction_formula);/' /usr/bin/dpkg-genchanges

if test -z "$HOST_ARCH" || ! dpkg-architecture "-a$HOST_ARCH"; then
	echo "architecture $HOST_ARCH unknown to dpkg"
	exit 1
fi
dpkg-architecture: warning: specified GNU system type sh4-linux-gnu does not match gcc system type i586-linux-gnu, try setting a correct CC environment variable
DEB_BUILD_ARCH=i386
DEB_BUILD_ARCH_BITS=32
DEB_BUILD_ARCH_CPU=i386
DEB_BUILD_ARCH_ENDIAN=little
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_GNU_CPU=i586
DEB_BUILD_GNU_SYSTEM=linux-gnu
DEB_BUILD_GNU_TYPE=i586-linux-gnu
DEB_BUILD_MULTIARCH=i386-linux-gnu
DEB_HOST_ARCH=sh4
DEB_HOST_ARCH_BITS=32
DEB_HOST_ARCH_CPU=sh4
DEB_HOST_ARCH_ENDIAN=little
DEB_HOST_ARCH_OS=linux
DEB_HOST_GNU_CPU=sh4
DEB_HOST_GNU_SYSTEM=linux-gnu
DEB_HOST_GNU_TYPE=sh4-linux-gnu
DEB_HOST_MULTIARCH=sh4-linux-gnu
DEB_TARGET_ARCH=sh4
DEB_TARGET_ARCH_BITS=32
DEB_TARGET_ARCH_CPU=sh4
DEB_TARGET_ARCH_ENDIAN=little
DEB_TARGET_ARCH_OS=linux
DEB_TARGET_GNU_CPU=sh4
DEB_TARGET_GNU_SYSTEM=linux-gnu
DEB_TARGET_GNU_TYPE=sh4-linux-gnu
DEB_TARGET_MULTIARCH=sh4-linux-gnu
export PKG_CONFIG_LIBDIR="/usr/lib/`dpkg-architecture "-a$HOST_ARCH" -qDEB_HOST_MULTIARCH`/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig"
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.list; do
	test -f "$f" && sed -i "s/^deb /deb [ arch-=$HOST_ARCH ] /" $f
done
grep -q '^deb-src ' /etc/apt/sources.list || echo "deb-src $MIRROR sid main" >> /etc/apt/sources.list

dpkg --add-architecture $HOST_ARCH
apt-get update
Hit http://ftp.us.debian.org sid InRelease
Get:1 http://ftp.us.debian.org sid/main i386 Packages/DiffIndex [7876 B]
Get:2 http://http.debian.net sid InRelease [204 kB]
Get:3 http://ftp.us.debian.org sid/main Translation-en/DiffIndex [7876 B]
Err http://http.debian.net sid/main Sources
  
Get:4 http://http.debian.net sid/main Sources [8080 kB]
Fetched 8300 kB in 8min 47s (15.7 kB/s)
W: Failed to fetch http://http.debian.net/debian/dists/sid/main/source/Sources  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.
I: Copying back the cached apt archive contents
I: new cache content gnupg-agent_2.0.28-2_i386.deb added
I: new cache content gnupg2_2.0.28-2_i386.deb added
I: unmounting dev/pts filesystem
I: unmounting run/shm filesystem
I: unmounting proc filesystem
I: cleaning the build env 
I: removing directory /var/cache/pbuilder/build//27405 and its subdirectories

Reply to: