xiaohanyu / oh-my-emacs

[Stopped] Provide an awesome, out-of-box, literate dotemacs for both newbies and nerds.
BSD 3-Clause "New" or "Revised" License
705 stars 141 forks source link

Unable to install on Mac (fails at `makeinfo slime.tex`) #85

Closed srid closed 10 years ago

srid commented 10 years ago

despite running brew install coreutils texinfo, this is what I see on OS X 10.10:

cat ../ChangeLog | \
    sed -ne '/^[0-9]/{s/^[^ ]* *//; s/ *<.*//; p;}' | \
    sort | \
    uniq -c | \
    sort -nr| \
    sed -e 's/^[^A-Z]*//' | \
    awk -f texinfo-tabulate.awk \
    > contributors.texi
makeinfo slime.texi
slime.texi:6: warning: unrecognized encoding name `UTF-8'.
slime.texi:6: Unknown command `codequoteundirected'.
slime.texi:7: Unknown command `codequotebacktick'.
makeinfo: Removing output file `/Users/srid/.emacs.d/el-get/slime/doc/slime.info' due to errors; use --force to preserve.
make: *** [slime.info] Error 1
xiaohanyu commented 10 years ago

Solved this problem by upgrade my texinfo from 4.x to 5.x version:

# xiao at xiao-pad in ~/.emacs.d on git:master x [10:28:15]
$ cd el-get/slime/

# xiao at xiao-pad in ~/.emacs.d/el-get/slime on git:master o [10:28:23]
$ ls
ChangeLog        lib            nregex.lisp             slime-autoloads.el  swank-abcl.lisp     swank-ccl.lisp     swank-ecl.lisp        swank-loader.lisp  swank-scl.lisp
contrib          Makefile       PROBLEMS                slime.el            swank-allegro.lisp  swank-clisp.lisp   swank-gray.lisp       swank-match.lisp   swank-source-file-cache.lisp
CONTRIBUTING.md  metering.lisp  README.md               slime-tests.el      swank.asd           swank-cmucl.lisp   swank.lisp            swank-rpc.lisp     swank-source-path-parser.lisp
doc              NEWS           sbcl-pprint-patch.lisp  start-swank.lisp    swank-backend.lisp  swank-corman.lisp  swank-lispworks.lisp  swank-sbcl.lisp    xref.lisp

