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 09:12:05 -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="8577"; 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 18:39:14 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 1ligGv-000224-JB for ged-emacs-devel@m.gmane-mx.org; Mon, 17 May 2021 18:39:13 +0200 Original-Received: from localhost ([::1]:45434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligGu-0006Q5-0z for ged-emacs-devel@m.gmane-mx.org; Mon, 17 May 2021 12:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifqm-0002es-W5 for emacs-devel@gnu.org; Mon, 17 May 2021 12:12:14 -0400 Original-Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:33317) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifqk-000736-9r for emacs-devel@gnu.org; Mon, 17 May 2021 12:12:12 -0400 Original-Received: by mail-pl1-x62a.google.com with SMTP id b21so3445550plz.0 for ; Mon, 17 May 2021 09:12:09 -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=5reQDC4wm/cOk7HUkUwJb9YO8Lua1MWUhL+HXzulxnw=; b=uqnHVL1PfE74gy2Z15/7jW+p73o9ZXQAChjpHVho8DNIUuMoFMZ5a4610f7QiT4adu exBjcmCn4pe7/mbLQ2NykqF/vmALWgZhPoflD/DLoydZwul79/UdP2sSVQ81MDCaoapi Ryk7+ie4wZOyicITTIa3jzh9I0FAB0TDlfz15Ysz2Xzey8deMvrbaJBok3Txl3gMZGef v6P0mPFKE59VdL8fZ0grb/Tc6fPQkn1UPgDaNA/iDyWuUOrILjok286Yf/6EbTwUfyxB 0jFFAN9CrUu+Gr5MdageYw9bflgoto8EoBz+bCYB6zuL0Ownbd8FyTFMrTmQV+oJdJTE r/hQ== 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=5reQDC4wm/cOk7HUkUwJb9YO8Lua1MWUhL+HXzulxnw=; b=hiivS6yc1HLCVNVvMZikTRKdQQJxWTGjI7biE45nyU1uz8pim4uZ+HlxC4gUIQuZRU kY1ZBLr/qwd20HE5dDhdm2IsPWS1IlVRpsYlffJWWRYNZ6/EhlnW5s8RKMMeozszc0pO uef1NrC0WrzYMyjFAovCoce2X7cxGYnPr2jR6M3auAzF3G5klhO58Gdj1DLRR7Ye8J46 3b12gO7Hy2u3rrH6f41qa2OkY+mB1ni5fiyT5JKFPu9gyMcNz9bezJRFLD0VmFpWmD62 AFdQ77xKN8PXZZP1GoRqqfEVRlppa3kF5KXu6rPD79OUL3JzIBNQ3K0ywauZzioM0HKs Gq9A== X-Gm-Message-State: AOAM5309sSghJNTdYdLObGoREmao+/SZ4Qlft/K3Fp/RJWKUR3DXIJtH j1Upqyg8txY4JnlRoTNXq1lYGg== X-Google-Smtp-Source: ABdhPJxnQFs4pTmBjO4Q4TCk5WZNF8G9+XNiM1QAfRoe4+IDeLYEdw6SiliWf+gvwEmsCtThxuqKOg== X-Received: by 2002:a17:903:20cc:b029:f0:cc11:51c2 with SMTP id i12-20020a17090320ccb02900f0cc1151c2mr810079plb.32.1621267927526; Mon, 17 May 2021 09:12:07 -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 s14sm11389783pjp.16.2021.05.17.09.12.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:12:06 -0700 (PDT) Original-Received: by raman-glaptop.localdomain (Postfix, from userid 13930) id C83E2C21098; Mon, 17 May 2021 09:12:05 -0700 (PDT) In-Reply-To: (T. V. Raman's message of "Mon, 17 May 2021 06:58:17 -0700") Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=raman@google.com; helo=mail-pl1-x62a.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=ham 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:269413 Archived-At: "T.V Raman" writes: So I created myself a simple shell script to batch-native-compile all of=20 emacspeak --- installed that in a separate git worktree and did the build -- no warnings. Before I did this, I cleaned out eln-cache since earlier I found multiple versions of the .eln files there and I wanted to make sure it was loading the newest. Though there were no warnings during the batch compile, the warnings still show up when Emacs is restarted. Here is the build file I used to native compile all of Emacspeak. #!/bin/sh EMACS=3D/home/raman/sourceforge/emacs/src/emacs make clean make config EMACS=3D$EMACS make EMACS=3D$EMACS COMPILE=3D"-f batch-native-compile" cd lisp && make EMACS=3D$EMACS COMPILE=3D"-f batch-native-compile" muggles = --no-print-directory make EMACS=3D$EMACS COMPILE=3D"-f batch-native-compile" extra-muggles --no-= print-directory > 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