Page 1 of 1

invalid ELF header in libc.so (Ubuntu)

Posted: Thu Mar 25, 2010 6:32 pm
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 ) )

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

Posted: Thu Mar 25, 2010 6:44 pm
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 ) )

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

Posted: Thu Mar 25, 2010 7:19 pm
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.