install jail from precompiled world fails due to different MAKEDIROBJPREFIX

From: O. Hartmann <ohartmann_at_walstatt.org>
Date: Wed, 1 Feb 2017 10:21:28 +0100
For several projects managed with NanoBSD I need different source trees (10.3,
10-STABLE, 11-STABLE, CURRENT). The source resides in /foo/bar/CURRENT/src
or /foo/bar/10.3-RELEASE/src.

For the build of AARCH64 ports, I have also already built CURRENT for
arm64.aarch64. 

ARM64 buildworld is sensitive to compiler optimisation, libc fails to build
if -O3 is set (which is _my_ standard on AMD64, given in /etc/src.conf).
Since I do not want to have a waste of space, /foo/bar/CURRENT/src holds
CURRENT sources and with MAKEOBJDIRPREFIX=/foo/bar/CURRENT/obj/arm64 set a
conflicting libc issue (as mentioned above) can be avoided from a prebuild
AMD64 world. My thinking was, that "make TARGET=arm64 buildworld" will not
use /foo/bar/CURRENT/obj, but rather /foo/bar/CURRENT/obj/arm64.aarch64 as
the base for the resulting world, but this is a mistake. So,
setting MAKEOBJDIRPREFIX=/foo/bar/CURRENT/obj/arm64 is a way out of this
dilemma.

In any environment capable of taking MAKEOBJDIRPREFIX there is no problem,
but with poudriere, I have unexpected trouble.

I need to install the world for arm64.aarch64, therefore, I ran in the first
place the command as follows to install a jail(while
believeing /foo/bar/CURRENT/obj/arm64.aarch64 is the base of the world for
arm64 target):

poudriere jail -c -v head -j arm64 -m src=/foo/bar/CURRENT/src
-M /somewhere/in/the/tree

That fails, since /foo/bar/CURRENT/obj contains the AMD64 world
and /foo/bar/CURRENT/obj/arm64.aarch64 seems to be insufficient respected.

Wasn't the idea of /usr/src and /usr/obj to have one source tree, but different
trees for the resulting world and kernel? A "native" build on AMD64 doesn't go
into /usr/obj/amd64, it has its root at /usr/obj, but for the cross compiled
world, it is then /usr/obj/arm64.aarch64.

The problem then starts to get critical for poudriere. I neither do not want to
compile a fresh world via setting -m svn+https nor do I want to installed
precompiled binaries from remote. I already have(!) a successfully built word,
so all I need seems to apply the right delegatin of that what
"MAKEOBJDIRPREFIX" represents.

Am I missing here something or is poudriere not capable of handling this view?

Thank you in advance,

Oliver
Received on Wed Feb 01 2017 - 08:21:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:10 UTC