SUMMARY emacs problem

sean@nmc13.chinalake.navy.mil
Wed, 12 Nov 1997 09:46:21 -0800

ORIGINAL_QUESTION:

>Dear friends-
>
>I am trying to run emacs (emacs package 19-30) under Solaris 2.6 and
>I get:
>ld.so.1: ./emacs: fatal: relocation error: file ./emacs: symbol _init:
>referenced symbol not found

Here are some answers:

Unfortunately, this means you need to rebuild emacs.

And everything else build with the copy of gcc that you used to buil dthat
version of emacs.

Some badly installed gcc versions (stripped .o files in the gcc-dir)
build applications that call libc.'s init rather than their own.

Such applications may not work on V8+ SPARC (basically all machines newer
than the 4/6xx series: SS10, SS20, SS4, SS5, LX, Classic, Ultras)

E.g., teh following application:

main()
{
int a = 10;
int b = 200;
printf("%d\n", a * b);
}

prints "10" when compiled with such a compiler.

(But on the surface, large applications may seem to work just fine)

Casper

=====================================

From: Matt Reynolds <reynolmd@aston.ac.uk>

We've already seen this problem in the archives. It's a 'problem'
with software which was compiled for Solaris 2.5.1 or earlier. The
symbols '_init' and '_fini' are no longer defined in Solaris 2.6, the
functionality of these being carried out by other symbols.

There are two options.

Either:

Re-compile your software with the new Solaris 2.6 compiler. I'm not
sure of the implications of subsequently running this on 2.5 systems,
but it will at least work for 2.6 systems.

OR:

Create a new library containing an empty function '_init' eg:
'void _init () { return;}'

And add the library to your LD_PRELOAD variable which tells the
dynamic linker to load this library before any others.

Matt.

====================================================

>From jyoung@educate.com

you may want to execute the file command on the emacs binary to
ensure it's the right one for your platfrom/architecture=2E