OpenSSL-0.9.8-beta6 doesn't build asm/mips3.o

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

OpenSSL-0.9.8-beta6 doesn't build asm/mips3.o

Darin Broady
I'm trying to build openssl-0.9.8-beta6 on my SGI Irix 6.5.19m with MIPSpro
7.4.2m compiler.  My configure line is:

./Configure threads shared --prefix=/tmp/openssl-0.9.8 irix-mips3-cc

When the make gets to crypto/bn to add its object files to libcrypto.a, I see
the following:

ar r ../../libcrypto.a bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o
bn_mod.o bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o bn_kron.o
bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o mips3.o bn_recp.o bn_mont.o
bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o bn_depr.o
ar: Error: cannot open mips3.o

This causes the bn_add_words function to not be defined in the shared library,
causing errors during tests.


I tracked this down to the following rule in crypto/bn/Makefile:
mips3.o: asm/mips3.s

According to my make documentation (and imperical tests), this rule does not
invoke the normal command to launch the assembler and create mips3.o because
the dependency has a / in it.

To fix this, I had to track down where BN_ASM was being set.  It is set in the
top-level Makefile which is created by Configure (or config).  It is setting
the BN_ASM variable to mips3.o, from the variable $bn_obj, which is being
pulled from the configuration line for irix-mips3-cc.

I didn't remember seeing this problem with 0.9.7g, so I checked again and in
0.9.7g's Configure, BN_ASM will be set to asm/mips3.o.

The fix, as I see it, is to revert the BN_ASM assignment code in Configure back
to what it was in 0.9.7g:  prefixing the assembler object files with asm/ so
that make will correctly build mips3.o.  Once I did that, crypto/bn correctly
built asm/mips3.o and added it to libcrypto.a.

Darin Broady
[hidden email]


               
____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL-0.9.8-beta6 doesn't build asm/mips3.o

Andy Polyakov
> ar r ../../libcrypto.a bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o
> bn_mod.o bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o bn_kron.o
> bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o mips3.o bn_recp.o bn_mont.o
> bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o bn_depr.o
> ar: Error: cannot open mips3.o

Patch according to http://cvs.openssl.org/chngview?cn=14105 and verify.

> I didn't remember seeing this problem with 0.9.7g,

It's different in 0.9.8. In other words the fact that .o is expected to
be found in crypto/bn and not crypto/bn/asm is intentional. Bear with us. A.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL-0.9.8-beta6 doesn't build asm/mips3.o

Darin Broady
Andy,

Works okay, except there is a missing "-c" in the else case of the Makefile for
compiling the assembly-source using cc.  After adding the "-c" everything looks
okay, and all tests pass on Irix 6.5.19m with MIPSpro 7.4.2m.

Thanks for your help.

Darin Broady

--- Andy Polyakov <[hidden email]> wrote:

> > ar r ../../libcrypto.a bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o
> bn_mul.o
> > bn_mod.o bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o bn_kron.o
> > bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o mips3.o bn_recp.o bn_mont.o
> > bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o bn_depr.o
> > ar: Error: cannot open mips3.o
>
> Patch according to http://cvs.openssl.org/chngview?cn=14105 and verify.
>
> > I didn't remember seeing this problem with 0.9.7g,
>
> It's different in 0.9.8. In other words the fact that .o is expected to
> be found in crypto/bn and not crypto/bn/asm is intentional. Bear with us. A.
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> Development Mailing List                       [hidden email]
> Automated List Manager                           [hidden email]
>


Darin Broady
[hidden email]


               
____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]