poudriere, native-xtools and jail older than host

From: Felix Palmen <felix_at_palmen-it.de>
Date: Sun, 10 Jul 2022 15:39:55 UTC
I want to test my ports on aarch64 (for 13.1-RELEASE and 14-CURRENT) as
well, now that it's a tier-1 architecture, but running into a problem
doing so.

I don't have a suitable ARM machine for the purpose, so I'm relying on
qemu-user-static and native-xtools. I installed the jail for 14-CURRENT
manually from source, including native-xtools, and it's working
perfectly with poudriere.

For 13.1-RELEASE, I used the http method to install a jail like that:

# poudriere jail -c -j 131aa64 -a arm64.aarch64 -m http -v 13.1-RELEASE

After downloading and installing the distfiles, this automatically
started to build and install native-xtools. The only problem is: it
doesn't work, I can't even build ports-mgmt/pkg in that jail.

I tried to debug it in an interactive testport session, trying this in
pkg's source dir:

# CC=/nxb-bin/usr/bin/cc ./configure

and found these errors in config.log:

| Failed: /nxb-bin/usr/bin/cc -g -O2 conftest__.c -o conftest__ -larchive
| ld: error: /tmp/conftest__-e26774.o is incompatible with /usr/lib/crt1.o

I could work around this problem by disabling native-xtools (option -X
to poudriere-jail seems to do that trick), but I'd really prefer using
them for obvious reasons.

In case it's relevant, I'm using ports-mgmt/poudriere-devel.

Is there a way I can fix this problem?

TIA, Felix

-- 
 Dipl.-Inform. Felix Palmen  <felix@palmen-it.de>   ,.//..........
 {web}  http://palmen-it.de  {jabber} [see email]   ,//palmen-it.de
 {pgp public key}     http://palmen-it.de/pub.txt   //   """""""""""
 {pgp fingerprint} A891 3D55 5F2E 3A74 3965 B997 3EF2 8B0A BC02 DA2A