Module loading problem

M

Mikail Dellovich

I am try to load a .so file through asterisk but get the following problem:

Mar 23 17:38:19 WARNING[423]: loader.c:325 __load_resource: ld.so.1:
asterisk: fatal: /opt/asterisk/lib/modules/SPARC64codec_g729a.so: wrong
ELF class: ELFCLASS64
Mar 23 17:38:19 WARNING[423]: loader.c:554 load_modules: Loading module
SPARC64codec_g729a.so failed!


I am on a Ultra80 Solaris 10 machine in 64-bit mode.

I compiled asterisk using:
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6

But the .so file is precomplied and downloaded.

How may I resolve this problem?

Thanks
 
D

Darren Dunham

Changing followups to comp.unix.solaris.

In comp.unix.solaris Mikail Dellovich said:
I am try to load a .so file through asterisk but get the following problem:
Mar 23 17:38:19 WARNING[423]: loader.c:325 __load_resource: ld.so.1:
asterisk: fatal: /opt/asterisk/lib/modules/SPARC64codec_g729a.so: wrong
ELF class: ELFCLASS64

This looks like your application is a 32 bit binary, but it is trying to
use a 64 bit shared object.

Run 'file' on both your application and the .so file.

The app and any shared objects it uses must be of the same bitness.
I am on a Ultra80 Solaris 10 machine in 64-bit mode.
I compiled asterisk using:
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
But the .so file is precomplied and downloaded.

If there's only one .so and it's a 64 bit object, I'd assume you would
need to tell the compiler to create a 64 bit executable.
 
K

Keith Thompson

Mikail Dellovich said:
I am try to load a .so file through asterisk but get the following problem:

Mar 23 17:38:19 WARNING[423]: loader.c:325 __load_resource: ld.so.1:
asterisk: fatal: /opt/asterisk/lib/modules/SPARC64codec_g729a.so:
wrong ELF class: ELFCLASS64
Mar 23 17:38:19 WARNING[423]: loader.c:554 load_modules: Loading
module SPARC64codec_g729a.so failed!


I am on a Ultra80 Solaris 10 machine in 64-bit mode.
[...]

I was about to tell you that comp.unix.solaris would be a better place
to ask this question; then I noticed that it's cross-posted to both
comp.lang.c and comp.unix.solaris.

Since you don't appear to have a C language issue, I've redirected
followups to just comp.unix.solaris, and I encourage others to
restrict their followups to that group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top