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

Re: Help for mipsel building environment



On Sun, Jun 20, 2010 at 11:46 PM, Neil Williams <codehelp@debian.org> wrote:

> So, again, one more change in your config.
>
> CROSSARCH=mipsel
> DEBBUILDOPTS="-amipsel"
> MULTISTRAPFILE=/usr/share/multistrap/mipsel.conf
>

Thanks Neil

With this DEBBUILDOPTS it does eventually a mipsel cross compile. I
tested it successfully, for a package without  extra dependency (bc).

But trying again to compile sources from squeeze like nano that I used
as test, my build again failed.
I saw in the log that the cross dependencies were not generated.
So I inspected your cross-deps-hooks, it looks only for dependencies
in xcontrol, and these packages have only control no xcontrol. I
suppose that all grip packages have xcontrol, but my test was not from
grip.

So I wrote a new script in shell+sed (I could have patched yours, but
I'm quite perl challenged!) and it worked fine.

I give my hook below, even if it has probably to change, whenever I
have time to test with more packages.

Marc

--------------------------------------------------------------------------
#!/bin/sh

# pbuilder hook to install cross dependencies,
# mimic the perl cross-deps-hooks from  Neil Williams

#  Copyright 2010 Marc Zonzon <marc.zonzon@gmail.com>
#  This package is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.


depcross="apt-cross -q -q -i"
apt-get -y install apt-cross
apt-cross -v -u 2>/dev/null
control=$(echo /tmp/buildd/*/debian/control)
set -- ${control}
if [ $# -gt 1 ]; then
  echo "This script works only for one build, found $#"
  echo "giving up"
  exit 1
elif [ $# -eq 0 ]; then
  echo "no build found, exiting..."
  exit 0
fi
name=$(sed -n '/Source: /s/Source: //p' ${control})
pkgdir=${control%%/debian/control}
echo "Changing to ${pkgdir}"
cd ${pkgdir}
if [ -f "debian/xcontrol" ]; then
  control=${pkgdir}/debian/xcontrol
fi
sedjoin=':a;$!N;s/\n[ \t]/ /;ta;P;D'
sed_extract_deps='/^Build-Depends: /{
s/ +/ /g;s/^Build-Depends: //;s/, /,/g
s/ [^,]*,/ /g;s/ [^,]*$//;s/,/ /g;p
}'
deps=$(cat ${control}| sed -e "${sedjoin}"| sed -n -e "${sed_extract_deps}")
echo "Checking that build dependencies for $name are installed:"
echo "Running ${depcross} ${deps}"
echo "         This takes a long time and might produce little"
echo "         or no output until the end - please wait!"
${depcross} ${deps}
rm -f *.deb
cd /
echo "normal exit from ${0##*/}"


Reply to: