Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Aug 2014 22:42:55 -0400
From:      Glen Barber <gjb@FreeBSD.org>
To:        Don Lewis <truckman@FreeBSD.org>
Cc:        stable@FreeBSD.org, ian@FreeBSD.org
Subject:   Re: building an 8.4-STABLE i386 poudriere jail on an 10.0-STABLE amd64 host
Message-ID:  <20140830024255.GL1200@hub.FreeBSD.org>
In-Reply-To: <201408300043.s7U0hIXf073387@gw.catspoiler.org>
References:  <201408292318.s7TNIjMI073287@gw.catspoiler.org> <201408300043.s7U0hIXf073387@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--ogUXNSQj4OI1q3LQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 29, 2014 at 05:43:18PM -0700, Don Lewis wrote:
> I simplified things a bit and am now just doing normal crossbuilds.  I'm
> still seeing core dumps, even on amd64 -> amd64 crossbuilds.  I'm not
> seeing a reason, though ...
>=20
> [gdb backtrace]
>=20
> [...]
>=20
> Looks like all the pointers are OK, so why the SIGBUS?
>=20

Pardon any incoherency in what follows, because it is mostly based off
smashed-together recollection from a text file of notes with the 8.x
(and prior) cross builds.

The TL;DR is, there's probably not much information I can provide that
will be useful to you in debugging this.  Sorry.  :(

(And Warner, if you're listening, I know your stance on the topic, so
no need to re-enlighten me.) :-)

While it may sounds like I'm going in a different direction than what
you're try to solve, there actually is a reason for it, and a possible
solution for your case.

The issues you are running into are 80% of the reason that after 8.4 was
released, there were no 8.4-STABLE snapshots produced.  The other 20% is
split up with 10% because of how the release builds for 8.x and earlier
work, and 10% because it was not reasonable to implement "special" code
in the scripts I use for a single branch.  If this was a few years ago,
and 7.x (and possibly 6.x) was still supported, I may have considered
it.  That said, when I say "8.x" below, I really mean "8.x and prior
branches."

My primary issue with how the 8.x release builds worked is that it would
use chroot(8) by default, specifically:

    1) buildworld
    2) installworld DESTDIR=3D/blah
    3) chroot /blah make -C /usr/src buildworld buildkernel
    4) chroot /blah make -C /usr/src/release release

The 9.x and later release builds do not do this.  You specify the target
directory for the resulting build, and a bunch of magic happens, and
when it's done, you have all the things to install FreeBSD.  The major
benefit to this is that it does *not* use chroot(8) by default.

The 8.4-RELEASE was built on a machine running 9-STABLE, so make(1),
gcc(1), and so on were not that far diverged for there to be any real
issues (such as what you're seeing).

The snapshot builder in use now, at that time was running 10-CURRENT.
Several "hacks" were in place, such as WITH_GNUCXX (which somehow turned
into 4 or more src.conf(5) entries by now), which would allow building
8.x on 10-CURRENT to somewhat work.  That did not last long, though.

I think it was around when bmake became the default in -CURRENT that
I stopped spending time trying to build 8.x snapshots -- at that point,
the time spent debugging the build failures and updating the scripts to
"fix" the build became increasingly less beneficial.

Now, having said all that, I have a possible solution that, quite
honestly, may or may not work (I have no idea at this point).

You can grab the 8.4-RELEASE distribution set from FTP, and extract it
into a scratch directory, check out the stable/8/ tree into the scratch
directory usr/src/, then do:

    # chroot /scratch make -C /usr/src buildworld [...]

That would at least provide you with the binary bits you want for your
package builds.

I *think* this is somewhat what the cluster package builders do, but
then again, I do not know off-hand if packages for 8.x are build for
pkg(8) - they may be only pkg_install(1).

Again, sorry that I do not provide a "just do $this" kind of magic wand
in this case, especially since I've been in the same painful situation
you are in.  But I hope at least some of this information is useful to
you.

Glen


--ogUXNSQj4OI1q3LQ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJUATovAAoJELls3eqvi17QOAwP/1Wr4+vVipyvs9Q5B4fHQtEc
Ffw/uaQt31d9GW+WXyQLhr6r5kWE6iCEuVTwCMp1vSeBh4v7pwZFQlb/aUpDVJ59
zoci+0gsru2S88D/FuuAd3I6RNHerm/pfZ2DtoDUC4eUIXeUy4yWRqbPQFpcFz6y
KSNYg2QeRsfg+YD9EKI8TmddY8Ijq7otJpvA0YRWXW3k9Yc241pFZAElQUqDntUT
KMgD3MvpY8g8SVf05pMcnlvbolrzPzdwkHYdpvpxM9ITpD0dDIAqM683H9tYW4c9
nKxy7wqdzW3F2zfP+ywkhNucUlSZGX5qmPwCDva1IDZjdxa3ff+kesKfAGxNPh1a
+XNwo8OQELvf8A2veouOUkXZj7+uxtkMMB1k5fqOYZqndXkl/rgvl2Bny9qqsjdq
Q4b86kzF6Zl2lD6DuJDnZXGxPMFmfRRW/k2x528LLjcDaw9Mc0RSdvkYR4BFcUQS
QYWD/UAsv7qFkQgsoK9L2Kd82pGNhAOoHjIaGFrh7WyKse+1whwPn88lfXh5wMv/
JHm7NgkwjPubEQbnyHnsVd7+jmSYkcnPlMMnQBdqLYzUj0lR+E2z/fnz4ISBNUBd
93voUZqE2tOHwCFTutBS+vAIdt9F79z0FYuzBS6qdD21rJBuO5DCPssWTlVUJH9v
wsJkJ0xRQxz8xfuNdQJh
=mQZS
-----END PGP SIGNATURE-----

--ogUXNSQj4OI1q3LQ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140830024255.GL1200>