slime / slime

The Superior Lisp Interaction Mode for Emacs
http://common-lisp.net/project/slime/
1.9k stars 336 forks source link

Compilation error #182

Closed marco-git closed 10 years ago

marco-git commented 10 years ago

After cloning the git repository and launching make, compilation halts with error:

In toplevel form: slime-fancy.el:13:24:Error: Symbol's function definition is void: defun*

Full compilation output can be found here http://pastebin.com/04UVm9DX

syohex commented 10 years ago

Which emacs version do you use ? I can't reproduce this issue with Emacs24.1, Emacs 24.3, Emacs HEAD.

marco-git commented 10 years ago

Sorry, I forgot to mention it, Emacs is 24.3.1 packed for Arch.

syohex commented 10 years ago

I can't reproduce my Arch machine. Would you try again after git pull and make clean ?

# uname -a
Linux archarch 3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64 GNU/Linux
# emacs --version
GNU Emacs 24.3.1
Copyright (C) 2013 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

# make
emacs -Q -L . --batch -f batch-byte-compile lib/hyperspec.el
Wrote /root/src/slime/lib/hyperspec.elc
emacs -Q -L . --batch -f batch-byte-compile slime.el

In end of data:
slime.el:7597:1:Warning: the function `apropos-mode' might not be defined at
    runtime.
Wrote /root/src/slime/slime.elc
emacs -Q -L . --batch -f batch-byte-compile slime-autoloads.el
emacs -Q -L . --batch -f batch-byte-compile slime-tests.el
Wrote /root/src/slime/slime-tests.elc
emacs -Q -L . --batch -f batch-byte-compile lib/ert-x.el

In ert--plist-difference-explanation:
lib/ert-x.el:665:14:Warning: `flet' is an obsolete macro (as of 24.3); use
    either `cl-flet' or `cl-letf'.

In ert--insert-human-readable-selector:
lib/ert-x.el:1134:45:Warning: `labels' is an obsolete macro (as of 24.3); use
    `cl-labels' instead.

In ert--stats-set-test-and-result:
lib/ert-x.el:1258:47:Warning: `flet' is an obsolete macro (as of 24.3); use
    either `cl-flet' or `cl-letf'.

In ert-delete-all-tests:
lib/ert-x.el:1589:4:Warning: `interactive-p' is an obsolete function (as of
    23.2); use `called-interactively-p' instead.
Wrote /root/src/slime/lib/ert-x.elc
emacs -Q -L . --batch -f batch-byte-compile lib/cl-lib.el

In toplevel form:
lib/cl-lib.el:73:1:Warning: cl package required at runtime
Wrote /root/src/slime/lib/cl-lib.elc
emacs -Q -L . --batch -f batch-byte-compile lib/ert.el

In ert--plist-difference-explanation:
lib/ert.el:665:14:Warning: `flet' is an obsolete macro (as of 24.3); use
    either `cl-flet' or `cl-letf'.

In ert--insert-human-readable-selector:
lib/ert.el:1134:45:Warning: `labels' is an obsolete macro (as of 24.3); use
    `cl-labels' instead.

In ert--stats-set-test-and-result:
lib/ert.el:1258:47:Warning: `flet' is an obsolete macro (as of 24.3); use
    either `cl-flet' or `cl-letf'.

In ert-delete-all-tests:
lib/ert.el:1589:4:Warning: `interactive-p' is an obsolete function (as of
    23.2); use `called-interactively-p' instead.
Wrote /root/src/slime/lib/ert.elc
make -C contrib EMACS="emacs" LISP="sbcl" compile
make[1]: Entering directory '/root/src/slime/contrib'
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-sprof.el
Wrote /root/src/slime/contrib/slime-sprof.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-asdf.el
Wrote /root/src/slime/contrib/slime-asdf.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-tramp.el
Wrote /root/src/slime/contrib/slime-tramp.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-fontifying-fu.el
Wrote /root/src/slime/contrib/slime-fontifying-fu.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-indentation.el
Wrote /root/src/slime/contrib/slime-indentation.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-references.el
Wrote /root/src/slime/contrib/slime-references.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-hyperdoc.el
Wrote /root/src/slime/contrib/slime-hyperdoc.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-highlight-edits.el
Wrote /root/src/slime/contrib/slime-highlight-edits.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-banner.el
Wrote /root/src/slime/contrib/slime-banner.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-fancy-trace.el
Wrote /root/src/slime/contrib/slime-fancy-trace.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-xref-browser.el
Wrote /root/src/slime/contrib/slime-xref-browser.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-c-p-c.el
Wrote /root/src/slime/contrib/slime-c-p-c.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-typeout-frame.el
Wrote /root/src/slime/contrib/slime-typeout-frame.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-fancy.el
Function slime-extend-region-for-font-lock is already compiled
Function slime-compute-region-for-font-lock is already compiled
Function slime-search-directly-preceding-reader-conditional is already compiled
Function slime-search-suppressed-forms is already compiled
Function slime-beginning-of-tlf is already compiled
Wrote /root/src/slime/contrib/slime-fancy.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-fuzzy.el

In slime-fuzzy-complete-symbol:
slime-fuzzy.el:260:14:Warning: `comint-dynamic-complete-as-filename' is an
    obsolete function (as of 24.1); use `comint-filename-completion' instead.
