From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 01 16:54:12 2021 Received: (at submit) by debbugs.gnu.org; 1 Dec 2021 21:54:12 +0000 Received: from localhost ([127.0.0.1]:45945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msXYK-0005D3-GQ for submit@debbugs.gnu.org; Wed, 01 Dec 2021 16:54:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:48318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msXYI-0005Cw-Mh for submit@debbugs.gnu.org; Wed, 01 Dec 2021 16:54:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msXYH-0004Ol-PP for bug-guile@gnu.org; Wed, 01 Dec 2021 16:54:10 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:47347) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msXYF-0000oC-Qc for bug-guile@gnu.org; Wed, 01 Dec 2021 16:54:09 -0500 Received: from [10.188.216.67] ([46.193.67.184]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.184]) with ESMTPSA (Nemesis) id 1M4JeB-1msGZA1TVJ-000MJa for ; Wed, 01 Dec 2021 22:53:57 +0100 Message-ID: <24ba24dc-004e-7c00-96eb-ea2412d2e89b@abou-samra.fr> Date: Wed, 1 Dec 2021 22:53:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Content-Language: en-US To: bug-guile@gnu.org From: Jean Abou Samra Subject: Variable not visible to compiler causes compilation failure when importing module Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:5c3713qtoRQOcbMzgjLoaGYYFmKGqMwky/e1aWgCkQZK63V6mM2 xMghqhlJbkuv+U3jJIiUDNV61Nlwd0yEhjqxWsTop9JW+u7lEnH6EkACEXj1NWyTd8DK7Xd OnV/CubglTjAJF1xtbciU0kl91hkQbsUfajN5oG3Om6yq00vj4DBoI/B19ouxtHBVYtp8qC c9ylg+DpoliTqK97gBTxA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:xj2eUIF+/7k=:uDVKSY2H+sBdZBqagrvPOV HIjEtx0jcT861ic37scdLbfXXmhH9YnGv3l8LJOSdkFxdqiCxuPY8Hf53uRx48Q37bLvAAMeW CsQ0oyFr3s//VxbIdxRIso9MZ5b1kdCG0TnSksQXBFCA39SVhIqvy+XUuKs6J6CQUf6Ihdirn cC88JfA85vy9m5UDH7sU3HiXMvuDI7dfPK5WMEGkhtfCsLTH7UKWT++h0fxJnqirh3LUtfdKh /URlaELpsnGyQoZpKb3zciD+WTyoouffUYrjWN54TRJ8g+gHp+KU11q6oJBThCPxf2isruwOp gR7ZA3uPvPxfI+XOiRYConLf3lu94BGT4ToH+KG2e+JuLeMh9H1BhQ2lIL+Nq3vXz7VM5czRR FvrrVaB0BITMXIf6krrAWe4eIfaIPojju6YmQQZSobtrZH3J+0IVFVcTHqeUpNQUaS5TJxKb6 luBKdtZYwY/1BmPJL9UOopOXL5SFouhPBg2DGlJMksJMJRpiPHstNprB9X+tGikBPh2gtwTRC Kn2PsRyCPEWVttD2UHcqU0THK/guGgI+KbMvbbIzLHMr+MvC7pmVsOpZndpmgIylAw3vDR9aa zOuyIgmInCNOGEAJ0dZuUQkC2wiqORfzqMta7uD3tYQ4u7v63E/NtYmByZ5Hzt3psyA5y1+TG s98VDgK94X8yzB03UbbT9BKTHNb28+CH4Eyuqw/l3Qgzgjb7s1M8B3uaz5tZCUyEucfg= Received-SPF: none client-ip=217.72.192.75; envelope-from=jean@abou-samra.fr; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) In experiments with using guild for byte compilation in LilyPond, I am hitting what seems like a bug. When a variable is not defined declaratively in a way that makes the compiler aware of it, the module it is defined in can compile, but modules using it cannot. Here is an example. fail.scm contains: (define-module (fail)) variable-coming-from-somewhere-but-not-known-at-compile-time import.scm is just: (use-modules (fail)) Compiling fail.scm works: $ guild compile fail.scm fail.scm:3:0: warning: possibly unbound variable `variable-coming-from-somewhere-but-not-known-at-compile-time' wrote `/home/jean/.cache/guile/ccache/3.0-LE-8-4.4/.../fail.scm.go' Compiling import.scm gives this traceback: $ guild compile -L . import.scm Backtrace: In system/base/compile.scm:    327:39 19 (read-and-compile # #:from _ #:to …)    261:27 18 (_ _ _) In ice-9/boot-9.scm:    2835:4 17 (save-module-excursion #) In language/scheme/compile-tree-il.scm:     31:15 16 (_) In ice-9/psyntax.scm:   1230:36 15 (expand-top-sequence (#) …)   1222:19 14 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)    259:10 13 (parse _ (("placeholder" placeholder)) (()) _ c&e (# #) #) In ice-9/boot-9.scm:   3927:20 12 (process-use-modules _)    222:17 11 (map1 (((fail))))   3928:31 10 (_ ((fail)))   3326:17  9 (resolve-interface (fail) #:select _ #:hide _ #:prefix _ …) In ice-9/threads.scm:     390:8  8 (_ _) In ice-9/boot-9.scm:   3252:13  7 (_) In ice-9/threads.scm:     390:8  6 (_ _) In ice-9/boot-9.scm:   3536:20  5 (_)    2835:4  4 (save-module-excursion #)   3556:26  3 (_) In unknown file:            2 (primitive-load-path "fail" #) In fail.scm:       3:0  1 (_) In ice-9/boot-9.scm:   1685:16  0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Unbound variable: variable-coming-from-somewhere-but-not-known-at-compile-time I would appreciate any workarounds. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 19 16:08:54 2022 Received: (at 52230) by debbugs.gnu.org; 19 Feb 2022 21:08:54 +0000 Received: from localhost ([127.0.0.1]:58825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLWyM-0000R0-3L for submit@debbugs.gnu.org; Sat, 19 Feb 2022 16:08:54 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:41845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLWyJ-0000Qo-TX for 52230@debbugs.gnu.org; Sat, 19 Feb 2022 16:08:52 -0500 Received: from [10.188.216.67] ([46.193.67.184]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.184]) with ESMTPSA (Nemesis) id 1N3KDM-1oLmZg0Aa2-010Lrf; Sat, 19 Feb 2022 22:08:46 +0100 Message-ID: <1fbaea64-8a8f-ea4b-714c-68ced7e1eab8@abou-samra.fr> Date: Sat, 19 Feb 2022 22:08:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: guile-user@gnu.org, guile-devel@gnu.org, 52230@debbugs.gnu.org From: Jean Abou Samra Subject: 'guild compile' and C(++) extensions (in the context of LilyPond) Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:DLcwuMAG9K59sRACp+KmBud+Tlt7vYSidK8OEJjjYC9L9KKpmzi IfgOL+uox/akqTEsaPXhfOpKmNErNKrzpXtPMUQdvckmFoI4rDRr++OV2/VMHIPlKcCoZ1i K61kkIebuGde7uucDvl+SHF4kCmtiqNfoXiDf2PUCyixAJaz5Gg/xO8+3U3WMnxR2gt+Dcx OQonvseqUDSt8oVG6Jlhg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:dq9s6gcns/E=:aKXBAbRdeI/an3vsFnix0U qIDrERFDb0AtYzO6K3zzUv9t9vQwddRv9YIQhbLSC6aZ15zYjwFIeIEtE1p0ktILWQeRI7e6F 1/BquC62sFPpOSgFQpIMgVq/eIM00ftIEkNehJzJSDeBBpTbDJIL98DE+3yiqYeF4MX0QYACi ophxx73R0zF94rpv+nKTooEaZN23Ox5p2BgiU7Rziv8CX+av0wIsduQEBlkYFaiHukWjRqkEg 97/PLc8o3kB7dV7+IklezEejDWwNnrH670xZtxyYyrRlkZpGSHDb0qGq8D2PTZoklqokXnOON /gZG9/rI2nKZYtPE+LrzHvUBVQ1ltYBSCZC44XxDHsQGvQuBZUx+EQ4C7UO9f5ONvJzemQ8XS Dcx2UbLDo0G/TpX92qSfg5bSudDa/s8aSfycNQqOnOFbZb9eUbCE/w15zO4+uGNdB8Ea5lDUV 8i77QeHk7qcuDsGgAtNi6FlaiGHulRa8Q61rSSFObcnfjsUFe/gEvKO5ipGy3yW8trQoD+RwQ cyZN8ZvuFXN7CGEhif4fDUOriEk0arX0q9wzCPJFqnsrznaEtLJAHdQDOt5uASGdIToFfayyt tP+ZaILkbhWeKS1Yp28Y5H3X/bO+qCZXsCwAJDEYtQsnqSqUxgVKObSaMPUmXud3zgM0dsP96 2IgR0lvnjiSoU7kdfi/fHpQ4cSR5vUZslWkKrrquLXeV12vl0U/MtWYFniGTA4lxCIU8= X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52230 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, (Cross-posted to guile-user, guile-devel and the debbugs issue, I'm unsure where this should go.) In LilyPond, we have now made a development release with binaries using Guile 2.2. However, a major problem is that we don't ship Guile bytecode yet. Notably, one problem to get the bytecode in a build system is that we are currently forced to use GUILE_AUTO_COMPILE=1 to generate it -- which means we need to compile the entire suite of regression tests in order to exercise all files. This also means spurious test differences when Guile gets noisy about byte-compilation (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16364). In summary: it would mean a lot less headache to be able to use 'guild compile'. Unfortunately, this does not work. One issue is that our Scheme files are mostly not Guile modules, but loaded directly with primitive-load-path. This will be a lot of work to fix, but it is on our end. However, I don't understand how to get around another issue, which is how our Scheme code interfaces with C++.   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52230 Basically, if a Scheme file has something like   (define-public point-stencil (ly:make-stencil "" '(0 . 0) '(0 . 0))) where ly:make-stencil is a procedure defined in C++, I can get this file to compile, but I can't get files using it as a module to compile. Investigation shows that Guile is apparently trying to load the module when compiling. $ cat print.scm (define-module (print)) (display "Module running!") $ guild compile print.scm wrote `/home/jean/.cache/guile/ccache/3.0-LE-8-4.4/home/jean/repos/lilypond/print.scm.go' $ cat import.scm (use-modules (print)) $ guild compile -L . print.scm wrote `/home/jean/.cache/guile/ccache/3.0-LE-8-4.4/home/jean/repos/lilypond/print.scm.go' $ guild compile -L . import.scm Module running!wrote `/home/jean/.cache/guile/ccache/3.0-LE-8-4.4/home/jean/repos/lilypond/import.scm.go' For functions defined in C++, that does not work: they are added by the entry point in the function that scm_boot_guile calls, using scm_c_define_gsubr. They aren't defined until the program is actually run. So how is 'guild compile' supposed to work with C(++) code? Thanks in advance, Jean From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 19 16:25:56 2022 Received: (at 52230) by debbugs.gnu.org; 19 Feb 2022 21:25:56 +0000 Received: from localhost ([127.0.0.1]:58834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLXEq-0000qO-0h for submit@debbugs.gnu.org; Sat, 19 Feb 2022 16:25:56 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:45639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLXEo-0000qB-By for 52230@debbugs.gnu.org; Sat, 19 Feb 2022 16:25:54 -0500 Received: from localhost (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 21JLPfFH005985 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 19 Feb 2022 16:25:45 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 21JLPfFH005985 From: Olivier Dion To: Jean Abou Samra , guile-user@gnu.org, guile-devel@gnu.org, 52230@debbugs.gnu.org Subject: Re: 'guild compile' and C(++) extensions (in the context of LilyPond) In-Reply-To: <1fbaea64-8a8f-ea4b-714c-68ced7e1eab8@abou-samra.fr> References: <1fbaea64-8a8f-ea4b-714c-68ced7e1eab8@abou-samra.fr> Date: Sat, 19 Feb 2022 16:25:41 -0500 Message-ID: <875ypa7dm2.fsf@laura> MIME-Version: 1.0 Content-Type: text/plain X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Sat, 19 Feb 2022 21:25:41 +0000 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52230 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On Sat, 19 Feb 2022, Jean Abou Samra wrote: I had similar problem with Jami. I added C++ primitives to Guile, but these were not load using the foreign function interface. Note, I'm using Guile 3.0.8, but I think the same could be done for Guile 2.0. Basically what I do is to add a `compile` command to my program so to speak. So usually the program does this: main -> install_scheme_primitives() -> Run the program And for compilation main -> compile_in_guile() -> install_scheme_primitives() -> compile-file To be clear here's what install_scheme_primitives() does: -------------------------------------------------------------------------------- void install_scheme_primitives() { /* Define modules here */ auto load_module = [](auto name, auto init){ scm_c_define_module(name, init, NULL); }; load_module("jami account", install_account_primitives); load_module("jami call", install_call_primitives); load_module("jami conversation", install_conversation_primitives); load_module("jami logger bindings", install_logger_primitives); load_module("jami signal bindings", install_signal_primitives); } -------------------------------------------------------------------------------- and here's what compile_in_guile() does: -------------------------------------------------------------------------------- void* compile_in_guile(void* args_raw) { // ... install_scheme_primitives(); // This string is usually formatted scm_c_eval_string("(use-modules (system base compile))" "(compile-file \"foo.scm\" #:output-file \"foo.go\")") // .. } -------------------------------------------------------------------------------- so now I can correctly compile any file in the project. I just add this to Makefile.am: -------------------------------------------------------------------------------- MODULES = foo.scm GOBJECTS = $(MODULES:%=%.go) %.go: %.scm | program @echo GUILD; ./program compile $< $@ -------------------------------------------------------------------------------- Hope that can help. -- Olivier Dion Polymtl From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 22 01:34:30 2022 Received: (at 52230) by debbugs.gnu.org; 22 Feb 2022 06:34:30 +0000 Received: from localhost ([127.0.0.1]:39823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMOko-0006Ya-Ay for submit@debbugs.gnu.org; Tue, 22 Feb 2022 01:34:30 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:53525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMOkl-0006YN-Vf for 52230@debbugs.gnu.org; Tue, 22 Feb 2022 01:34:28 -0500 Received: from [10.188.216.67] ([46.193.67.184]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.184]) with ESMTPSA (Nemesis) id 1MMFdY-1ndWA12byw-00JMIM; Tue, 22 Feb 2022 07:34:11 +0100 Message-ID: <48e30b1b-2f2b-d09d-8aa3-ed9a0c41923a@abou-samra.fr> Date: Tue, 22 Feb 2022 07:34:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: 'guild compile' and C(++) extensions (in the context of LilyPond) Content-Language: en-US To: Olivier Dion , guile-user@gnu.org, guile-devel@gnu.org, 52230@debbugs.gnu.org References: <1fbaea64-8a8f-ea4b-714c-68ced7e1eab8@abou-samra.fr> <875ypa7dm2.fsf@laura> From: Jean Abou Samra In-Reply-To: <875ypa7dm2.fsf@laura> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:/kHgbcz3UHKXYxnMUq8m8jQsUOkqfbpCfPoBL0/KFAdQ0AOF420 c2jvqrGawPeKT7Af/jGEMitPJUokNlbuLoxMPSo5kfDgaVZbZ6oVtTwwcaLKSU6st41E2lW VF7j3HainI9pedWxwv4sGLuc3NA41bhNJ40coa16xev3yV6HogepzxO2eQI6fziBd8lFKQy ke39fyWm9yLRyndU2aLjw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:0HM7cUI/ThE=:lQzAPNcRuuZ5b28HuzTdBO GR1NUevNsldyxjFnqpwXjE/KVGtA9zMbKVNTqKSLng6DdvPEkFJiCHXl9foBWhXUQZPadqQVt zLAqPjSdwANW3KckcZSvDNW0c5ar+e6kPd8UPki5zBJAqoII3FaTq/W9o8TEaOmMaW83Ljw0T +TGCvDxmuTVsB0SNv4piC09zqgO0ynt0ceQ9JkEE6UmSTVgJUJbZx5/Vfi7uQKxVSRUGndPOb BLUnE6/8xr2F6DMY8DOFKIFetKfpgWYwnBxATRJEorhfbx863U7qx7yEB3d48MGJf6uRbyNDx CTVCO5HyuT0lbA9NPDsP8yChjDwO2bGcreoaPYGdojR14OJ/9wflbZYOVc+C1sOiaX1CB57JY X+cbIfv3msV9VygOvxglP0DAbsFcGSBG9vqM632F2ly6XlHkO9hRPevRPfcv3C0LDYmWvnC9v y7LPWdkm0hP2fozLhWJHcFMuFMbN+J/2VAK8GAg9eFXfjMF7kKyp6RDVV3S/7/qNZpGkK4R7h sIM4SxBV6UFWwh60qZoBYp/3ThyellYFzjIxOFxDIgKHxR0+qbJ4APLOWWGESiBWX42vpfJAd 6+hQ3pxjGR7s6+UUwVSnIfpZ4MVR7Lf2F//A95fFbicN4Apifhy2tCZX5eWUa3l4G+uR6ufcQ 89Yoh2LyHxvpbaIujXY/0MjoUCLk3NFD/xNJ1O0okcXrES5+US4vhm0kzIDp0IT02lTI= X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52230 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Le 19/02/2022 à 22:25, Olivier Dion a écrit : > On Sat, 19 Feb 2022, Jean Abou Samra wrote: > > I had similar problem with Jami. I added C++ primitives to Guile, but > these were not load using the foreign function interface. Note, I'm > using Guile 3.0.8, but I think the same could be done for Guile 2.0. > > Basically what I do is to add a `compile` command to my program so to > speak. > > So usually the program does this: > main -> install_scheme_primitives() -> Run the program > > And for compilation > main -> compile_in_guile() -> install_scheme_primitives() -> compile-file > > > To be clear here's what install_scheme_primitives() does: > -------------------------------------------------------------------------------- > void > install_scheme_primitives() > { > /* Define modules here */ > auto load_module = [](auto name, auto init){ > scm_c_define_module(name, init, NULL); > }; > > load_module("jami account", install_account_primitives); > load_module("jami call", install_call_primitives); > load_module("jami conversation", install_conversation_primitives); > load_module("jami logger bindings", install_logger_primitives); > load_module("jami signal bindings", install_signal_primitives); > } > -------------------------------------------------------------------------------- > > and here's what compile_in_guile() does: > -------------------------------------------------------------------------------- > void* > compile_in_guile(void* args_raw) > { > // ... > install_scheme_primitives(); > > // This string is usually formatted > scm_c_eval_string("(use-modules (system base compile))" > "(compile-file \"foo.scm\" #:output-file \"foo.go\")") > > // .. > } > -------------------------------------------------------------------------------- > > so now I can correctly compile any file in the project. I just add this > to Makefile.am: > -------------------------------------------------------------------------------- > MODULES = foo.scm > GOBJECTS = $(MODULES:%=%.go) > > %.go: %.scm | program > @echo GUILD; ./program compile $< $@ > -------------------------------------------------------------------------------- > > Hope that can help. Thank you Olivier, this is hugely helpful. So far we thought we'd need to restructure our set of Scheme files in proper modules to make separate byte-compilation happen. This works in my experiments, and can compile several files that are part of the same module as well, using the #:env argument of compile-file. Thanks again, much appreciated. Best regards, Jean