From nobody Mon Mar 6 07:56:22 2023 X-Original-To: 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 4PVW9h32Ssz3wZGY; Mon, 6 Mar 2023 07:56:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PVW9h295Xz3v6g; Mon, 6 Mar 2023 07:56:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678089384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jDnvusl593XlMhae8u6QVLhe2wSsnbWlcNk7XkW4BKI=; b=MeBhTwFon0jrkn6rXkNRLHIMeCSGmsl+D19Gk+nx7Lqa1uSygNY9/vUadLlw+XENDki6YZ cBzeZy35c4evJB2CzkB9PntfNJhYucea/pyEO0A0PkzxzsMqLekc3BJKzEJ4uwGTCt1iq+ mV54L9tghMEFr3R4YCccGjba3aS45MA0+iEtyFiEK/ctl7HLR6kjc5bCOyHkt+I12berKu NYWyAVoW7bIp5Dw8Gulx1VEWhXeRC0SbDZ5IQW3ysQoYD3uUkIgu57PDGxnqlN7F7dLpjA Hl0/Xj4wnJSW3TiXTMPIKluzFNVOPXHFtIYALSelvvXvXzDn3/qSlIjCFtnRDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678089384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jDnvusl593XlMhae8u6QVLhe2wSsnbWlcNk7XkW4BKI=; b=uH2oMRWh7KAaFmQe88DaeoacJMQ4tF24zjKuehJtrn1XqBuwGsJJR+mI6eswjBNYgPlgBM gh3dkRTMsl4rlEvMPunqgQg4Ro8jDADYHb8PrHTI2WTtDIUiIX+BRZFxi7+6wbt2X89xZr 8hInTFsqkeu3ysPQEeHofLGZg6hoyA24vv5z+hR3H3DjgeyB2Iz3IAe5U7mzvKPi30s4ap gF2n8vMU7WqXkA+1iystGMUaXPNkutZgSd8PdIgtmfT7fLv7L0FrVMW4+qTOt+WRGSujwA 5NQA5Jp13I1m05OwJj+ldCQpIZr3DHR5X0TKHE4xFGygpc5kOFKy5A3YltDveg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678089384; a=rsa-sha256; cv=none; b=LIRiO7CtlfFsbRuCrTeTaaU3GqZQySM9FJj5K61UR5Hux0V6VIczDxsBsxclUrLPbpeHWa jFAXtofb/5Sih6GyEHaakyFh6HmyiP4AOflG2KpBGLIa3BKHFqQhXNqWljlqjEchmSiyUt 6QhypRKif6xBzbbLZFaECRHrCfkziWDVZsUPlPLaearbMIZ1yD3mNYYHBYlyFAb1HRaF// Y7Ms6iBPKFjMLpXrenH3z+XNXLthbaj5/hEjEMABB67hxQWJV/kiaYZc7bm+dJA/vtvrqA 4dLQToxZSz+PwNAeTZPS1fGgTESPNFb7eaJBQfk2VUqGwi5SjF7RUXtKHE+c4Q== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PVW9h0LvPz10l2; Mon, 6 Mar 2023 07:56:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id ED2AC1C0F65; Mon, 6 Mar 2023 08:56:22 +0100 (CET) Date: Mon, 6 Mar 2023 08:56:22 +0100 From: Baptiste Daroussin To: Mel Pilgrim Cc: ports@freebsd.org, questions@freebsd.org Subject: Re: How do I determine the ABI string used by pkg? Message-ID: <20230306075622.xfzs33fmflc2vmtb@aniel.nours.eu> References: <32d2e376-3f89-0588-316d-801d4cbf0b44@bluerosetech.com> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32d2e376-3f89-0588-316d-801d4cbf0b44@bluerosetech.com> X-ThisMailContainsUnwantedMimeParts: N On Wed, Mar 01, 2023 at 11:50:13PM -0800, Mel Pilgrim 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. pkg config ABI pkg config ALTABI > > 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. Why, what are you trying to do? > > How/When does pkg decide to use FreeBSD:13:amd64 instead of > FreeBSD:13:x86:64? Can I safely assume one or the other? > Internally pkg always and only uses freebsd:13:x86:64 internally and never FreeBSD:13:amd64. the ALTABI allows fine grain matching of ABI and compatibility between arches. ABI is a more user freindly way to read it. Bapt