From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: rust (build system) deficits Date: Sat, 7 Mar 2020 14:46:14 +0100 Message-ID: <6d384619-25a9-5699-bda5-5f4bf9380976@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39354) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAZmY-0004KF-Gv for guix-devel@gnu.org; Sat, 07 Mar 2020 08:46:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAZmW-0003NH-BT for guix-devel@gnu.org; Sat, 07 Mar 2020 08:46:22 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:48896) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jAZmV-0003LN-SE for guix-devel@gnu.org; Sat, 07 Mar 2020 08:46:20 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48ZQkL15Gwz1qqkG for ; Sat, 7 Mar 2020 14:46:18 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48ZQkL0wJ3z1r0c8 for ; Sat, 7 Mar 2020 14:46:18 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 7lrMuCFj3y0K for ; Sat, 7 Mar 2020 14:46:16 +0100 (CET) Received: from hermia.goebel-consult.de (ppp-188-174-55-38.dynamic.mnet-online.de [188.174.55.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Sat, 7 Mar 2020 14:46:16 +0100 (CET) Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id 3A39860113 for ; Sat, 7 Mar 2020 14:49:59 +0100 (CET) Content-Language: en-US List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Guix-devel Hi, I just package "nettle-sys", which are binding for the nettle crypto library. Builiding these bindings takes quite some time, some native inputs and - worst of all - some special phases. After building, the output is empty (beside some license files). Now when building `nettle`, which depends on `nettle-sys`, I - as expected - get errors, since e.g. `bindgen` is missing. While I could work-around this issue for this case, IMO this shows a much, much deeper and serious problem with rust and the rust build-system: We can not pre-built packages! Rust not being able toe pre-build packages is an open issue, see . But this issue also points out two things: 1. There seems to be some `.rlib` pre-built format. And "This is a Rust problem even more than a Cargo problem. You can't guarantee that a pre-built Rust library will work unless it's built with the exact same SHA of the compiler." OTOH sis means: since we can guarantee the very same compiler to be used, we could use rust libraries. 2. There is a tool/library DHL (Dependency Hijacking Library) which tries to solve this issue. Maybe this helps. If anybody is working on a solution: Thanks :-) Side note: This also is an ecological problem, as each build will consume more power and CO2 then required. This is esp. true for guix (and nix), where packages need to be rebuild much more often than on non-functional distributions. -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |