Subject: bug#20297: compiling emacs 24.5 (src/Makefile and RUN_TEMACS)

From: Paul Eggert <[email-masked]>
Date: Sun, 12 Apr 2015 15:58:52 -0700

I don't observe this problem on Fedora 21 x86-64, when configuring similar to 
the way you did:

./configure CFLAGS='-m32' --with-kerberos5 --with-wide-int --without-x

Could you give more details about your platform?  In particular, I'm puzzled 
about the "CFLAGS='-pipe -O3 -fno-fat-lto-objects -flto -mssse3'" and the 
"LDFLAGS='-Wl,-O1 -Wl,-z,relro -Wl,-S'" settings, if all you ran was 
"./configure --with-kerberos5 --with-wide-int --without-x" and "make".  As far 
as I can see, the Emacs 24.5 source code does not specify -pipe, or -O3, or 
-mssse3, or -flto and -ffat-lto-objects (unless you configure with 
--enable-link-time-optimization), or -Wl,-z,relro, etc.  If your build system is 
specifying those options, I suggest bypassing it and building Emacs without the 
extra options; then you can turn the options on one at a time and see which one 
is causing your problem.

> The problem is the variable RUN_TEMACS in src/Makefile(.in), which is
> "./temacs", but shall be the path to temacs, relative to the build-root.

I don't see why this is the problem.  Your build is trying to run ./temacs and 
./temacs is dumping core with an illegal instruction.  This sounds like a bug, 
regardless of how temacs was invoked.

Also, can you build the Emacs master branch?  Please try:

git clone git://git.savannah.gnu.org/emacs.git
cd emacs
./autogen.sh
./configure
make

If this works for you, then your bug is probably fixed already in Emacs 25.