invalid ELF header in libc.so (Ubuntu)

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
kanen
Posts: 145
Joined: Thu Mar 25, 2010 6:24 pm
Contact:

invalid ELF header in libc.so (Ubuntu)

Post by kanen »

When I attempt to import the unix.lsp module, I get an "invalid ELF header" error.

The results are below.

I have tried the Ubuntu apt-get version and the version compiled from source. Both have the same problem.

Any ideas? Am I missing something obvious?

Code: Select all

kanen@openkane:~/Source/newlisp-10.2.1$ ./newlisp 
newLISP v.10.2.1 on Linux IPv4 UTF-8, execute 'newlisp -h' for more info.

> (load "unix.lsp")

ERR: problem loading library in function import : "/usr/lib/libc.so: invalid ELF header"
> kanen@openkane:~/Source/newlisp-10.2.1$ head /usr/lib/libc.so 
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )
. Kanen Flowers http://kanen.me .

kanen
Posts: 145
Joined: Thu Mar 25, 2010 6:24 pm
Contact:

Re: invalid ELF header in libc.so (Ubuntu) [SOLVED]

Post by kanen »

Modified the unix.lsp code:

Code: Select all

	      "/usr/lib/libpcap.so.1.0.0"; UBUNTU 9.04
	      ;"/usr/lib/libc.so" ; Linux, BSD, Solaris
Problem solved.
kanen wrote:When I attempt to import the unix.lsp module, I get an "invalid ELF header" error.

The results are below.

I have tried the Ubuntu apt-get version and the version compiled from source. Both have the same problem.

Any ideas? Am I missing something obvious?

Code: Select all

kanen@openkane:~/Source/newlisp-10.2.1$ ./newlisp 
newLISP v.10.2.1 on Linux IPv4 UTF-8, execute 'newlisp -h' for more info.

> (load "unix.lsp")

ERR: problem loading library in function import : "/usr/lib/libc.so: invalid ELF header"
> kanen@openkane:~/Source/newlisp-10.2.1$ head /usr/lib/libc.so 
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )
. Kanen Flowers http://kanen.me .

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: invalid ELF header in libc.so (Ubuntu)

Post by Lutz »

To import libc.so on UBUNTU 9.04 linux try "/lib/libc.so.6" instead. The online module has been updated with this.

Locked