Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Mar 2023 16:09:57 +1100
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Mel Pilgrim <list_freebsd@bluerosetech.com>
Cc:        questions@freebsd.org,ports@freebsd.org
Subject:   Re: How do I determine the ABI string used by pkg?
Message-ID:  <4DF870F0-89D5-45AA-B66C-93D2D1C0DD5E@nimnet.asn.au>
In-Reply-To: <32d2e376-3f89-0588-316d-801d4cbf0b44@bluerosetech.com>
References:  <32d2e376-3f89-0588-316d-801d4cbf0b44@bluerosetech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2 March 2023 6:50:13 pm AEDT, Mel Pilgrim <list_freebsd@bluerosetech=2Ec=
om> wrote:
 > I need to determine the ABI string pkg uses on a given system, and
 > need to do so when there are no pkgs installed=2E

 # pkg -N -vv | grep ABI

gets you ABI and ALTABI; the former is the amd64 form, the latter x86:64

 > I've read through libpkg/pkg_elf=2Ec and I can see how it's reading ELF
 >=20
 > headers from well-known files=2E  That's all easy enough to replicate,
 > but=20
 > I'm a bit stuck on how it's determining the arch string for x86=2E

I'm just running from a clue by bapt@ and what's on the release DVD, in wh=
ich case the ALTABI form is a symlink:

 freebsd:12:x86:64 -> FreeBSD:12:amd64

and the All packages directory is

 packages/FreeBSD:12:amd64/All:
 total 2204897

 > How/When does pkg decide to use FreeBSD:13:amd64 instead of=20
 > FreeBSD:13:x86:64?  Can I safely assume one or the other?

You can safely assume the former, that's the usual form=2E  The ALTABI for=
m _might_ be safe but I've not tried using it=2E

cheers, Ian  (not subscribed to ports@)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DF870F0-89D5-45AA-B66C-93D2D1C0DD5E>