ar : File format not recognized

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ar : File format not recognized

Bill Kurland
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

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: ar : File format not recognized

Ludwig, Mark
> 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.)

HTH,
Mark
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: ar : File format not recognized

Bill Kurland
On 4/17/2018 5:47 PM, Ludwig, Mark wrote:
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.)

HTH,
Mark
You mean use the AIX ar on AIX? Who'd have thought? Not me. Did the trick.

Now on to the next error.

Thanks.

/b

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users