I got my firewall back online (new power supply) and I can do useful
work on my home machine again.
It may not be your compiler.h patches, Jerry - it's been about 10 days
since I've built 21.5 on this platform, but I can no longer build on
my linux box with this config:
Here's what happens:
./temacs -nd -no-packages -batch -l
/opt/src/xemacs-21.5-2003-10-14/src/../lisp/update-elc.el
Loading /opt/src/xemacs-21.5-2003-10-14/src/../lisp/update-elc.el...
Loading find-paths.el...
Loading packages.el...
Loading setup-paths.el...
Loading /opt/src/xemacs-21.5-2003-10-14/lisp/dumped-lisp.el...
Wrote /opt/build/xemacs-21.5-2003-10-14/src/NEEDTODUMP
Loading loadup-el.el...
Loading loadup.el...
Using load-path (/opt/src/xemacs-21.5-2003-10-14/lisp/)
Using module-load-path (/opt/build/xemacs-21.5-2003-10-14/modules)
Loading dumped-lisp.el...
Loading backquote.el...
Loading bytecomp-runtime.el...
Loading find-paths.el...
Loading packages.el...
Loading setup-paths.el...
Loading subr.el...
Loading post-gc.el...
Loading replace.el...
Loading version.el...
Loading cl.el...
Loading cl-extra.el...
Requiring obsolete.el...
Loading cl-seq.el...
Loading widget.el...
Loading custom.el...
Loading cl-macs.el...
Requiring cus-face.el...
Requiring font.el...
Requiring disp-table.el...
Loading cus-start.el...
Loading cmdloop.el...
Loading keymap.el...
Loading syntax.el...
Loading device.el...
Loading console.el...
Loading obsolete.el...
Loading specifier.el...
Loading frame.el...
Loading x-faces.el...
Loading faces.el...
Loading glyphs.el...
Loading objects.el...
Loading extents.el...
Loading events.el...
Loading hash-table.el...
Loading text-props.el...
Loading process.el...
Loading multicast.el...
Loading map-ynp.el...
Loading undo-stack.el...
Loading window.el...
Loading window-xemacs.el...
Loading simple.el...
Loading newcomment.el...
Loading keydefs.el...
Loading abbrev.el...
Loading derived.el...
Loading minibuf.el...
Loading list-mode.el...
Loading modeline.el...
Loading cus-file.el...
Loading startup.el...
Loading misc.el...
Loading help.el...
Requiring help-macro.el...
Loading files.el...
Loading lib-complete.el...
Loading format.el...
Loading indent.el...
Loading isearch-mode.el...
Loading buffer.el...
Loading buff-menu.el...
Loading paths.el...
Loading lisp.el...
Loading page.el...
Loading register.el...
Loading iso8859-1.el...
Loading paragraphs.el...
Loading easymenu.el...
Loading lisp-mode.el...
Loading text-mode.el...
Loading fill.el...
Loading auto-save.el...
Loading movemail.el...
Loading float-sup.el...
Loading itimer.el...
Loading itimer-autosave.el...
Loading printer.el...
Loading behavior.el...
Loading behavior-defs.el...
Loading diagnose.el...
Loading gui.el...
Loading mouse.el...
Loading mode-motion.el...
Loading toolbar.el...
Loading scrollbar.el...
Loading menubar.el...
Loading gutter.el...
Loading select.el...
Loading menubar-items.el...
Loading gutter-items.el...
Loading toolbar-items.el...
Loading coding.el...
Loading code-files.el...
Loading code-process.el...
Loading code-cmds.el...
Loading unicode.el...
Loading code-init.el...
Loading x-scrollbar.el...
Loading x-iso8859-1.el...
Loading x-mouse.el...
Loading x-select.el...
Loading x-misc.el...
Loading x-init.el...
Loading x-win-sun.el...
Loading x-win-xfree86.el...
Loading x-win-xfree86.el...
Loading x-win-sun.el...
Loading tty-init.el...
Loading fontl-hooks.el...
Loading auto-show.el...
Loading resize-minibuffer.el...
Loading loadhist.el...
Loading loaddefs.el...
Loading site-load.el...
# bind (stack-trace-on-signal debug-on-signal stack-trace-on-error debug-on-error)
# (unwind-protect ...)
(and (not nosuffix) module-extensions)
(locate-file filename module-load-path (and (not nosuffix) module-extensions))
(and (> (length filename) 0) (locate-file filename module-load-path (and (not
nosuffix) module-extensions)))
(if (and (> (length filename) 0) (locate-file filename module-load-path (and (not
nosuffix) module-extensions))) (if (featurep (quote modules)) (let ((load-modules-quietly
nomessage)) (declare-fboundp (load-module filename))) (signal (quote file-error) (quote
("This XEmacs does not support modules")))) (and (null noerror) (signal (quote
file-error) (list "Cannot open load file" filename))))
(if (and (> (length filename) 0) (setq path (locate-file filename load-path (and (not
nosuffix) (quote (".elc" ".el" "")))))) (load-internal file
noerror nomessage nosuffix (let ((elc (equalp ".elc" (substring path -4)))) (or
(and (not elc) coding-system-for-read) (let ((codesys
(find-coding-system-magic-cookie-in-file path))) (when codesys (setq codesys (intern
codesys)) (if (find-coding-system codesys) codesys))) (if elc (quote binary) (or
(find-file-coding-system-for-read-from-filename path)
buffer-file-coding-system-for-read))))) (if (and (> (length filename) 0) (locate-file
filename module-load-path (and (not nosuffix) module-extensions))) (if (featurep (quote
modules)) (let ((load-modules-quietly nomessage)) (declare-fboundp (load-module
filename))) (signal (quote file-error) (quote ("This XEmacs does not support
modules")))) (and (null noerror) (signal (quote file-error) (list "Cannot open
load file" filename)))))
(if handler (funcall handler (quote load) filename noerror nomessage nosuffix) (if (and
(> (length filename) 0) (setq path (locate-file filename load-path (and (not nosuffix)
(quote (".elc" ".el" "")))))) (load-internal file noerror
nomessage nosuffix (let ((elc (equalp ".elc" (substring path -4)))) (or (and
(not elc) coding-system-for-read) (let ((codesys (find-coding-system-magic-cookie-in-file
path))) (when codesys (setq codesys (intern codesys)) (if (find-coding-system codesys)
codesys))) (if elc (quote binary) (or (find-file-coding-system-for-read-from-filename
path) buffer-file-coding-system-for-read))))) (if (and (> (length filename) 0)
(locate-file filename module-load-path (and (not nosuffix) module-extensions))) (if
(featurep (quote modules)) (let ((load-modules-quietly nomessage)) (declare-fboundp
(load-module filename))) (signal (quote file-error) (quote ("This XEmacs does not
support modules")))) (and (null noerror) (signal (quote file-error) (list
"Cannot open load file" filename))))))
# bind (path handler filename)
(let* ((filename (substitute-in-file-name file)) (handler (find-file-name-handler
filename (quote load))) (path nil)) (if handler (funcall handler (quote load) filename
noerror nomessage nosuffix) (if (and (> (length filename) 0) (setq path (locate-file
filename load-path (and (not nosuffix) (quote (".elc" ".el"
"")))))) (load-internal file noerror nomessage nosuffix (let ((elc (equalp
".elc" (substring path -4)))) (or (and (not elc) coding-system-for-read) (let
((codesys (find-coding-system-magic-cookie-in-file path))) (when codesys (setq codesys
(intern codesys)) (if (find-coding-system codesys) codesys))) (if elc (quote binary) (or
(find-file-coding-system-for-read-from-filename path)
buffer-file-coding-system-for-read))))) (if (and (> (length filename) 0) (locate-file
filename module-load-path (and (not nosuffix) module-extensions))) (if (featurep (quote
modules)) (let ((load-modules-quietly nomessage)) (declare-fboundp (load-module
filename))) (signal (quote file-error) (quote ("This XEmacs does not support
modules")))) (and (null noerror) (signal (quote file-error) (list "Cannot open
load file" filename)))))))
# bind (nosuffix nomessage noerror file)
load("site-init" t)
(if (stringp site-start-file) (load "site-init" t))
(when (stringp site-start-file) (load "site-init" t))
# bind (gc-cons-threshold)
(let ((gc-cons-threshold (if (and purify-flag (not (memq (quote quick-build)
internal-error-checking))) 30000 3000000))) (let ((stack-trace-on-error nil))
(call-with-condition-handler (quote really-early-error-handler) (function (lambda nil
(setq Installation-string (save-current-buffer (set-buffer (get-buffer-create
(generate-new-buffer-name " *temp*"))) (fset (quote format-decode) (function
(lambda (f l &optional v) l))) (insert-file-contents-internal (expand-file-name
"Installation" build-root)) (fmakunbound (quote format-decode)) (prog1
(buffer-substring) (kill-buffer (current-buffer))))) (setq load-path (list source-lisp))
(setq module-load-path (list (expand-file-name "modules" build-root)))
(external-debugging-output (format "\nUsing load-path %s" load-path))
(external-debugging-output (format "\nUsing module-load-path %s"
module-load-path)) (buffer-disable-undo (get-buffer "*scratch*")) (let
((temp-path (expand-file-name "." (car load-path)))) (setq load-path (nconc
(mapcar (function (lambda (i) (concat i "/"))) (directory-files temp-path t
"^[^-.]" nil (quote dirs-only))) (cons (file-name-as-directory temp-path)
load-path)))) (setq load-warn-when-source-only t) (defun pureload (file) (let ((full-path
(locate-file file load-path (if load-ignore-elc-files (quote (".el"
"")) (quote (".elc" ".el" "")))))) (if full-path
(prog1 (load full-path) (unless (memq (quote quick-build) internal-error-checking)
(garbage-collect))) (external-debugging-output (format "\nLoad file %s: not
found\n" file)) nil))) (load (expand-file-name "dumped-lisp.el"
source-lisp)) (let ((files preloaded-file-list) file) (while (setq file (car files))
(unless (pureload file) (external-debugging-output "Fatal error during load,
aborting") (kill-emacs 1)) (setq files (cdr files))) (when (not (featurep (quote
toolbar))) (defun toolbar-button-p (obj) "No toolbar support." nil) (defun
toolbar-specifier-p (obj) "No toolbar support." nil)) (fmakunbound (quote
pureload))) (packages-load-package-dumped-lisps late-package-load-path))))) (setq
preloaded-file-list (mapcar (function file-name-sans-extension) preloaded-file-list))
(setq load-warn-when-source-only nil) (setq debugger (quote debug)) (when (member
"no-site-file" command-line-args) (setq site-start-file nil)) (when (load
"site-load" t) (garbage-collect)) (when purify-flag (message "Finding
pointers to doc strings...") (Snarf-documentation "DOC") (message
"Finding pointers to doc strings...done") (Verify-documentation)) (when (stringp
site-start-file) (load "site-init" t)) (setq current-load-list nil)
(garbage-collect) (buffer-enable-undo "*scratch*"))
# bind (current-load-list)
# (unwind-protect ...)
# bind (load-file-name)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
load("loadup.el")
# bind (purify-flag load-ignore-elc-files)
(let ((load-ignore-elc-files t) (purify-flag nil)) (load "loadup.el"))
# bind (current-load-list)
# (unwind-protect ...)
# bind (load-file-name)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
load("loadup-el.el")
(cond ((and (not update-elc-files-to-compile) (not need-to-rebuild-autoloads) (not
need-to-rebuild-mule-autoloads) (not need-to-recompile-autoloads) (not
need-to-recompile-mule-autoloads))) ((not update-elc-files-to-compile) (condition-case nil
(write-region-internal "foo" nil (expand-file-name
"src/REBUILD_AUTOLOADS" build-root)) (file-error nil))) (t (let ((bc-bootstrap
(mapcar (function (lambda (arg) (concat (update-elc-chop-extension (locate-library arg))
".el"))) lisp-files-needed-for-byte-compilation)) (bootstrap-other (mapcar
(function (lambda (arg) (concat (update-elc-chop-extension (locate-library arg))
".el"))) lisp-files-needing-early-byte-compilation))) (setq inhibit-autoloads t)
(let ((recompile-bc-bootstrap (apply (function nconc) (mapcar (function (lambda (arg)
(when (member arg update-elc-files-to-compile) (append (quote ("-f"
"batch-byte-compile-one
xemacs exiting.
-file")) (list arg))))) bc-bootstrap))) (recompile-bootstrap-other (apply (function
nconc) (mapcar (function (lambda (arg) (when (member arg update-elc-files-to-compile)
(append (quote ("-f" "batch-byte-compile-one-file")) (list arg)))))
bootstrap-other)))) (mapc-internal (function (lambda (arg) (setq
update-elc-files-to-compile (delete arg update-elc-files-to-compile)))) (append
bc-bootstrap bootstrap-other)) (setq command-line-args (append (quote ("-l"
"loadup-el.el" "run-temacs" "-batch"
"-no-packages" "-no-autoloads" "-eval" "(setq
stack-trace-on-error t)" "-eval" "(setq load-always-display-messages
t)")) (when recompile-bc-bootstrap (append (quote ("-eval" "(setq
load-ignore-elc-files t)" "-l" "bytecomp"))
recompile-bc-bootstrap (quote ("-eval" "(setq load-ignore-elc-files
nil)")))) (quote ("-l" "bytecomp")) recompile-bootstrap-other
do-autoload-commands (quote ("-eval" "(setq inhibit-autoloads nil)"
"-f" "startup-load-autoloads" "-f"
"batch-byte-compile")) update-elc-files-to-compile)))) (load
"loadup-el.el")))
# bind (do-autoload-commands)
(let ((do-autoload-commands (append (if (or need-to-rebuild-autoloads
need-to-rebuild-mule-autoloads) (list "-l" "autoload")) (if
need-to-rebuild-autoloads (list "-f"
"autoload-update-directory-autoloads" "auto" source-lisp)) (if
need-to-rebuild-mule-autoloads (list "-f"
"autoload-update-directory-autoloads" "mule" source-lisp-mule)) (if
need-to-recompile-autoloads (list "-f" "batch-byte-compile-one-file"
aa-lisp)) (if need-to-recompile-mule-autoloads (list "-f"
"batch-byte-compile-one-file" aa-lisp-mule))))) (condition-case nil (delete-file
(expand-file-name "src/REBUILD_AUTOLOADS" build-root)) (file-error nil)) (cond
((and (not update-elc-files-to-compile) (not need-to-rebuild-autoloads) (not
need-to-rebuild-mule-autoloads) (not need-to-recompile-autoloads) (not
need-to-recompile-mule-autoloads))) ((not update-elc-files-to-compile) (condition-case nil
(write-region-internal "foo" nil (expand-file-name
"src/REBUILD_AUTOLOADS" build-root)) (file-error nil))) (t (let ((bc-bootstrap
(mapcar (function (lambda (arg) (concat (update-elc-chop-extension (locate-library arg))
".el"))) lisp-files-needed-for-byte-compilation)) (bootstrap-other (mapcar
(function (lambda (arg) (concat (update-elc-chop-extension (locate-library arg))
".el"))) lisp-files-needing-early-byte-compilation))) (setq inhibit-autoloads t)
(let ((recompile-bc-bootstrap (apply (function nconc) (mapcar (function (lambda (arg)
(when (member arg update-elc-files-to-compile) (append (quote ("-f"
"batch-byte-compile-one-file")) (list arg))))) bc-bootstrap)))
(recompile-bootstrap-other (apply (function nconc) (mapcar (function (lambda (arg) (when
(member arg update-elc-files-to-compile) (append (quote ("-f"
"batch-byte-compile-one-file")) (list arg))))) bootstrap-other))))
(mapc-internal (function (lambda (arg) (setq update-elc-files-to-compile (delete arg
update-elc-files-to-compile)))) (append bc-bootstrap bootstrap-other)) (setq
command-line-args (append (quote ("-l" "loadup-el.el"
"run-temacs" "-batch" "-no-packages"
"-no-autoloads" "-eval" "(setq stack-trace-on-error t)"
"-eval" "(setq load-always-display-messages t)")) (when
recompile-bc-bootstrap (append (quote ("-eval" "(setq load-ignore-elc-files
t)" "-l" "bytecomp")) recompile-bc-bootstrap (quote
("-eval" "(setq load-ignore-elc-files nil)")))) (quote ("-l"
"bytecomp")) recompile-bootstrap-other do-autoload-commands (quote
("-eval" "(setq inhibit-autoloads nil)" "-f"
"startup-load-autoloads" "-f" "batch-byte-compile"))
update-elc-files-to-compile)))) (load "loadup-el.el"))))
# bind (current-load-list)
# (unwind-protect ...)
# bind (load-file-name)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
load("/opt/src/xemacs-21.5-2003-10-14/src/../lisp/update-elc.el")
# (condition-case ... . error)
# (catch top-level ...)
Symbol's value as variable is void: module-extensionsmake[1]: *** [NEEDTODUMP] Error
255
make[1]: Leaving directory `/opt/build/xemacs-21.5-2003-10-14/src'
make: *** [src] Error 2
Please note that this is using the Intel C Compiler. Next I'll try a
build with gcc.
Jerry James <james(a)xemacs.org> writes:
SUPERSEDES APPROVE COMMIT 21.5
Vin Shelton <acs(a)xemacs.org> wrote:
> Without this patch, I'm getting the following compiler errors using
> the Solaris/Sparc C Compiler:
[snip]
> Jerry, I think the errors are a result of your compiler.h changes,
> n'est-ce pas?
Yup. Boy, I got into trouble quickly with that one.
> My home network is currently down because the firewall died, so please
> commit this change if you think it is correct.
Having looked around a bit, I think that I just shouldn't define
__GNUC__ for non-GNU compilers. It's going to cause more trouble than
it's worth. Let's go with this patch instead.
src/ChangeLog addition:
2003-10-14 Jerry James <james(a)xemacs.org>
* compiler.h: Don't define __GNUC__ if using a non-GNU compiler.
Use a consistent spacing scheme.
xemacs-21.5 source patch:
Diff command: cvs -q diff -uN
Files affected: src/compiler.h
Index: src/compiler.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/compiler.h,v
retrieving revision 1.2
diff -d -u -r1.2 compiler.h
--- src/compiler.h 2003/10/14 14:40:27 1.2
+++ src/compiler.h 2003/10/14 16:53:38
@@ -39,10 +39,10 @@
under Solaris.) */
#ifndef min
-#define min(a,b) (((a) <= (b)) ? (a) : (b))
+# define min(a,b) (((a) <= (b)) ? (a) : (b))
#endif
#ifndef max
-#define max(a,b) (((a) > (b)) ? (a) : (b))
+# define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
/* Regular C complains about possible clobbering of local vars NOT declared
@@ -59,9 +59,9 @@
*/
#ifdef __cplusplus
-#define VOLATILE_IF_NOT_CPP
+# define VOLATILE_IF_NOT_CPP
#else
-#define VOLATILE_IF_NOT_CPP volatile
+# define VOLATILE_IF_NOT_CPP volatile
#endif
/* Avoid indentation problems when XEmacs sees the curly braces */
@@ -75,25 +75,27 @@
# endif
#endif
-/* Macro simplification for non-GNU compilers and older gccs that did not
- define all of these symbols */
-#ifndef __GNUC__
-#define __GNUC__ 0
-#endif
-#ifndef __GNUC_MINOR__
-#define __GNUC_MINOR__ 0
-#endif
-#ifndef __GNUC_PATCHLEVEL__
-#define __GNUC_PATCHLEVEL__ 0
-#endif
+/* Guard against older gccs that did not define all of these symbols */
+#ifdef __GNUC__
+# ifndef __GNUC_MINOR__
+# define __GNUC_MINOR__ 0
+# endif
+# ifndef __GNUC_PATCHLEVEL__
+# define __GNUC_PATCHLEVEL__ 0
+# endif
+#endif /* __GNUC__ */
-/* Simplify testing for specific GCC versions. This also works for non-GCC
- compilers, where GCC_VERSION is zero. */
+/* Simplify testing for specific GCC versions. For non-GNU compilers,
+ GCC_VERSION evaluates to zero. */
#ifndef NEED_GCC
-#define NEED_GCC(major,minor,patch) (major * 1000000 + minor * 1000 + patch)
+# define NEED_GCC(major,minor,patch) (major * 1000000 + minor * 1000 + patch)
#endif /* NEED_GCC */
#ifndef GCC_VERSION
-#define GCC_VERSION NEED_GCC (__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
+# ifdef __GNUC__
+# define GCC_VERSION NEED_GCC (__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
+# else
+# define GCC_VERSION 0
+# endif /* __GNUC__ */
#endif /* GCC_VERSION */
/* GCC < 2.6.0 could only declare one attribute per function. In that case,
@@ -132,8 +134,8 @@
/* "end-of-loop code not reached" */
/* "statement not reached */
#if defined __SUNPRO_C || defined __USLC__
-#define RETURN_SANS_WARNINGS if (1) return
-#define RETURN_NOT_REACHED(value) DO_NOTHING
+# define RETURN_SANS_WARNINGS if (1) return
+# define RETURN_NOT_REACHED(value) DO_NOTHING
#endif
/* More ways to shut up compiler. This works in Fcommand_loop_1(),
@@ -141,25 +143,25 @@
*/
#if defined (_MSC_VER) || defined (__SUNPRO_C) || defined (__SUNPRO_CC) || \
(defined (DEC_ALPHA) && defined (OSF1))
-#define DO_NOTHING_DISABLING_NO_RETURN_WARNINGS if (0) return Qnil
+# define DO_NOTHING_DISABLING_NO_RETURN_WARNINGS if (0) return Qnil
#else
-#define DO_NOTHING_DISABLING_NO_RETURN_WARNINGS DO_NOTHING
+# define DO_NOTHING_DISABLING_NO_RETURN_WARNINGS DO_NOTHING
#endif
#ifndef RETURN_NOT_REACHED
-#define RETURN_NOT_REACHED(value) return (value)
+# define RETURN_NOT_REACHED(value) return (value)
#endif
#ifndef RETURN_SANS_WARNINGS
-#define RETURN_SANS_WARNINGS return
+# define RETURN_SANS_WARNINGS return
#endif
#ifndef DO_NOTHING
-#define DO_NOTHING do {} while (0)
+# define DO_NOTHING do {} while (0)
#endif
#ifndef DECLARE_NOTHING
-#define DECLARE_NOTHING struct nosuchstruct
+# define DECLARE_NOTHING struct nosuchstruct
#endif
#ifndef ATTRIBUTE_MALLOC
@@ -198,10 +200,10 @@
#endif /* ATTRIBUTE_UNUSED */
#ifdef DEBUG_XEMACS
-#define REGISTER
-#define register
+# define REGISTER
+# define register
#else
-#define REGISTER register
+# define REGISTER register
#endif
#if defined(HAVE_MS_WINDOWS) && defined(HAVE_SHLIB)
--
Jerry James
http://www.ittc.ku.edu/~james/