Compiling emacs under RedHat


You may have tried to compile emacs under redhat enterprise server 5 or fedora core only to find that the build fails while dumping names. This has been mentioned here, here and here.

The error looks like this:

Dumping under names emacs and emacs-21.4.1
make[1]: *** [emacs] Segmentation fault
make[1]: *** Deleting file `emacs'

This is caused by a recent linux kernel feature called Exec-Shield.

The easiest way around this error is:

./configure && setarch i386 -R make 

You can also run just the setarch bit after the original make dies.

I blog this simply to spread the word out. I’m not smart enough to have fixed this on my own. :-)