SUMMARY emacs problem

Date: Wed Nov 12 1997 - 11:46:21 CST


>Dear friends-
>I am trying to run emacs (emacs package 19-30) under Solaris 2.6 and
>I get:
> ./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:

    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)



From: Matt Reynolds <>

  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.


  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.


  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.




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

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:09 CDT