On AIX 6.1 ppc64, our application uses System.loadLibrary("m") to download libm.a. Or it crashes with an error message
module has an invalid magic number
According to IBM documentation, this can happen if there is a mismatch between 32 bits and 64 bits. Or this happens if we use the Java6 (32 bit) or Java6_64 (64 bit) JVM. So this is not so.
Other possible reasons: /usr/lib/libm.a NOT a shared library. But we just cannot find the generic libm.a mode on the platform to use!
By purchasing Javadoc in System.loadLibrary ("name"), the mapping of "name" to a real library is system dependent. On most Unix systems, it maps to lib.so, while on AIX it maps to lib.a; Note that on AIX, .a may be hybrid, i.e. it can contain both a static and a general object, 32 bits, as well as a 64-bit object. My problem is finding libm.a generic mode on AIX.
Does anyone know how to use System.loadLibrary("m") to load libm.a ?
PS System.loadLibrary("m") works fine on most of the UNIX platforms we tested.
source share