Next: , Previous: , Up: Installation  


Q2.0.12: Why can’t I strip SXEmacs?

Richard Cognot writes:

Because of the way SXEmacs (and every other Emacsen, AFAIK) is built. The link gives you a bare-boned emacs (called temacs). temacs is then run, preloading some of the lisp files. The result is then dumped into a new executable, named xemacs, which will contain all of the preloaded lisp functions and data.

Now, during the dump itself, the executable (code+data+symbols) is written on disk using a special unexec() function. This function is obviously heavily system dependent. And on some systems, it leads to an executable which, although valid, cannot be stripped without damage. If memory serves, this is especially the case for AIX binaries. On other architectures it might work OK.

The Right Way to strip the emacs binary is to strip temacs prior to dumping xemacs. This will always work, although you can do that only if you install from sources (as temacs is not part of the binary kits).

Nat Makarevitch writes:

Here is the trick:

  1. [ ./configure; make ]
  2. rm src/sxemacs
  3. strip src/temacs
  4. make
  5. cp src/sxemacs /usr/local/bin/sxemacs