From nobody Sun Mar 05 17:54:23 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PV8VS1Lfkz3wkr7 for ; Sun, 5 Mar 2023 17:54:40 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-24.consmr.mail.gq1.yahoo.com (sonic311-24.consmr.mail.gq1.yahoo.com [98.137.65.205]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PV8VR1jc1z3hrG for ; Sun, 5 Mar 2023 17:54:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b="o/tl0Ma+"; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.205 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678038877; bh=SqoPEqX4V8S2MM8ij+igrNUPbuWx0LfXRiz9R71i8fA=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=o/tl0Ma+/UjL1AfRd+uAHhoa5CE6zGxFV5YSMV517qFtJX+1BkIxs9JQx5Ml2DPTM+KWAovUvv2pADSGmeNonX0YWOrgZDjdIuN1LI0JBvm2yp9vEEphhL9qky9No71ESqK2yNSwMe3DBYzsPGXUEfv/15PnSpYAina7J5+kqmeiss9hz/8fQZloWgePTviCzDx30KCxKbTvotAJrs/OSDmh8prPkeHGqa1w6cQoyj5+yFYelVZ0NXphRDkkDE6ujVTXUlBflLxQiStiSxE+E+zx7d6qQ3J1yh8M+7wcsuaqlxNIbJYdGxro1P8RG7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5hK1KdPSbh0wrGz30nX..C.9INWdVjQBxe46Od9XtsN17AW8ZT8aizY.4neEQq5p 38op7C4cDmr5tKoXuasASt6qbxYHplDma9diRJ9CctJZx4EolXPSAR52qVVAlIjFih9eQhlMSY84 e2EGztNxhl4wGsxu7k8iiIpDULHlwc4rhqhi64lSwKmlTTYK_2Tt_TkqKy..9Mx_v3_HelVZRgrn CilcKtcyi1lXOIjKXlDL8soiIbQfYOD2a0nnSOJXxX27M.sctUubpl39z65iR_cqGB4bRDBbSHIr pDJMArVsoK286gptV.5rIidyQ3zXHpwPc.cVcoLQsZul35fB75.i0qBFYyExQm.oYPu0EnoBa8zP eI_9iHteaTmplFSO93WviwgYz3O13Yd5HSqFKD2HsfVo2T7pOgCYNRKGXfSdNMrQw.7Bnc5SVV7R 9ha__8S5nENBQcwi9DMhKPevMw_CXiMMSGNHFKHL0s5DcaBnBuygs.e454zk34t5KeQeDfW3za5K eOQ9W4VbhwXdDcGjYVtyhzJne3mF9tPSYhrq.doYn93rPGEaB6IfJ2A2Wcw.kh4uSaRWUPlgXKqa 2KEOwsJq_LWSJNk.umXdop8eNWDj6zF4EESO1_ukT30.PNYGwnuSVwFeIAkMLOBYiy8v0_l0s562 t.DOpipbHvZ1vbmnnDzKUqKiiuxKY9LZ85a8Mo4MoDzwBMU0ZtoJq01.kAZrQhCIwTk6B_iuPjg- - X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Sun, 5 Mar 2023 17:54:37 +0000 Received: by hermes--production-gq1-6cf7749bc8-gfc22 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 2e11692db057102ec59dc5dd33dc8e06; Sun, 05 Mar 2023 17:54:34 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: RE: How do I determine the ABI string used by pkg? Message-Id: <65BCB61E-6A83-4550-9049-D503544A0AF6@yahoo.com> Date: Sun, 5 Mar 2023 09:54:23 -0800 To: list_freebsd@bluerosetech.com, Baptiste Daroussin , FreeBSD Mailing List X-Mailer: Apple Mail (2.3731.400.51.1.1) References: <65BCB61E-6A83-4550-9049-D503544A0AF6.ref@yahoo.com> X-Spamd-Result: default: False [-2.44 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.94)[-0.940]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.205:from]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org] X-Rspamd-Queue-Id: 4PV8VR1jc1z3hrG X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N Mel Pilgrim wrote on Date: Thu, 02 Mar 2023 07:50:13 UTC : > I need to determine the ABI string pkg uses on a given system, and need > to do so when there are no pkgs installed. There may be more to that question than you are expecting and you may have to establish more about what you want (and why). pkg itself is a package and so you have specified it is not installed. You have not indicated why pkg can not be installed the normal way and then used. (The question might be if this can be unblocked or not.) You have not indicated the range of system versions to be covered. 12..14? All? What about when an LP64 architecture is supported for also running an ILP32 counterpart, so there are 2 ABIs? LP64 ILP32 counterpart amd64 i386 powerpc64 powerpc mips64* mips* aarch64 armv6/armv7 (I question the accuracy of the armv6 in the "man 7 arch" table, although I could change the kernel to switch from armv7 to armv6 as the counterpart --and once helped someone build a special kernel that did so.) So how do you know which ABI you are interested in for those? > I've read through libpkg/pkg_elf.c and I can see how it's reading ELF > headers from well-known files. That's all easy enough to replicate, but > I'm a bit stuck on how it's determining the arch string for x86. There are also examples like: # pkg config ABI FreeBSD:14:armv7 # pkg config ALTABI freebsd:14:armv7:32:el:eabi:hardfp Notably, "man 5 pkg.conf" does not even mention ALTABI , just ABI . Also, https://pkg.freebsd.org/ only lists the ABI form, not the ALTABI form. But it does not mention riscv64 , riscv64sf , any mips64* , any mips* , sparc64 , plain "arm" , armeb , pc98 , ia64 , or alpha at all. aarch64 is more like amd64: # pkg config ABI FreeBSD:14:aarch64 # pkg config ALTABI freebsd:14:aarch64:64 But I'll note that I used the same machine (without rebooting) for both armv7 and aarch64 above: armv7 was via a chroot and was without qemu involved (qemu is not even installed). Do you always have a already active execution context to work with that is the one of interest, such as being in a chroot? > How/When does pkg decide to use FreeBSD:13:amd64 instead of > FreeBSD:13:x86:64? It might be that it provides ALTABI but makes no use of it? That would allow other things to make use of the extra information in ALTABI text. > Can I safely assume one or the other? Likely purpose driven, no universal answer otherwise. You may need to indicate what the ABI ( or ALTABI ) strings are to be used for. It used to be that some of the arm variants could be built for either softfloat or hardfloat. Going back further some that now have hardfloat instead used a form of softfloat. It another example of your not having indicated the limits on your range of interest in the possibilities over FreeBSD's history. === Mark Millard marklmi at yahoo.com