Re: Can't make distribution TARGET_ARCH=... after r209510

From: Mykola Dzham <i_at_levsha.me>
Date: Tue, 20 Jul 2010 15:02:45 +0300
 Mykola Dzham wrote:
>  M. Warner Losh wrote:
> > In message: <20100718.171610.338707487962422543.imp_at_bsdimp.com>
> >             "M. Warner Losh" <imp_at_bsdimp.com> writes:
> > : In message: <20100718210154.GA94088_at_laptop.levsha.me>
> > :             Mykola Dzham <i_at_levsha.me> writes:
> > : : Hi!
> > : : Attemt to make jail with different target arch on tinderbox (i386 jail
> > : : on amd64 host) exits with error:
> > : : 
> > : : ERROR: distribution failed - see /usr/local/tinderbox/jails/9-HEAD.i386/distribution.tmp
> > : : 
> > : : Last lines from log:
> > : : 
> > : : cd /usr/local/tinderbox/jails/9-HEAD.i386/src/etc/sendmail; make distribution
> > : : install -o root -g wheel -m 644  /usr/local/tinderbox/jails/9-HEAD.i386/src/etc/sendmail/freebsd.mc freebsd.cf /tmp/tinderbox/jails/9-HEAD.i386/tmp/etc/mail
> > : : install: freebsd.cf: No such file or directory
> > : : *** Error code 71
> > : : 
> > : : Stop in /usr/local/tinderbox/jails/9-HEAD.i386/src/etc/sendmail.
> > : : *** Error code 1
> > : : 
> > : : Stop in /usr/local/tinderbox/jails/9-HEAD.i386/src/etc.
> > : : 
> > : : Full build and distribution logs avaliable on 
> > : : http://levsha.me/tmp/20100718/world.txt (20M)
> > : : http://levsha.me/tmp/20100718/distribution.txt (7.4K)
> > : : 
> > : : Reverting r209510 fixes this problem
> > : 
> > : It works for me.
> > : 
> > : on an amd64 box:
> > : setenv TARGET=i386
> > : make buildworld
> > : make installworld DESTDIR=/tmp/mumble
> > : make distribution DESTDIR=/tmp/mumble
> > 
> > To which I forgot to add: 
> > 
> > Please send me the exact sequence of commands that fails, as well as
> > the uname of the host.  I'd like to try to track this down...
> 
> Hmm, all work properly with TARGET_ARCH when i build directly:
> 
> export TARGET_ARCH=i386
> make buildworld
> make installworld DESTDIR=/tmp/i386
> make distribution DESTDIR=/tmp/i386
> 
> Problem occurs only if i try to make i386 jail in tinderbox
> 
> $ sudo ./tc tbversion
> Tinderbox version 3.3.r1
> 
> $ svn info /usr/local/tinderbox/jails/9-HEAD.i386/src 
> Path: /usr/local/tinderbox/jails/9-HEAD.i386/src
> URL: file:///usr/local/arch/base/head
> Repository Root: file:///usr/local/arch/base
> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
> Revision: 210161
> Node Kind: directory
> Schedule: normal
> Last Changed Author: imp
> Last Changed Rev: 210161
> Last Changed Date: 2010-07-16 09:35:17 +0300 (ΠΤ, 16 ΜΙΠ 2010)
> 
> 
> I will try to get commands, used by tinderbox to build world and
> distribution, and check this commands.
> 
> Thanks!

This is tinderbox error: tinderbox run make distribution directly in
${SRCBASE}/etc and set all variables (including MAKEOBJDIRPREFIX)
manually. So, after r209510 this method does not work properly.
This patch on tinderbox fixes problem:

--- scripts/lib/tc_command.sh.orig	2010-07-20 09:32:57.977402441 +0300
+++ scripts/lib/tc_command.sh	2010-07-20 09:35:12.935906873 +0300
_at__at_ -774,10 +774,10 _at__at_
         # determine if we're cross-building world
         crossEnv=""
         if [ "${jailArch}" != "${myArch}" ]; then
-	    crossEnv="TARGET_ARCH=${jailArch} MACHINE_ARCH=${jailArch} MAKEOBJDIRPREFIX=${J_OBJDIR}/${jailArch} MACHINE=${jailArch}"
+	    crossEnv="TARGET_ARCH=${jailArch}"
         fi
-        cd ${SRCBASE}/etc && env DESTDIR=${J_TMPDIR} ${crossEnv} \
-	    make -m ${J_TMPDIR}/usr/share/mk distribution > ${jailBase}/distribution.tmp 2>&1
+        cd ${SRCBASE} && env DESTDIR=${J_TMPDIR} ${crossEnv} \
+	    make distribution > ${jailBase}/distribution.tmp 2>&1
         if [ $? -ne 0 ]; then
 	    echo "ERROR: distribution failed - see ${jailBase}/distribution.tmp"
 	    buildJailCleanup 1 ${jailName} ${J_SRCDIR}

-- 
LEFT-(UANIC|RIPE)
JID: levsha_at_jabber.net.ua
PGP fingerprint: 1BCD 7C80 2E04 7282 C944  B0E0 7E67 619E 4E72 9280
Received on Tue Jul 20 2010 - 10:03:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:05 UTC