Wrote /root/src/slime/contrib/slime-fuzzy.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-sbcl-exts.el
Wrote /root/src/slime/contrib/slime-sbcl-exts.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-presentations.el
Wrote /root/src/slime/contrib/slime-presentations.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-clipboard.el
Wrote /root/src/slime/contrib/slime-clipboard.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-repl.el
Wrote /root/src/slime/contrib/slime-repl.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-scratch.el
Wrote /root/src/slime/contrib/slime-scratch.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-mrepl.el
Wrote /root/src/slime/contrib/slime-mrepl.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-compiler-notes-tree.el
Wrote /root/src/slime/contrib/slime-compiler-notes-tree.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-enclosing-context.el
Wrote /root/src/slime/contrib/slime-enclosing-context.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-editing-commands.el

In end of data:
slime-editing-commands.el:184:1:Warning: the following functions are not known
    to be defined: incf, decf
Wrote /root/src/slime/contrib/slime-editing-commands.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-parse.el
Wrote /root/src/slime/contrib/slime-parse.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile bridge.el
Wrote /root/src/slime/contrib/bridge.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-media.el
Wrote /root/src/slime/contrib/slime-media.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-cl-indent.el

In common-lisp-indent-function-1:
slime-cl-indent.el:987:22:Warning: reference to free variable
    `containing-sexp'
Wrote /root/src/slime/contrib/slime-cl-indent.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-autodoc.el

Wrote /root/src/slime/contrib/slime-autodoc.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-package-fu.el
Wrote /root/src/slime/contrib/slime-package-fu.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-snapshot.el
Wrote /root/src/slime/contrib/slime-snapshot.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-mdot-fu.el
Wrote /root/src/slime/contrib/slime-mdot-fu.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-presentation-streams.el
Wrote /root/src/slime/contrib/slime-presentation-streams.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-trace-dialog.el
Wrote /root/src/slime/contrib/slime-trace-dialog.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-fancy-inspector.el
Wrote /root/src/slime/contrib/slime-fancy-inspector.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-scheme.el
Wrote /root/src/slime/contrib/slime-scheme.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile inferior-slime.el
Wrote /root/src/slime/contrib/inferior-slime.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile test/slime-repl-tests.el
Wrote /root/src/slime/contrib/test/slime-repl-tests.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile test/slime-c-p-c-tests.el
Wrote /root/src/slime/contrib/test/slime-c-p-c-tests.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile test/slime-fontifying-fu-tests.el
Function slime-extend-region-for-font-lock is already compiled
Function slime-compute-region-for-font-lock is already compiled
Function slime-search-directly-preceding-reader-conditional is already compiled
Function slime-search-suppressed-forms is already compiled
Function slime-beginning-of-tlf is already compiled
Wrote /root/src/slime/contrib/test/slime-fontifying-fu-tests.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile test/slime-parse-tests.el
Wrote /root/src/slime/contrib/test/slime-parse-tests.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile test/slime-enclosing-context-tests.el
Wrote /root/src/slime/contrib/test/slime-enclosing-context-tests.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile test/slime-autodoc-tests.el
Wrote /root/src/slime/contrib/test/slime-autodoc-tests.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile test/slime-presentation-tests.el
Wrote /root/src/slime/contrib/test/slime-presentation-tests.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile test/slime-indentation-tests.el
Loading vc-git...
Wrote /root/src/slime/contrib/test/slime-indentation-tests.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile test/slime-mdot-fu-tests.el
Wrote /root/src/slime/contrib/test/slime-mdot-fu-tests.elc
emacs -Q -L . -L .. --batch -f batch-byte-compile slime-motd.el
Wrote /root/src/slime/contrib/slime-motd.elc
emacs -Q --batch -L . -L .. \
        --eval "(batch-byte-recompile-directory 0)" .
Checking /root/src/slime/contrib...
Checking /root/src/slime/contrib/test...
Done (Total of 0 files compiled, 47 skipped in 2 directories)
make[1]: Leaving directory '/root/src/slime/contrib'
marco-git commented 10 years ago

Nothing to do, the same error pops out, I even switched back to kernel 3.16.1 (I was using the lts version). If it can help, on the Arch AUR slime page, I found out there's someone else with my very same error: https://aur.archlinux.org/packages/slime-git/ He's using some helper to build the package though.

joaotavora commented 10 years ago

If it can help, on the Arch AUR slime page, I found out there's someone else with my very same error:

Doesn't seem to be the same error, though it's in the same file.

This error is strange, and I also can't reproduce it.

The defun* macro used by slime-fuzzy.el, which is required when compiling slime-fancy.el, is not known in cl-lib but it is known in cl which is sometimes required at compilation time, by files such as slime-presentations.el. This is most probably what is happening for the rest of us, preventing the failure.

It'll crash if those files are not required before contrib/slime-fuzzy.el. This would seem to be related with some file sorting issue, but I can't explain why it doesn't fail for the rest of us, because the order is hardcoded in contrib/slime-fancy.el itself.

Anyway, long story short, I've pushed a preventive fix. Report back here if it worked for you.

marco-git commented 10 years ago

Pulled the repo and manual compilation completed normally, I could also rebuild the AUR package successfully. Slime runs smoothly now, thank you for your help!

joaotavora commented 10 years ago

BTW I understand what happened now: In your case the files requiring cl at compilation time were already compiled when slime-fancy.el was being compiled, so require just loaded their elc versions. Since these files state (eval-when-compile (require 'cl)), and that isn't true when loading .elc fles, cl didn't get loaded into the elisp runtime. Hence, loading the uncompiled contrib/slime-fuzzy.el failed when evaluating the defun* top-level form. It didn't happen for the rest of us because probably it was your version of make that decided on this particular compilation order. Confused? :-)