unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Weird build problem
@ 2004-09-11  4:24 Paul Pogonyshev
  2004-09-11 16:59 ` Paul Pogonyshev
  2004-09-13 23:04 ` Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Pogonyshev @ 2004-09-11  4:24 UTC (permalink / raw)


Hi.

I stumble into this problem when building Emacs (when
`bootstrap-emacs' is run for the first time from `lisp/'):

	Cannot open load file: cl-macs

I think I tracked it down.  This (might) be because the
loop that adds subdirectories to load path uses `dolist'
macro, which is defined in `cl-macs.el', which (at the
time the loop is evaluated) is not in the load path.
Phew... ;)

Here is the code that (might) be the cause of the problem
(in `lisp/startup.el', `normal-top-level'):

    ;; Look in each dir in load-path for a subdirs.el file.
    ;; If we find one, load it, which will add the appropriate subdirs
    ;; of that dir into load-path,
    ;; Look for a leim-list.el file too.  Loading it will register
    ;; available input methods.
    (dolist (dir load-path)
      (let ((default-directory dir))
	(load (expand-file-name "subdirs.el") t t t))
      (let ((default-directory dir))
	(load (expand-file-name "leim-list.el") t t t)))

Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Weird build problem
  2004-09-11  4:24 Weird build problem Paul Pogonyshev
@ 2004-09-11 16:59 ` Paul Pogonyshev
  2004-09-13 23:04 ` Richard Stallman
  1 sibling, 0 replies; 6+ messages in thread
From: Paul Pogonyshev @ 2004-09-11 16:59 UTC (permalink / raw)


I wrote:

> I stumble into this problem when building Emacs (when
> `bootstrap-emacs' is run for the first time from `lisp/'):
>
> 	Cannot open load file: cl-macs

So, here is `make' and `gdb' output that shows the problem.



[paul 14:51:47 emacs]$ ./configure --with-x

--- Emacs configures just fine ---



[paul 14:52:13 emacs]$ make CFLAGS='-g' -s bootstrap
Loading loadup.el (source)...
Using load-path (/home/paul/emacs/lisp /home/paul/emacs/lisp/emacs-lisp /home/paul/emacs/lisp/language /home/paul/emacs/lisp/international /home/paul/emacs/lisp/textmodes)
Loading emacs-lisp/byte-run...
Loading emacs-lisp/backquote...
Loading subr...
Loading version.el (source)...
Loading widget (source)...
Loading custom...
Loading emacs-lisp/map-ynp...
Loading env...
Loading cus-start...
Loading international/mule (source)...
Loading international/mule-conf.el (source)...
Loading format...
Loading bindings...
Loading files...
Loading cus-face...
Loading faces...
Lists of integers (garbage collection statistics) are normal output
while building Emacs; they do not indicate a problem.
((20198 . 3819) (4241 . 4) (539 . 0) 121236 27516 (10 . 1) (17 . 0) (4730 . 499))
Loading loaddefs.el (source)...
((40999 . 3612) (6806 . 0) (548 . 5) 948670 27550 (36 . 33) (17 . 0) (12428 . 46))
Loading simple (source)...
Loading help (source)...
Loading international/mule-cmds (source)...
Loading case-table...
Loading international/utf-8 (source)...
Loading international/utf-16 (source)...
Loading international/characters (source)...
Loading international/latin-1 (source)...
Loading international/latin-2 (source)...
Loading international/latin-3 (source)...
Loading international/latin-4 (source)...
Loading international/latin-5 (source)...
Loading international/latin-8 (source)...
Loading international/latin-9 (source)...
Loading language/chinese (source)...
Loading language/cyrillic (source)...
Loading language/indian (source)...
Loading language/devanagari (source)...
Loading language/malayalam (source)...
Loading language/tamil (source)...
Loading language/kannada (source)...
Loading language/english (source)...
Loading language/ethiopic (source)...
Loading language/european (source)...
Loading language/czech (source)...
Loading language/slovak (source)...
Loading language/romanian (source)...
Loading language/greek (source)...
Loading language/hebrew (source)...
Loading language/japanese (source)...
Loading language/korean (source)...
Loading language/lao (source)...
Loading language/thai (source)...
Loading language/tibetan (source)...
Loading language/vietnamese (source)...
Loading language/misc-lang (source)...
Loading language/utf-8-lang (source)...
Loading language/georgian (source)...
Loading international/ucs-tables (source)...
Loading indent (source)...
Loading window (source)...
Loading frame...
Loading term/tty-colors (source)...
Loading font-core...
Loading facemenu...
Loading mouse (source)...
Loading scroll-bar (source)...
Loading select (source)...
Loading emacs-lisp/timer...
Loading isearch (source)...
((112521 . 10215) (9763 . 0) (566 . 151) 1220883 232105 (56 . 13) (17 . 43) (19594 . 377))
Loading menu-bar (source)...
Loading paths.el (source)...
Loading startup (source)...
Loading emacs-lisp/lisp...
Loading textmodes/page (source)...
Loading register (source)...
Loading textmodes/paragraphs (source)...
Loading emacs-lisp/lisp-mode...
Loading textmodes/text-mode (source)...
Loading textmodes/fill (source)...
((132897 . 5185) (10407 . 1) (571 . 146) 1298249 235244 (58 . 11) (17 . 43) (21775 . 653))
Loading replace (source)...
Loading abbrev...
Loading buff-menu...
Loading emacs-lisp/float-sup...
((137675 . 1710) (10616 . 1) (572 . 145) 1323037 236596 (64 . 5) (17 . 43) (22287 . 204))
Loading vc-hooks (source)...
Loading ediff-hook...
((142552 . 2320) (10990 . 8) (573 . 144) 1333593 236915 (64 . 5) (17 . 43) (22817 . 304))
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under names emacs and emacs-21.3.50
73324 pure bytes used
Directories: /home/paul/emacs/lisp/. /home/paul/emacs/lisp/./calc /home/paul/emacs/lisp/./gnus /home/paul/emacs/lisp/./textmodes /home/paul/emacs/lisp/./progmodes /home/paul/emacs/lisp/./calendar /home/paul/emacs/lisp/./emacs-lisp /home/paul/emacs/lisp/./emulation /home/paul/emacs/lisp/./eshell /home/paul/emacs/lisp/./international /home/paul/emacs/lisp/./language /home/paul/emacs/lisp/./mail /home/paul/emacs/lisp/./mh-e /home/paul/emacs/lisp/./net /home/paul/emacs/lisp/./obsolete /home/paul/emacs/lisp/./play /home/paul/emacs/lisp/./term /home/paul/emacs/lisp/./toolbar /home/paul/emacs/lisp/./url
Cannot open load file: cl-macs
make[1]: *** [autoloads] Error 255
make: *** [bootstrap] Error 2



[paul 14:53:16 emacs]$ cd src
[paul 14:53:32 src]$ EMACSLOADPATH=/home/paul/emacs/lisp ./bootstrap-emacs --batch
Cannot open load file: cl-macs
[paul 14:54:30 src]$ EMACSLOADPATH=/home/paul/emacs/lisp:/home/paul/emacs/lisp/emacs-lisp ./bootstrap-emacs --batch

--- Note that when `emacs-lisp' is added to load path, everything works ---



[paul 14:55:22 src]$ EMACSLOADPATH=/home/paul/emacs/lisp gdb --args ./bootstrap-emacs --batch
GNU gdb Red Hat Linux (5.2.1-4)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
DISPLAY = :0
TERM = xterm
Breakpoint 1 at 0x8108c4c: file emacs.c, line 428.
Breakpoint 2 at 0x80e4895: file xterm.c, line 7839.
(gdb) b Fload
Breakpoint 3 at 0x819f0ad: file lread.c, line 673.
(gdb) r
Starting program: /home/paul/emacs/src/bootstrap-emacs -geometry 80x40+0+0

Breakpoint 3, Fload (file=143542739, noerror=138610609, nomessage=138610609, nosuffix=138610609, must_suffix=138610657)
    at lread.c:673
673       register int fd = -1;
(gdb) c
Continuing.
Cannot open load file: cl-macs

--- Note that Emacs fails on the first invocation of Fload() ---

Program exited with code 0377.
(gdb) r
Starting program: /home/paul/emacs/src/bootstrap-emacs -geometry 80x40+0+0

Breakpoint 3, Fload (file=143542739, noerror=138610609, nomessage=138610609, nosuffix=138610609, must_suffix=138610657)
    at lread.c:673
673       register int fd = -1;
(gdb) call debug_print (file)
"cl-macs"
(gdb) ret
Make Fload return now? (y or n) y
#0  0x08186973 in do_autoload (fundef=143600445, funname=138863417) at eval.c:1936
1936      Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil, Qt);
(gdb) call debug_print (fundef)
(autoload "cl-macs" nil nil t)
(gdb) ret
Make do_autoload return now? (y or n) y
#0  0x081870e1 in Feval (form=143243477) at eval.c:2143
2143              do_autoload (fun, original_fun);
(gdb) call debug_print (form)
(dolist (dir load-path) (let ((default-directory dir)) (load (expand-file-name "subdirs.el") t t t)) (let ((default-directory dir)) (load (expand-file-name "leim-list.el") t t t)))

--- This is the form in `startup.el' I mentioned in the previous message ---

(gdb) The program is running.  Exit anyway? (y or n) y

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Weird build problem
  2004-09-11  4:24 Weird build problem Paul Pogonyshev
  2004-09-11 16:59 ` Paul Pogonyshev
@ 2004-09-13 23:04 ` Richard Stallman
  2004-09-14 20:53   ` Paul Pogonyshev
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2004-09-13 23:04 UTC (permalink / raw)
  Cc: emacs-devel

    I think I tracked it down.  This (might) be because the
    loop that adds subdirectories to load path uses `dolist'
    macro, which is defined in `cl-macs.el', which (at the
    time the loop is evaluated) is not in the load path.
    Phew... ;)

Why doesn't it get the dolist macro from subr.el?
That is what it is supposed to get.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Weird build problem
  2004-09-13 23:04 ` Richard Stallman
@ 2004-09-14 20:53   ` Paul Pogonyshev
  2004-09-15 15:43     ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Pogonyshev @ 2004-09-14 20:53 UTC (permalink / raw)
  Cc: emacs-devel


>     I think I tracked it down.  This (might) be because the
>     loop that adds subdirectories to load path uses `dolist'
>     macro, which is defined in `cl-macs.el', which (at the
>     time the loop is evaluated) is not in the load path.
>     Phew... ;)
>
> Why doesn't it get the dolist macro from subr.el?
> That is what it is supposed to get.

No idea.  In any case I managed to compile Emacs by editing
`EMACSLOADPATH' in `lisp/Makefile'.  After I have installed
the first version, it compiles fine even without that (i.e.
I can run `configure' and then compile).

Before I only had Emacs 21.2 (from Red Hat 8.0 distribution)
installed.  Not sure if this matters.

Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Weird build problem
  2004-09-14 20:53   ` Paul Pogonyshev
@ 2004-09-15 15:43     ` Richard Stallman
  2004-09-15 23:17       ` Paul Pogonyshev
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2004-09-15 15:43 UTC (permalink / raw)
  Cc: emacs-devel

    > Why doesn't it get the dolist macro from subr.el?
    > That is what it is supposed to get.

    No idea.

Can you investigate why not?  Without that, we won't understand the
problem.

      In any case I managed to compile Emacs by editing
    `EMACSLOADPATH' in `lisp/Makefile'.

What precisely was the change you made?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Weird build problem
  2004-09-15 15:43     ` Richard Stallman
@ 2004-09-15 23:17       ` Paul Pogonyshev
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Pogonyshev @ 2004-09-15 23:17 UTC (permalink / raw)
  Cc: emacs-devel


>     > Why doesn't it get the dolist macro from subr.el?
>     > That is what it is supposed to get.
>
>     No idea.
>
> Can you investigate why not?  Without that, we won't understand the
> problem.

I tried, but I cannot reproduce the problems now.

>       In any case I managed to compile Emacs by editing
>     `EMACSLOADPATH' in `lisp/Makefile'.
>
> What precisely was the change you made?

Patch (reconstructed by memory) is below.  Not sure if it
is useful though, as I don't know under which conditions
the problem occurs.

Paul


--- Makefile.in	11 Jun 2004 00:39:50 -0200	1.56
+++ Makefile.in	15 Sep 2004 21:16:14 -0200	
@@ -132,7 +132,7 @@ COMPILE_FIRST = \
 
 # The actual Emacs command run in the targets below.
 
-emacs = EMACSLOADPATH=$(lisp) $(EMACS) $(EMACSOPT)
+emacs = EMACSLOADPATH="$(lisp):$(lisp)/emacs-lisp" $(EMACS) $(EMACSOPT)
 
 # Common command to find subdirectories
 
@@ -157,12 +157,12 @@ $(lisp)/cus-load.el:
 custom-deps: $(lisp)/cus-load.el doit
 	wd=$(lisp); $(setwins_almost); \
 	echo Directories: $$wins; \
-	$(EMACS) $(EMACSOPT) -l cus-dep --eval '(setq generated-custom-dependencies-file "$(lisp)/cus-load.el")' -f custom-make-dependencies $$wins
+	$(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file "$(lisp)/cus-load.el")' -f custom-make-dependencies $$wins
 
 finder-data: doit
 	wd=$(lisp); $(setwins_almost); \
 	echo Directories: $$wins; \
-	$(EMACS) $(EMACSOPT) -l finder --eval '(setq generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
+	$(emasc) -l finder --eval '(setq generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
 
 $(lisp)/loaddefs.el:
 	echo ";;; loaddefs.el --- automatically extracted autoloads" >> $@
@@ -177,7 +177,7 @@ $(lisp)/loaddefs.el:
 autoloads: $(lisp)/loaddefs.el doit
 	wd=$(lisp); $(setwins); \
 	echo Directories: $$wins; \
-	$(EMACS) $(EMACSOPT) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
+	$(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
 
 $(lisp)/subdirs.el:
 	$(MAKE) $(MFLAGS) update-subdirs
@@ -281,7 +281,7 @@ compile-after-backup: backup-compiled-fi
 # .elc is present.
 
 recompile: doit $(lisp)/progmodes/cc-mode.elc
-	$(EMACS) $(EMACSOPT) --eval "(batch-byte-recompile-directory 0)" $(lisp)
+	$(emacs) --eval "(batch-byte-recompile-directory 0)" $(lisp)
 
 # CC Mode uses a compile time macro system which causes a compile time
 # dependency in cc-mode.elc on the macros in cc-langs.el and the
@@ -290,7 +290,7 @@ $(lisp)/progmodes/cc-mode.elc: \
 	$(lisp)/progmodes/cc-mode.el \
 	$(lisp)/progmodes/cc-langs.el \
 	$(lisp)/progmodes/cc-defs.el
-	$(EMACS) $(EMACSOPT) -f batch-byte-compile $(lisp)/progmodes/cc-mode.el
+	$(emacs) -f batch-byte-compile $(lisp)/progmodes/cc-mode.el
 
 # Prepare a bootstrap in the lisp subdirectory.
 #

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-09-15 23:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-11  4:24 Weird build problem Paul Pogonyshev
2004-09-11 16:59 ` Paul Pogonyshev
2004-09-13 23:04 ` Richard Stallman
2004-09-14 20:53   ` Paul Pogonyshev
2004-09-15 15:43     ` Richard Stallman
2004-09-15 23:17       ` Paul Pogonyshev

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).