Problem

Seeing following message:

main_program: Error loading "orchoracle"
Could not load module   "../PXEngine/lib/liborchoracleaix3.so"

Dependent module /../oracle/v10.2/lib/libclntsh.so could not  be loaded.
The module has an invalid magic number.   

Explanation

The library is in a format not compatible with the format of the program (32 vs 64 bits)

The nm command “Displays information about symbols in object files, executable files, and object-file libraries.” The nm -X32 returns 0 line on the standard output for a 64 bits modules and returns xx lines for a 32 bits modules. Combined with wc -l command, nm command quickly confirmed the bit size.

Results of the test for a 64 bits library:

# nm -X32 odbc.so | wc -l
0654-210 odbc.so is not valid in the current object file mode.
Use the -X option to specify the desired object mode.
 0

# nm -X64 odbc.so | wc -l
    4091

So it is a 64 bits library

Results of the test for a 32 bits library:

Results of test for a 32 bits library:
# nm -X32 odbc.so | wc -l
 3854

# nm -X64 odbc.so | wc -l
0654-210 odbc.so is not valid in the current object file mode.
Use the -X option to specify the desired object mode.
 0

And this is a 32 bits library indeed.

Tags:

Categories:

Updated:

Comments