[openssl-users] ar : File format not recognized

Ludwig, Mark ludwig.mark at siemens.com
Tue Apr 17 21:47:23 UTC 2018

> From: Bill Kurland, Tuesday, April 17, 2018 4:19 PM
> I'm trying to build openssl-1.1.0h on AIX 6.1 with the ultimate goal of building the IO::Socket::SSL perl module.
> make fails when creating libcrypto.a and libssl.a because, it seems, the *.o files are in a format not recognized by ar
> I've passed "-Wl,-baix5coff64-rs6000" in config. I've also set LDFLAGS="-Wl,-rpath=/usr/local/openssl/lib -Wl,-baix5coff64-rs6000" though I don't see how that would have an effect on this problem.
> I get the same result when I try to run ar command shown in the make output from the command line:
>         ar r ../test2.sh
> where test2.sh contains all the *.o files in crypto
> Every source I can find seems to indicate that gcc should just 'know' what the correct file format is. Am I missing something? Well, obviously I'm missing something. Can anyone point out what?
> Thanks

Not sure this will help, because I built v1.0.2 (haven't gotten to v1.1.0 yet) using the AIX compiler rather than gcc, but the AIX archiver (ar) has a -X option that specifies how many bits.

For example, your example might work as:

         ar -X 64 r LIBNAME.a ../test2.sh

(At least, I assume you're building 64-bit binaries based on seeing "coff64" above.)
(I also assume you omitted the library name in e-mail.)


More information about the openssl-users mailing list