RE: How to Compile a Custom Library

From: Bobak, Mark <>
Date: Wed, 29 Oct 2008 11:39:13 -0400
Message-ID: <>


The error is "wrong ELF class: ELFCLASS32". This means that you're trying to use a 32-bit library, and it's not working. Almost certainly, the program that's attempting to run, which is encountering this error, is a 64-bit binary. A 64-bit binary *must* use 64-bit libraries. You need to locate and install the 64-bit version of this library. If this library is custom code, then, as previously suggested, you'll need to re-compile it from source code. This should be a pretty easy task for an experienced C programmer, but is non-trivial, and probably beyond the scope of something I could talk you through in email.

Very briefly, you'll need:

1.) A C compiler. Gcc is a popular choice these days, but your OS may provide a proprietary one as well. (Type 'which cc' or 'which gcc' to see if one is installed.)

2.) All the source code for the library. This will generally be all the *.h and *.c files.

3.) A make file, to help build the library. (Optional, but helpful, particularly if you have multiple *.c files that make up your library.)

Other possibly helpful commands:
'file', will tell you if a particular binary, object or shared object file is 32 or 64 bit. ('file /path/to/your/binary/or/object/file') 'ldd', (list dynamic dependencies), will tell you if a particular binary is missing any dynamic library dependencies.

Hope that helps,


Mark J. Bobak
Senior Database Administrator, System & Product Technologies
789 E. Eisenhower, Parkway, P.O. Box 1346
Ann Arbor MI 48106-1346
+1.734.997.4059  or +1.800.521.0600 x 4059<><><>

ProQuest...Start here.

From: [] On Behalf Of Vicki Pierce
Sent: Wednesday, October 29, 2008 10:43 AM
To: Pedro Espinoza
Cc: oracle-l
Subject: RE: How to Compile a Custom Library

When I try to start the Apps services after the clone, I get an error regarding this library: ps: fatal: /erp/11.5.10/appltop/cust_stuff/fnd/bin/ wrong ELF class: ELFCLASS32

If I don't need to recompile the library, then do you know what is causing the error?  And how do I fix it?

Vicki Pierce

Date: Tue, 28 Oct 2008 20:06:12 -0700 From: To: Subject: Re: How to Compile a Custom Library CC: Well, you need to get the all header files *.h, and relevant *.c files, and compile against 64 bit libc, libm, etc. Sometimes, you may have to modify your c program as well. Just leave the 32 bit so file like it as, since 64 bit solaris 10 contains both 32 bit n 64 bit libc, etc. On Tue, Oct 28, 2008 at 1:58 PM, Vicki Pierce <<>> wrote: We moved our Oracle Apps software to a new 64-bit Solaris 10 server; there is a custom library (.so file) that is still in 32-bit mode. I need to compile it so that it is 64-bit. How do I go about doing that? RDBMS version<>; Apps version<> Thanks in advance! Vicki Pierce
Want to read Hotmail messages in Outlook? The Wordsmiths show you how. Learn Now<!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008>
Stay organized with simple drag and drop from Windows Live Hotmail. Try it<> --
Received on Wed Oct 29 2008 - 10:39:13 CDT

Original text of this message