From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?VG9tbWkgSMO2eW7DpGzDpG5tYWE=?= Newsgroups: gmane.lisp.guile.devel Subject: Re: Exporting a nonexistent variable Date: Tue, 5 Nov 2024 09:25:27 +0200 Message-ID: <0effbe63-caee-a08b-77e0-576c3fe4b25c@gmail.com> References: <20241104214356.Ykjw2D0014tRJL601kjwhV@laurent.telenet-ops.be> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31023"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 To: Maxime Devos , "guile-devel@gnu.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Nov 05 08:26:12 2024 Return-path: Envelope-to: guile-devel@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 1t8Dx5-0007q4-4L for guile-devel@m.gmane-mx.org; Tue, 05 Nov 2024 08:26:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8DwW-0007jg-45; Tue, 05 Nov 2024 02:25:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8DwV-0007jN-5c for guile-devel@gnu.org; Tue, 05 Nov 2024 02:25:35 -0500 Original-Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8DwT-00074j-9N for guile-devel@gnu.org; Tue, 05 Nov 2024 02:25:34 -0500 Original-Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2f7657f9f62so42926461fa.3 for ; Mon, 04 Nov 2024 23:25:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730791531; x=1731396331; darn=gnu.org; h=content-transfer-encoding:in-reply-to:subject:from:content-language :references:to:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=pw0FAkM6Hzh0BS1/mBZdGB8tDILdWEqrQFvY6qEqmTk=; b=M8svyL3Jl5EevTT6rDOR1NtuYstd+qC50mgJJKbToClYEhdSTfShY7ckUOp0IiZJzt YjZd6sVXovCBxzGaZh5l7PxVIpbQa5GfFw/+J5PlTmw5uiArZG7tVU2WECGbP0so5SPR XvF+WcKmlcY0wd671or7jxgP2COMx8/SHMbr27Ei+uqm+q9pWp9UPEeDc1ywAAqm1VZ0 7nEWmN9fPZpeGECWi0lgXtJwSE+MW9d4xK8sbLr+NLiS4ilGSkqtd/BLFM+Rn3JtH2n9 Gs2G0UTap89L+leudrCdjncjwMpf36hc3KB2R5TZ2ckmBwD3X5UrhiLe4JbJkMQZYPh9 HBdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730791531; x=1731396331; h=content-transfer-encoding:in-reply-to:subject:from:content-language :references:to:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pw0FAkM6Hzh0BS1/mBZdGB8tDILdWEqrQFvY6qEqmTk=; b=c0c5GTlviq5Q66begcUXLHHBn0UktTR7SgzybFfSJlKk2FBTzKwKhjDdcFiQVkF8GY pSHR1DYOAs4l2alekgdO/7IPhk05nNh4lsxJ3oz40G6LS1CE8T+GjcbiH+pd8ec4GiMk rgA0dHWaObZ09FbwrCzszpTMI75CXxObVesdCqn52pExmjjXdXnAdfrou4aKt/sIVope SL8yFkAie9ttOe8PmjZnfgYJF7szVm7Yp24/+qQRp6J8tHLnVh8ywHyGRwqtWHC0AKA2 +XRV1kCW3Uipo3vOrRG6lb/n2aDBCY3A1EMkQD8ef7Z3v++ZdCkgTJe41VTSg5keNxnY U5hA== X-Forwarded-Encrypted: i=1; AJvYcCUb6xUJgnnCZH8thegUjw4yHxvJixuVqeXxQIo2BCt1GOqXppZKX/B6ypI1kOmcRKNxLUgQj8CV6HjGAA==@gnu.org X-Gm-Message-State: AOJu0YxgT3MW6+gNuzxtTbPBHNPdfvShnv7JRoNrjZnFaqgCU6VpDqnn NumvEpuhKLRXl6O1iyoEGvmtkii5YqQkocO4WMmtHmZfTpb9ltA= X-Google-Smtp-Source: AGHT+IGAVqr4y60CCDz+/uK/ekVcyd/IOZIuCzW2WN/CrQnqGoEQg7VqsO42IGePH8Unjqtk6m7QCw== X-Received: by 2002:a2e:743:0:b0:2fb:3a92:d1a7 with SMTP id 38308e7fff4ca-2fcbe09a5c1mr145379741fa.33.1730791530503; Mon, 04 Nov 2024 23:25:30 -0800 (PST) Original-Received: from [192.168.252.68] (mobile-access-6df049-195.dhcp.inet.fi. [109.240.73.195]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2fdef3bbea1sm20037211fa.24.2024.11.04.23.25.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Nov 2024 23:25:29 -0800 (PST) Content-Language: en-US In-Reply-To: <20241104214356.Ykjw2D0014tRJL601kjwhV@laurent.telenet-ops.be> Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=tommi.hoynalanmaa@gmail.com; helo=mail-lj1-x232.google.com X-Spam_score_int: -46 X-Spam_score: -4.7 X-Spam_bar: ---- X-Spam_report: (-4.7 / 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, FREEMAIL_FROM=0.001, NICE_REPLY_A=-2.588, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22755 Archived-At: Here is another example: --- mod1.scm --- (define-module (mod1)) (export myproc) (define (myproc0)   (display "Hello\n")) --- end --- --- mod2.scm --- (define-module (mod2)) (export myproc2) (use-modules (mod1)) (define (myproc2)   (display "Hello again\n")) --- end --- --- program.scm --- (use-modules (mod1)              (mod2)) (define (main args)   (myproc)) --- end --- I compiled this example with the following commands: --- cut here --- export GUILE_LOAD_COMPILED_PATH=. guild compile --warn=unbound-variable -o mod1.go mod1.scm guild compile --warn=unbound-variable -o mod2.go mod2.scm --- cut here --- The compiler gives no warnings and running "guile -e main -s program.scm" gives the following error: --- cut here --- ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;;       or pass the --no-auto-compile argument to disable. ;;; compiling /home/tohoyn/tyo/omat/ohj/scheme/export-test3/program.scm ;;; compiled /home/tohoyn/git/savannah/guile/cache/guile/ccache/3.0-LE-8-4.7/home/tohoyn/tyo/omat/ohj/scheme/export-test3/program.scm.go Backtrace: In ice-9/boot-9.scm:   1762:12  4 (with-exception-handler _ _ #:unwind? _ # _) In unknown file:            3 (apply-smob/0 #) In ice-9/boot-9.scm:     731:2  2 (call-with-prompt _ _ #) In ice-9/eval.scm:     619:8  1 (_ #(#(#))) In /home/tohoyn/tyo/omat/ohj/scheme/export-test3/program.scm:       6:3  0 (main _) /home/tohoyn/tyo/omat/ohj/scheme/export-test3/program.scm:6:3: In procedure main: Unbound variable: myproc --- cut here ---      - Tommi Höynälänmaa -- Kotisivu / Homepage: http://www.iki.fi/tohoyn/ Sähköposti / E-Mail: tommi.hoynalanmaa@iki.fi GPG-sormenjälki / GPG fingerprint: 55F4 2477 7155 3528 5CB2 2B7A BB86 1FDE 4046 0F83 FT, Debian-ylläpitäjä / PhD, Debian Maintainer