# xiao at xiao-pad in ~/.emacs.d/el-get/slime on git:master o [10:28:23]
$ make -C doc slime.info
make: Entering directory `/home/xiao/.emacs.d/el-get/slime/doc'
makeinfo slime.texi
slime.texi:6: Unknown command `codequoteundirected'.
slime.texi:7: Unknown command `codequotebacktick'.
makeinfo: Removing output file `/home/xiao/.emacs.d/el-get/slime/doc/slime.info' due to errors; use --force to preserve.
make: *** [slime.info] Error 1
make: Leaving directory `/home/xiao/.emacs.d/el-get/slime/doc'

# xiao at xiao-pad in ~/.emacs.d/el-get/slime on git:master o [10:28:46]
$ ag codequoteundirected
./doc/slime.texi
6:@codequoteundirected on

# xiao at xiao-pad in ~/.emacs.d/el-get/slime on git:master o [10:29:04]
$ ag codequotebacktick
./doc/slime.texi
7:@codequotebacktick on

# xiao at xiao-pad in ~/.emacs.d/el-get/slime on git:master o [10:29:12]
$ dpkg -l texinfo
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                      Version                   Architecture              Description
+++-=========================================-=========================-=========================-========================================================================================
ii  texinfo                                   4.13a.dfsg.1-10ubuntu4    amd64                     Documentation system for on-line information and printed output

# xiao at xiao-pad in ~/.emacs.d/el-get/slime on git:master o [10:30:19]
$ sudo apt-get install texinfo
[sudo] password for xiao:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libintl-perl libtext-unidecode-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl
Suggested packages:
libintl-xs-perl texinfo-doc-nonfree
Recommended packages:
libxml-sax-expat-perl
The following NEW packages will be installed:
libintl-perl libtext-unidecode-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl
The following packages will be upgraded:
texinfo
1 upgraded, 6 newly installed, 0 to remove and 2064 not upgraded.
Need to get 2,498 kB of archives.
After this operation, 8,508 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://ubuntu.saix.net/ubuntu-archive/ saucy/main libintl-perl all 1.23-1 [1,200 kB]
Get:2 http://ubuntu.saix.net/ubuntu-archive/ saucy/main libtext-unidecode-perl all 0.04-2 [115 kB]
Get:3 http://ubuntu.saix.net/ubuntu-archive/ saucy/main libxml-namespacesupport-perl all 1.09-3 [15.3 kB]
Get:4 http://ubuntu.saix.net/ubuntu-archive/ saucy/main libxml-sax-base-perl all 1.07-1 [21.5 kB]
Get:5 http://ubuntu.saix.net/ubuntu-archive/ saucy/main libxml-sax-perl all 0.99+dfsg-2ubuntu1 [64.6 kB]
Get:6 http://ubuntu.saix.net/ubuntu-archive/ saucy/main libxml-libxml-perl amd64 2.0010+dfsg-1 [391 kB]
Get:7 http://ubuntu.saix.net/ubuntu-archive/ saucy/main texinfo amd64 5.1.dfsg.1-4ubuntu1 [689 kB]
Fetched 2,498 kB in 31s (79.4 kB/s)
Selecting previously unselected package libintl-perl.
(Reading database ... 455375 files and directories currently installed.)
Unpacking libintl-perl (from .../libintl-perl_1.23-1_all.deb) ...
Selecting previously unselected package libtext-unidecode-perl.
Unpacking libtext-unidecode-perl (from .../libtext-unidecode-perl_0.04-2_all.deb) ...
Selecting previously unselected package libxml-namespacesupport-perl.
Unpacking libxml-namespacesupport-perl (from .../libxml-namespacesupport-perl_1.09-3_all.deb) ...
Selecting previously unselected package libxml-sax-base-perl.
Unpacking libxml-sax-base-perl (from .../libxml-sax-base-perl_1.07-1_all.deb) ...
Selecting previously unselected package libxml-sax-perl.
Unpacking libxml-sax-perl (from .../libxml-sax-perl_0.99+dfsg-2ubuntu1_all.deb) ...
Selecting previously unselected package libxml-libxml-perl.
Unpacking libxml-libxml-perl (from .../libxml-libxml-perl_2.0010+dfsg-1_amd64.deb) ...
Preparing to replace texinfo 4.13a.dfsg.1-10ubuntu4 (using .../texinfo_5.1.dfsg.1-4ubuntu1_amd64.deb) ...
Unpacking replacement texinfo ...
Processing triggers for man-db ...
Setting up libintl-perl (1.23-1) ...
Setting up libtext-unidecode-perl (0.04-2) ...
Setting up libxml-namespacesupport-perl (1.09-3) ...
Setting up libxml-sax-base-perl (1.07-1) ...
Setting up libxml-sax-perl (0.99+dfsg-2ubuntu1) ...
update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10...
update-perl-sax-parsers: Updating overall Perl SAX parser modules info file...

Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version
Setting up libxml-libxml-perl (2.0010+dfsg-1) ...
update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50...
update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50...
update-perl-sax-parsers: Updating overall Perl SAX parser modules info file...
Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version
Setting up texinfo (5.1.dfsg.1-4ubuntu1) ...
Running mktexlsr. This may take some time. ... done.

# xiao at xiao-pad in ~/.emacs.d/el-get/slime on git:master o [10:33:18]
$ make -C doc slime.info
make: Entering directory `/home/xiao/.emacs.d/el-get/slime/doc'
makeinfo slime.texi
make: Leaving directory `/home/xiao/.emacs.d/el-get/slime/doc'

# xiao at xiao-pad in ~/.emacs.d/el-get/slime on git:master o [10:33:27]
$ texinfo
zsh: command not found: texinfo

# xiao at xiao-pad in ~/.emacs.d/el-get/slime on git:master o [10:33:30]
$ dpkg -l texinfo
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                      Version                   Architecture              Description
+++-=========================================-=========================-=========================-========================================================================================
ii  texinfo                                   5.1.dfsg.1-4ubuntu1       amd64                     Documentation system for on-line information and printed output
`
srid commented 10 years ago

FWIW, I have 5.2 installed:

$ brew info texinfo
texinfo: stable 5.2
http://www.gnu.org/software/texinfo/

This formula is keg-only.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Software that uses TeX, such as lilypond and octave, require a newer version
se files.

