From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: bootstrap fails AND how about fixing the byte-compiler? Date: Wed, 16 Jan 2008 00:13:56 +0000 Message-ID: <20080116001356.GA3081@muc.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1200441937 7861 80.91.229.12 (16 Jan 2008 00:05:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jan 2008 00:05:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Katsumi Yamaoka , David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 16 01:05:57 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JEvmo-00065Z-Ft for ged-emacs-devel@m.gmane.org; Wed, 16 Jan 2008 01:05:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEvmP-000774-Tr for ged-emacs-devel@m.gmane.org; Tue, 15 Jan 2008 19:05:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEvl8-0005qb-7Q for emacs-devel@gnu.org; Tue, 15 Jan 2008 19:03:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEvl7-0005px-Ds for emacs-devel@gnu.org; Tue, 15 Jan 2008 19:03:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEvl7-0005pm-53 for emacs-devel@gnu.org; Tue, 15 Jan 2008 19:03:57 -0500 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JEvl6-00036p-Mq for emacs-devel@gnu.org; Tue, 15 Jan 2008 19:03:57 -0500 Original-Received: (qmail 28413 invoked by uid 3782); 16 Jan 2008 00:03:54 -0000 Original-Received: from acm.muc.de (p57AF5E0C.dip.t-dialin.net [87.175.94.12]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 16 Jan 2008 01:03:51 +0100 Original-Received: (qmail 24318 invoked by uid 1000); 16 Jan 2008 00:13:57 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:86945 Archived-At: Hi, David and Katsumi! On Tue, Jan 15, 2008 at 09:03:19AM +0900, Katsumi Yamaoka wrote: > >>>>> Alan Mackenzie wrote: > > Log message: > > * progmodes/cc-vars.el (c-constant-symbol): New function which supersedes > > c-const-symbol. During a customize-.. call it enables an element of > > (e.g.) c-hanging-braces alist to have its name displayed, even when the > > default value of c-h-b etc. doesn't include the elemnt. Replace uses of > > the old function by the new. > By this change Emacs bootstrap fails. The `c-constant-symbol' > function seems to have to be surrounded by `eval-and-compile'. > Regards, [David wrote basically the same in a separate post, to which I'm responding here.] Sorry about the hassle in cc-vars.el. I'm assuming that it's the trunk (not the Emacs-22 branch) where people have been having trouble. OK, I can't reproduce this right at the moment. I haven't built Emacs for some time, and I'm in bootstrap-hell - it keeps telling me that such-and-such a function/variable isn't defined, and I'm going through knocking them out one by one. On doing % ./configure --with-gif=no --with-tiff=no % time make bootstrap , the latest error message I've get is: Symbol's value as variable is void: input-decode-map It would be really nice if this process just worked, and carried on working (yeah I know, I'm one of the people who's broken it ;-). It never seems to work for me, first time round, especially if I haven't built Emacs for some time. make bootstrap _is_ supposed to work from raw source, regardless of whatever rubbish is cluttering up the file tree, isn't it? Anyhow, back to cc-vars.el: I can reproduce the problem with: % emacs -Q -batch -f batch-byte-compile cc-vars.el c-constant-symbol is defun'd at cc-vars.el L77. It is used inside a backquote expression like this: `( ..... ,(c-constant-symbol elt 20) ..). It seems ludicrous that the byte-compiler needs an `eval-and-compile' round the (defun c-constant-symbol ...) form. I detest cluttering up source code. Is there any good reason for the b-c not to maintain an obarray of its own symbols during compilation? Surely, the byte compiler should be able to compile anything that eval-buffer can? Anyhow, it seems the best solution for cc-vars.el right now (after all, it's got to work with Emacs 2[01] and various flavours of XEmacs, too), is to change c-constant-symbol into a macro. [ 2 hours later. ] No, macros don't seem to be recorded in the symbol table during byte compilation either. Doubleplus Ungood. So it looks like it'll have to be eval-and-compile after all. YUCK!!! I've committed this fix in the trunk. I'll do the same in the Emacs-22 branch later. Cheers! -- Alan Mackenzie (Nuremberg, Germany).