From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: How best to produce a standalone executable with Guile? Date: Sun, 5 Apr 2020 07:44:18 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="114991"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Apr 05 16:44:35 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jL6Vn-000ToO-6w for guile-user@m.gmane-mx.org; Sun, 05 Apr 2020 16:44:35 +0200 Original-Received: from localhost ([::1]:48502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jL6Vl-0007eV-TE for guile-user@m.gmane-mx.org; Sun, 05 Apr 2020 10:44:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34330) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jL6Vb-0007eM-LQ for guile-user@gnu.org; Sun, 05 Apr 2020 10:44:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jL6Va-0000wu-BB for guile-user@gnu.org; Sun, 05 Apr 2020 10:44:23 -0400 Original-Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:38367) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jL6Va-0000wW-48 for guile-user@gnu.org; Sun, 05 Apr 2020 10:44:22 -0400 Original-Received: by mail-pl1-x62f.google.com with SMTP id w3so4861628plz.5 for ; Sun, 05 Apr 2020 07:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=NMhGWG3tWdWepzNSei7DDXSDbGti+5vn+jegMb2VcCQ=; b=OKY8S77PO1J6R3l3srVWR/jjdx64xwXxhyX/Y9Om3sT/CvsiA+s0Hv/iyQF4DvogaD G/qoGylSLwl2OFKUHrB2Y2EGxRtE50cNjyhl360KWkLZ1uYpc1AMlH/lH/hdR9a4Sj+D T5s9/OC2m7p5gooLd4qpbj95JzWUoMTJ3sDHH08GO9/gx2ITRFxbwFKvei9clbnjMcBr sp86uTEpBspebNKJH+xYPnIXOTWTK7bLzE4MZ1G4jhaWKsFIpI6Lavoli4rAJnhRsHBa aeeIxxbuz71+p+UAxJe0j29+04jJkkhCqcuHjgwrh7Jn4QvzHb3V5JJHtWwx8YOCcnxj 5OaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=NMhGWG3tWdWepzNSei7DDXSDbGti+5vn+jegMb2VcCQ=; b=ngJOqWP0mUxUUVkUrBoj1AG3PprPWmbxhygrg9cPivFGcenRhRwVwetUnHG55hahYF /XX2Nlw/FTBxGZK1JrbsAn24P6HkfuDfYDj5K4K/2UPXYAaGDQRLzdhCLH5UykOsUP70 hplgX/t5oGdgt0pZZd39ozp1/RD81bk263wOSj1KASHDjOsyT6s4kw1y3jX5yWhaOQuJ DwSqbAoSizHA2h63w98a9NxsXiTMbPNnAC8TORR018wxkozK7ZsS9NCbZLq+yNI1aTge Z0c8LOaIUFnlUuYfA+PrZs6lSK+7+E2LPomkyEaTFKxtI1dDDTNutH3PnotBe+XzuEV8 Za2A== X-Gm-Message-State: AGi0PuZ8I5z+HG+tqdbQ4PV1q3KAClfTeFVO9vHVqirA0DnUq89/hQEv 6zkcpA9fyZSiJYcuRDwoAarG/zQB X-Google-Smtp-Source: APiQypKgJSRdcpML3uRp+HADq480XHPkeCf4b+cQoMOvW3LwZz1UrR/uU6NOULwUzf4sybGeU7TMjA== X-Received: by 2002:a17:90a:bb92:: with SMTP id v18mr21642702pjr.103.1586097860582; Sun, 05 Apr 2020 07:44:20 -0700 (PDT) Original-Received: from [192.168.2.183] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id p22sm9103040pgn.73.2020.04.05.07.44.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Apr 2020 07:44:20 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::62f X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16368 Archived-At: On 4/4/20 10:28 PM, James Cooper wrote: > Hi Guile folks, > > I am currently experimenting with a handful of languages that include > modern implementations of Concurrent ML, to determine which one appears > best able to handle computationally- and message-heavy workloads (at least > for my purposes, Computer Vision). Guile is one of the languages I am > trying out with the Fibers library. > > My question is, how can I best go about creating Linux executables from > Guile, where said programs benefit from the most ahead-of-time compilation > and optimisation possible? I don't believe they strictly need to be > standalone, as the environment I will be running the programs in will > likely be the same as the development environment. So they can undoubtedly > have dependencies on external libraries. Furthermore, I am perfectly happy > with the process being a bit convoluted, as I can easily automate it with a > makefile. I would, however, prefer if at all possible that the option to > target other processor architectures remains available down the line (I > assume using GCC can enable this, but I'm not sure). > > [...] You can't produce a pre-compiled machine code binary of your guile program.  I believe you can use the environment variable GUILE_JIT_THRESHOLD set to zero to have your code compiled to machine code on first use. $ GUILE_JIT_THRESHOLD=0 guile my-program.scm You can also start execution of your guile program from C using the techniques described in the section "Programming in C" in the Guile Reference Manual. Matt