/usr/local/Cellar/texinfo/5.2 (396 files, 8.1M)
  Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/texinfo.rb
xiaohanyu commented 10 years ago

Really weird, what's the result of cd $HOME/.emacs.d/el-get/slime, make -C doc slime.info?

I have no mac so I can't help in a fast and direct way.

srid commented 10 years ago
$ make -C doc slime.info
makeinfo slime.texi
slime.texi:6: warning: unrecognized encoding name `UTF-8'.
slime.texi:6: Unknown command `codequoteundirected'.
slime.texi:7: Unknown command `codequotebacktick'.
makeinfo: Removing output file `/Users/srid/.emacs.d/el-get/slime/doc/slime.info' due to errors; use --force to preserve.
make: *** [slime.info] Error 1

I have no mac so I can't help in a fast and direct way.

Hmm OK. Emacs starts just fine otherwise, so I guess I'll live this warning every time starting emacs. Hopefully somebody else will come along at help with this OS X issue.

xiaohanyu commented 10 years ago

If you don't need ome-lisp modules, just comment out it and other parts of oh-my-emacs will works like a charm.

srid commented 10 years ago

Where exactly do I commit it out?

I just noticed that other things like evil-mode hasn't completed loaded, possibly because of this.

xiaohanyu commented 10 years ago

https://github.com/xiaohanyu/oh-my-emacs/blob/master/core/ome-gui.org#linum-relative

Load necessary modules and packages when needed

srid commented 10 years ago

No, I'm asking about disabling this SLIME stuff. So my emacs would start without error, hopefully leading to evil-mode working fine.

xiaohanyu commented 10 years ago

Hi, just turn this in ome-common-lisp module:

