From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ABKjDq85GmB7eQAA0tVLHw (envelope-from ) for ; Wed, 03 Feb 2021 05:50:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id MBN7Cq85GmCBcAAA1q6Kng (envelope-from ) for ; Wed, 03 Feb 2021 05:50:39 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 980E3940418 for ; Wed, 3 Feb 2021 05:50:38 +0000 (UTC) Received: from localhost ([::1]:38112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7B3l-0000ry-JP for larch@yhetil.org; Wed, 03 Feb 2021 00:50:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7B3X-0000pP-O5 for guix-devel@gnu.org; Wed, 03 Feb 2021 00:50:23 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]:28167) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7B3V-0007P6-T6 for guix-devel@gnu.org; Wed, 03 Feb 2021 00:50:23 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1612331421; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-Id: In-Reply-To: References: From: Subject: Cc: To: Date: Sender; bh=FHrPW3Ll0eRVxuvLi/u5iU7tuoiztbpSa4KyJ6YoOas=; b=tjmLhGVjC8oW7R32GCLz6UEYiETmlJ+OZET3mZGWX5ls5BwJ/NC9o4/Y53zUbr7HQ+s9ENCs EHOXmQ5WbMwn420xEXvf7BiYZ0sDLnNuoGu45ImZ5G5yBtw+mBfdMaE+oRg6RJQEzhw49RYH NK+9oRdJ6SdBNRitqO3oFygGK33d3Incc/8koKFtCsInX8+sLzFtQVem9ic/Y4iXfdR9MBmg iQlaED3Fg/Nwn9EuKYd9zkz2PogR0FNdG9+EPAo7CXUPPQ04mL77c+x5PkfZ5TNVBDaIUpAx 8VQlXpXKFyj8H6GDWhuQRuBJrNI1NI3A3BoYpbkcZaERMev4IwqIfg== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyIyNWJlMSIsICJndWl4LWRldmVsQGdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n06.prod.us-west-2.postgun.com with SMTP id 601a398e6a70425dcaa3531c (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Wed, 03 Feb 2021 05:50:06 GMT Received: from localhost (x099243.dynamic.ppp.asahi-net.or.jp [122.249.99.243]) by wilsonb.com (Postfix) with ESMTPSA id A7CD8A18E8; Wed, 3 Feb 2021 05:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1612331404; bh=FHrPW3Ll0eRVxuvLi/u5iU7tuoiztbpSa4KyJ6YoOas=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=VCddlBIx3wNdfCjzysGtaiPZRUnbcj/pBeT8YaV0tZdLOWd9TEjq4ENRK/ZcDSTUT FyDEOWHuR8eMFps3lJi4hNNyimQwNmyM5OWKNkUn/+9AFfWF/J65dVrOYMFrz2YuL5 jMAfP1h7shJf4OpNM099oaRxUIR4FUrcUViRnYxK5Kz2QOqsyRU0hLNlore4oTSv/y qvnsFBUedO82NgVw2aQj2K+eSEEs+FnSmDtGaXXIbQAaMjry5Eg/ClY9QwZOAMaSXL cFLJ7RARTFRRX3B52GFUfSrpW0U55ozb0hJE3uWo4VlnvJ7ZMXtNc+G1MeCudU+x4W MCfnXMkehkEnYZytDpr8rL8JwJRlPjYrecC2KboPGPTuFmrKqxofCVNTKOJfuV6W8b UCMeX3d7IdXgPD1s6CdGUyzDdWtMynjTApezJOWeugDLqbc7IquCBw+TRTOWPmlcR6 pwFf2hNuw3HEOeyvJybMF7kjnW1+q6ursWb1wPnM7D7viC9I1XyGJCn2z3wD+oijYw UKP0EvJZT1d9nBF15lKuZwOduBxhL28SD3MnkrMrjuzgMNX3uqy/micMj2tAp977fU XO/wnpDMKF6SNAfCtcPxjcHV6MGOvMCHxHz/lRpOyPG0paF2SXGRtkkydM1xz0SKRb AJzx4DAbfBjSE4DOTPzU6h88= Date: Wed, 03 Feb 2021 14:50:25 +0900 To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: Re: Installing a wrapper guile script in /bin From: elaexuotee@wilsonb.com References: <3EA9135IVLYXR.223U6JDXT4SSS@wilsonb.com> <874kivlqol.fsf@gnu.org> In-Reply-To: <874kivlqol.fsf@gnu.org> Message-Id: <2VMUHEHLO03FL.3AF0SWRKGMFZ3@wilsonb.com> User-Agent: mblaze/1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=69.72.42.5; envelope-from=bounce+ec9951.08547a-guix-devel=gnu.org@mg.wilsonb.com; helo=m42-5.mailgun.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.06 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mg.wilsonb.com header.s=krs header.b=tjmLhGVj; dkim=pass header.d=wilsonb.com header.s=201703 header.b=VCddlBIx; dmarc=pass (policy=quarantine) header.from=wilsonb.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 980E3940418 X-Spam-Score: -3.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: VTe3+TwC5UwQ Ludovic Court=C3=A8s wrote: > I wrote about this topic in the past: >=20 > https://hpc.guix.info/blog/2018/01/pre-built-binaries-vs-performance/ Very nice overview! Thanks for sharing (and writing!) that article. Definit= ely feeling the urge to jump down this rabbit hole and patch upstream now. Hehe= =2E > I you=E2=80=99re the upstream author, I recommend using one of the techni= ques > given above to provide so-called =E2=80=9Cfat binaries=E2=80=9D that cont= ain several > implementations of the performance-sensitive functions; the loader > will pick the right implementation when the program starts. >=20 > If you=E2=80=99re downstream=E2=80=A6 it depends on the specifics. The l= oader is also > able to pick a .so from the right lib/ sub-directory depending on the > micro-architecture. You can try: I'm downstream, unfortunately. However, the final executable actually provi= des a flag to explicitly specify a path to the lib, so that's not really a hurd= le in this case. Given the small size of the build products, I feel like it would be nice to= fake a fat binary at the filesystem level. Mind if we just entertain this i= dea for a second? Say I have a script that reads /proc/cpuinfo and runs my executable with th= e correct flags to load the library with the best CPU features possible. How = can I embed such a script in the package definition (as a gexp?) and install it= under /bin/?