install jail from precompiled world fails due to different MAKEDIROBJPREFIX

O. Hartmann ohartmann at walstatt.org
Wed Feb 1 09:54:12 UTC 2017


On Wed, 1 Feb 2017 10:21:28 +0100
"O. Hartmann" <ohartmann at walstatt.org> wrote:

> 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
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"

Assuming a prebuild world for arm64.aarch64 at 

/pool/sources/CURRENT/src 

and have this path given to poudriere with option "-m src=" when creating the
jail, I get this error message:

[...]
--------------------------------------------------------------
>>> Installing everything
--------------------------------------------------------------
cd /pool/sources/CURRENT/src; make -f Makefile.inc1 install
===> lib (install)
===> lib/csu (install)
===> lib/csu/aarch64 (install)
cc -target aarch64-unknown-freebsd12.0
--sysroot=/usr/obj/arm64.aarch64/pool/sources/CURRENT/src/tmp
-B/usr/local/aarch64-freebsd/bin/ -O2 -pipe -O3 -O3
-I/pool/sources/CURRENT/src/lib/csu/common
-I/pool/sources/CURRENT/src/lib/libc/include   -DNDEBUG  -std=gnu99
-Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type
-Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align
-Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
-Wold-style-definition -Wno-pointer-sign -Wthread-safety -Wno-empty-body
-Wno-string-plus-int -Wno-unused-const-variable  -Qunused-arguments
ERROR-tried-to-rebuild-during-make-install -S -o
crt1.s /pool/sources/CURRENT/src/lib/csu/aarch64/crt1.c /tmp/install.RHDj388k/sh:
cc: not found *** Error code 127

[...]


See the systroot=usr/obj/arm64.aarch64/pool/sources/CURRENT/src/tmp
which is definitely wrong.

The command sequence in full detail is:

poudriere jail -cj headarm64 -v head -a arm64.aarch64 -m
src=/pool/sources/CURRENT/src


More information about the freebsd-current mailing list