#+NAME: slime
#+BEGIN_SRC emacs-lisp
(defun ome-slime-setup ()
...
#+END_SRC

to

#+NAME: slime
#+BEGIN_SRC emacs-lisp :tangle no
(defun ome-slime-setup ()
...
#+END_SRC

and make sure you el-get-remove slime before restart emacs.

check http://orgmode.org/manual/Extracting-source-code.html for detailed documentation about org-babel.

srid commented 10 years ago

i edited ome-common-lisp.org and tried again, this time i see:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  expand-file-name(nil)
  load-file(nil)
  org-babel-load-file("/Users/srid/.emacs.d/modules/ome-common-lisp.org")
  (if header-or-tags (progn (let ((--dolist-tail-- header-or-tags) header-or-tag) (while --dolist-tail-- (setq header-or-tag (car --dolist-tail--)) (let* ((base (file-name-nondirectory file)) (dir (file-name-directory file)) (partial-file (expand-file-name ... dir))) (if (file-exists-p partial-file) nil (let (... ...) (unwind-protect ... ...))) (org-babel-load-file partial-file)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (org-babel-load-file file))
  (let ((module-name (file-name-base module)) (file (expand-file-name (if (string-match "ome-.+.org" module) module (format "ome-%s.org" module)) ome-dir))) (setq el-get-sources nil) (setq el-get-git-shallow-clone t) (if header-or-tags (progn (let ((--dolist-tail-- header-or-tags) header-or-tag) (while --dolist-tail-- (setq header-or-tag (car --dolist-tail--)) (let* ((base ...) (dir ...) (partial-file ...)) (if (file-exists-p partial-file) nil (let ... ...)) (org-babel-load-file partial-file)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (org-babel-load-file file)) (el-get (quote sync) (mapcar (quote el-get-source-name) el-get-sources)) (setq ome-module-packages nil) (mapcar (function (lambda (el-get-package) (add-to-list (quote ome-module-packages) (el-get-source-name el-get-package)))) el-get-sources) (add-to-list (quote ome-packages) (cons module-name ome-module-packages)))
  ome-load("modules/ome-common-lisp.org")
  eval-buffer(#<buffer  *load*-143240> nil "/Users/srid/.emacs.d/ome.el" nil t)  ; Reading at buffer position 6900
  load-with-code-conversion("/Users/srid/.emacs.d/ome.el" "/Users/srid/.emacs.d/ome.el" nil nil)
  load("/Users/srid/.emacs.d/ome.el" nil nil t)
  load-file("/Users/srid/.emacs.d/ome.el")
  org-babel-load-file("/Users/srid/.emacs.d/ome.org")
  eval-buffer(#<buffer  *load*> nil "/Users/srid/.emacs.d/init.el" nil t)  ; Reading at buffer position 2759
  load-with-code-conversion("/Users/srid/.emacs.d/init.el" "/Users/srid/.emacs.d/init.el" t t)
  load("/Users/srid/.emacs.d/init" t t)
  #[0 "\205\262     \306=\203 \307\310Q\202;    \311=\204 \307\312Q\202; \313\307\314\315#\203* \316\202; \313\307\314\317#\203: \320\nB\321\202; \316\322\323\322\211#\210\322=\203a \324\325\326\307\327Q!\"\323\322\211#\210\322=\203` \210\203\243 \330!\331\232\203\243 \332!\211\333P\334!\203} \211\202\210 \334!\203\207 \202\210 \314\262\203\241 \335\"\203\237 \336\337#\210\340\341!\210\266\f?\205\260 \314\323\342\322\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
  command-line()
  normal-top-level()

should i update the associated .el file? how do i do that? this is what i tried:

$ /Applications/Emacs.app/Contents/MacOS/Emacs-10.7 --batch -Q --eval '(require (quote org))' --eval '(setq ome-dir default-directory)' --eval '(org-babel-load-file "modules/ome-common-lisp.org")'
OVERVIEW
Loading vc-git...
(No changes need to be saved)
Tangled 0 code blocks from ome-common-lisp.org
Loading /Users/srid/.emacs.d/modules/ome-common-lisp.el (source)...
Symbol's function definition is void: ome-install
xiaohanyu commented 10 years ago

Don't know why.

The :tangle no keyword has been existed in oh-my-emacs for a long time and have no problem.

Check https://raw.githubusercontent.com/xiaohanyu/oh-my-emacs/285f06f1bb17872b66ceda8fef63da150a3a8ab6/modules/ome-javascript.org for example.

Please rollback and try again.

trishume commented 10 years ago

I had the same problem (after I patched the global-rainbow-delimiters-mode thing). Also tried adding :tangle no and got the same error. I even go the same error after I deleted the entire slime section from the org file. Still haven't figured it out.

I'm on OSX 10.9 using https://github.com/railwaycat/emacs-mac-port

orab commented 10 years ago

you should do brew link texinfo --force after you install texinfo with Homebrew.

xiaohanyu commented 10 years ago

@orab Cool! Thanks for the tips, I've no mac so I can not figure out this.

rabidpraxis commented 10 years ago

I had the same problem, and the force linking fixed it. Thanks!

vydd commented 9 years ago

For macports users:

What brew link texinfo --force does is that, to my understanding, it just symlinks stuff installed using brew to standard system directories. You can do the same manually. By looking at ~/.emacs.d/el-get/slime/doc/Makefile, you'll see that slime docs need texi2dvi, dvips, makeinfo and texi2html. So, running this as root:

Go to /usr/bin

# cd /usr/bin

Backup the current binaries. Don't worry if some of the files don't exist.

# mv texi2dvi texi2dvi.old
# mv makeinfo makeinfo.old
# mv dvips dvips.old
# mv texi2html texi2html.old

Assuming /opt/local is where you keep your macports installs, symlink the following:

# ln -s /opt/local/bin/texi2dvi texi2dvi
# ln -s /opt/local/bin/dvips dvips
# ln -s /opt/local/bin/makeinfo makeinfo
# ln -s /opt/local/bin/texi2html texi2html

That should be it. Restart emacs.

If it still fails, I guess you'll need to:

# mv /usr/share/texinfo /usr/share/texinfo.old
# ln -s /opt/local/share/texinfo /usr/share/texinfo

Hope it helps.

xiaohanyu commented 9 years ago

@vydd Thanks! This really helps for macports user. I think I should write this to oh-my-emacs.

elliottslaughter commented 9 years ago

Just FYI, overwriting links in /usr/bin is generally considered bad practice on Mac OS X and can cause problems. In this particular case, you don't even need to do this. You can just:

cd ~/.emacs.d/el-get/slime/doc
/usr/local/Cellar/texinfo/5.2/bin/makeinfo slime.texi # or wherever your makeinfo is located

This is sufficient to make Emacs stop complaining until you update slime (and then only if slime.texi changes).

If you want to make this more permanent, you can just stick the Homebrew installation directory on PATH. There is absolutely no need to go writing stuff into system directories.