From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Native Compile: Example Of Possibly Spurious Warning Date: Mon, 17 May 2021 06:58:17 -0700 Message-ID: References: <20210516205102.286BDC21098@raman-glaptop.localdomain> <83y2cducdp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22868"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 17 15:59:46 2021 Return-path: Envelope-to: ged-emacs-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 1lidmc-0005hh-Cs for ged-emacs-devel@m.gmane-mx.org; Mon, 17 May 2021 15:59:46 +0200 Original-Received: from localhost ([::1]:60176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lidmb-0003Fu-Cz for ged-emacs-devel@m.gmane-mx.org; Mon, 17 May 2021 09:59:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lidlI-0002JY-0m for emacs-devel@gnu.org; Mon, 17 May 2021 09:58:24 -0400 Original-Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:53049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lidlG-0004By-1y for emacs-devel@gnu.org; Mon, 17 May 2021 09:58:23 -0400 Original-Received: by mail-pj1-x1032.google.com with SMTP id q6so3731677pjj.2 for ; Mon, 17 May 2021 06:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=1YJ+RtqVX6NTg+A7ppYudG/ffkLFh3I1PgafXkWeMF8=; b=pp6kQtgAsKXtT+S+c1EKZXruiZ6zx3PtQRhOFE8A/H+0/BWkid+QrzVcLNVwJ3AFXB 6HEKb62M4d7/NBz0WuXjiwxWybud5Yw8adAaySQxhwvOAiArgOi32YTYLb/R3lPPazKr oNNzAxMn1ODY52D8tQT+tcZxmJiRl8XOYcguytqTAlmp1RcZ+ArzTud/TJlTCXQ89Hia NTh76FjhvOk1ZEijhp16vsdS+W6pOjkEwxv8ie/rCtbnYiuMr6T+L8pgmfxm7OacrUkX MLacCsVctyRoFP0qF9kqIEUqWYXtayTQcORKByRkaemUqWj7kEFAsMqdJ3rK5UCI9/Mf Kdyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=1YJ+RtqVX6NTg+A7ppYudG/ffkLFh3I1PgafXkWeMF8=; b=JEPoZDf2M/ASlAixZqbT3Xn1gxz1e2upvx6ehFPUpF/9RdD3bGS1IRlEGwrRrLW3Ep 8nBLxfFLgipL+EDz6ZeZuqlw0wi/suLYeQsALWbIYpgq8jGImTBs5KihyxBNNyhNHzdn 6IvCeY0kPJhCufgdsRy7morWIQD1eSjTtUvixreWbN9Dpvyf2ddbaSD2FQtGx/m6osiN MOYF1iswZBQSthOiCyYR6KiggiGrMYSGs6vAyUmSIBeuGx+/UMMaxCO67AmNRmjD1lRW IE0/bddh034mP0RYxFWpYXgx0Nf7oM5+GzEeX0pgJrq2TGSSRVs1g6zGCO61BgsySGoH FbmQ== X-Gm-Message-State: AOAM5311Pkp/Y6ySqcVBHGJ7J3DDKkvzDK723E0o+GTz8N38u6imB7PJ aeMiAB8lTeClnT8uzcEsPBPwrg== X-Google-Smtp-Source: ABdhPJyFK3vVb861IXCohuRhAvMWaNsGeKNuUhmM+S2ptazCbAMAmyJX5Vq9pzJxNglINrhB2ozM7w== X-Received: by 2002:a17:902:ed97:b029:ee:af8e:3a0a with SMTP id e23-20020a170902ed97b02900eeaf8e3a0amr145924plj.52.1621259899879; Mon, 17 May 2021 06:58:19 -0700 (PDT) Original-Received: from raman-glaptop.localdomain (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id t11sm3938252pfq.181.2021.05.17.06.58.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 06:58:18 -0700 (PDT) Original-Received: by raman-glaptop.localdomain (Postfix, from userid 13930) id CE83EC20DD2; Mon, 17 May 2021 06:58:17 -0700 (PDT) In-Reply-To: <83y2cducdp.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 17 May 2021 09:01:54 +0300") Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=raman@google.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269405 Archived-At: Eli Zaretskii writes: All of the spurious warnings I'm seeing dont appear in batch compilation with batch-byte-compile. Here is the file on Github: https://github.com/tvraman/emacspeak/blob/master/lisp/emacspeak-preamble.el= #L91 Separately: when I batch-byte-compile emacspeak, I pass in commandline flags that loads emacspeak-loaddefs.el (analogous to Emacs' own loaddefs.el) is it possible to batch-native-compile (that function does exist) but I have no idea where the generated files end up ie if they go somewhere different than when generated from a running Emacs. >> From: "T.V Raman" >> Date: Sun, 16 May 2021 13:51:02 -0700 (PDT) >>=20 >> Here is an example. >>=20 >> eak/lisp/emacspeak-preamble.el: Error: Symbol's value as variable is >> void emacspeak-user-directory Disable showing Disable logging >> The above file contains this innocent looking defvar: >> (defvar emacspeak-user-directory (expand-file-name "~/.emacspeak/") >> "Emacspeak resources, e.g. pronunciation dicts.") >>=20 >> The only library it has required at that point is cl-lib >>=20 >> In the running emacs, the variable emacspeak-user-directory has the >> expected value: >> "/home/raman/.emacspeak/" >>=20 >> So why the warning above? > > How can we know without seeing the Lisp source file(s) relevant to > this compilation? The answer is somewhere in those files. > > In general, native-compilation runs in a separate process that doesn't > inherit the environment and loaded packages of your interactive > session, so it is more sensitive to problems than when you > byte-compile the same source from your interactive session. In > particular, the Emacs sub-process that runs native-compilation is run > in the batch mode, which doesn't load your init files. > > So you could try byte-compiling the same file from the shell prompt in > batch mode, as an approximation to what native-compilation does; any > warning or error you see in this batch byte-compilation will also > happen in the async native-compilation. --=20 Thanks, --Raman =817=A94 Id: kg:/m/0285kf1 =950=DC8