Ar an cúigiú lá is fiche de mí Iúil, scríobh Stephen J. Turnbull:
Mats Lidell writes:
> might not be installed, but... It is the byte compilations that
> fails. Shouldn't the byte compiler do its job regardless of what
> features the xemacs-binary is configured with and regardless of what
> OS environment there is as long as the package tree is installed so
> that all elips-files are available?
No. "eval-when-compile" means that code can be run at compile time.
In particular, x-symbol is trying to make X bitmap glyphs on a no-X
build, inside an eval-when-compile (see x-symbol-vars.el).
Try evaluating
(canonicalize-spec-list `(((x) . [xbm :data (6 20 ,(make-string 20 0))])
((mswindows)
. [xbm :data (6 20 ,(make-string 20 0))])
((tty) . [string :data " "]))
'image)
in your 21.5 build.
This
(make-glyph `(((mswindows) . [bmp :data (6 20 ,(make-string 20 0))])
((tty) . [string :data " "])))
gives me "Invalid specifier locale (mswindows)" in my Linux build.
I get exactly the same on Cygwin with mswindows support; that error is
misleading, you also get it if your instantiator syntax is incorrect, as
happens to be the case here. This syntax works, though, and also doesn’t
provoke any complaints on FreeBSD:
(make-glyph `(((mswindows) . [xbm :data (6 20 ,(make-string 20 0))])
((tty) . [string :data " "])))
On FreeBSD, when I build without X11 support, I can provoke the error that
is blocking the build on evaluating the code in x-symbol-vars.el. Mats, I
suspect, but haven’t confirmed, that the following will allow the build to
continue, I can certainly evaluate it without problems:
--- x-symbol-vars.el~ 2010-07-25 17:58:39.000000000 +0100
+++ x-symbol-vars.el 2010-07-25 17:53:53.000000000 +0100
@@ -1099,7 +1099,8 @@
:group 'x-symbol-input-init)
(defvar x-symbol-heading-strut-glyph
- (make-glyph (eval-when-compile
+ (make-glyph (remove-if-not
+ #'(lambda (spec) (valid-instantiator-p (cdr spec) 'image))
`(((x) . [xbm :data (6 20 ,(make-string 20 0))])
((mswindows) . [xbm :data (6 20 ,(make-string 20 0))])
((tty) . [string :data " "]))))
We also really should apply something like the following in specifier.el,
which would have made the whole thing a lot easier to debug (misleading
error messages never make anything easy):
diff -r f3eca926258e lisp/specifier.el
--- a/lisp/specifier.el Sat Jul 24 17:38:35 2010 +0100
+++ b/lisp/specifier.el Sun Jul 25 18:30:02 2010 +0100
@@ -105,13 +105,16 @@
;; this will signal an appropriate error.
(check-valid-instantiator inst-pair specifier-type)))
- ((and (valid-specifier-tag-p (car inst-pair))
- (valid-instantiator-p (cdr inst-pair) specifier-type))
+ ((not (valid-instantiator-p (cdr inst-pair) specifier-type))
+ (if noerror
+ t
+ (check-valid-instantiator (cdr inst-pair) specifier-type)))
+
+ ((valid-specifier-tag-p (car inst-pair))
;; case (b)
(cons (list (car inst-pair)) (cdr inst-pair)))
- ((and (valid-specifier-tag-set-p (car inst-pair))
- (valid-instantiator-p (cdr inst-pair) specifier-type))
+ ((valid-specifier-tag-set-p (car inst-pair))
;; case (c)
inst-pair)
@@ -199,9 +202,12 @@
(if (not (valid-specifier-locale-p (car spec)))
;; invalid locale.
- (if noerror t
- (signal 'error (list "Invalid specifier locale" (car spec))))
-
+ (if noerror
+ t
+ (if (consp (car spec))
+ ;; If it's a cons, they're probably not passing a locale.
+ (error 'invalid-argument "Not a valid instantiator list" spec)
+ (error 'invalid-argument "Invalid specifier locale" (car spec))))
;; case (b)
(let ((result (canonicalize-inst-list (cdr spec) specifier-type
noerror)))
So it seems that glyph is actually tried to be instantiated, but why
this
doesn't work I'm not sure. My guess is that the thing to do for now is to
remove the eval-when-compile from the make-glyph call in
x-symbol-vars.el, although that code probably should work.
That eval-when-compile doesn’t come into it; because a top-level (require
'x-symbol-vars) is in x-symbol.el, and because top-level #'require has an
implicit surrounding (eval-when-compile ...), x-symbol-vars.el gets loaded
at compile time, and the top-level code there gets run.
The 21.4 build isn't failing in the byte compiler. The event
loop is
somehow broken. It's trying to get events from a file descriptor that
claims to be a console (ie, a tty) but it somehow isn't. See l. 147
of src/event-tty.c.
I'm not sure why this would happen. You could try putting
if (!c) fprintf (stderr, "failing on FD #%d", i);
before the assert on l. 147 and see which FD is causing problems.
I’ve no real idea what’s happening with this, though.
--
“Apart from the nine-banded armadillo, man is the only natural host of
Mycobacterium leprae, although it can be grown in the footpads of mice.”
-- Kumar & Clark, Clinical Medicine, summarising improbable leprosy research
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/mailman/listinfo/xemacs-beta