Hi,

I posted the e-mail below to [EMAIL PROTECTED] yesterday, but
have had no reply yet, so I thought I'd try this list too.

------

I'm trying to build OpenSSL 0.9.5a on Solaris 2.4, using the Sun
WorkShop Compiler v3.0.

After running

    ./config --prefix=/usr/local --openssldir=/usr/local/openssl

I had to edit the "Makefile" to change two compiler CFLAGS: neither
"-xO5" nor "-xdepend" are known by my compiler, so I changed "-xO5" to
"-xO4" and removed "-xdepend" entirely.

I then ran "make", but it fell over with the following error messages:

    [...]
    cc -I.. -I../../include -DTHREADS -D_REENTRANT -xarch=v8 -xO4
-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W   -c -o asm/sparcv8.o asm/sparcv8.S

    cc -I.. -I../../include -DTHREADS -D_REENTRANT -xarch=v8 -xO4
-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W  -c  bn_recp.c
    cc -I.. -I../../include -DTHREADS -D_REENTRANT -xarch=v8 -xO4
-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W  -c  bn_mont.c
    cc -I.. -I../../include -DTHREADS -D_REENTRANT -xarch=v8 -xO4
-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W  -c  bn_mpi.c
    cc -I.. -I../../include -DTHREADS -D_REENTRANT -xarch=v8 -xO4
-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W  -c  bn_exp2.c
    ar r ../../libcrypto.a bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o
bn_mul.o  bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o  bn_gcd.o

bn_prime.o bn_err.o bn_sqr.o    asm/sparcv8.o bn_recp.o bn_mont.o
bn_mpi.o bn_exp2.o
    ar: asm/sparcv8.o cannot open
    ar: asm/sparcv8.o not found
    *** Error code 1
    make: Fatal error: Command failed for target `lib'
    Current working directory /tmp/openssl-0.9.5a/crypto/bn
    *** Error code 1
    make: Fatal error: Command failed for target `subdirs'
    Current working directory /tmp/openssl-0.9.5a/crypto
    *** Error code 1
    make: Fatal error: Command failed for target `all'

It appears that the assembler file "crypto/bn/asm/sparcv8.S" is not
compiled, and this is not even picked up until the "ar" command is run.

Typing "man cc" I notice that under the FILES section "file.s" is listed

as an assembler source file and no mention is made of "file.S".

So I tried renaming "crypto/bn/asm/sparcv8.S" to
""crypto/bn/asm/sparcv8.s" and changing the reference to it in
"crypto/bn/Makefile" appropriately.  I then ran "make" again and this
time got the following output:

    [...]
    cc -c -I.. -I../../include -DTHREADS -D_REENTRANT -xarch=v8 -xO4
-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W -o asm/sparcv8.o asm/sparcv8.s
    /export/home/SUNWspro/bin/../SC3.0/bin/fbe: "asm/sparcv8.s", line
525: error: statement syntax
    /export/home/SUNWspro/bin/../SC3.0/bin/fbe: "asm/sparcv8.s", line
530: error: statement syntax
    /export/home/SUNWspro/bin/../SC3.0/bin/fbe: "asm/sparcv8.s", line
531: error: statement syntax
    /export/home/SUNWspro/bin/../SC3.0/bin/fbe: "asm/sparcv8.s", line
532: error: statement syntax
    /export/home/SUNWspro/bin/../SC3.0/bin/fbe: "asm/sparcv8.s", line
533: error: statement syntax
    /export/home/SUNWspro/bin/../SC3.0/bin/fbe: "asm/sparcv8.s", line
534: error: statement syntax
    /export/home/SUNWspro/bin/../SC3.0/bin/fbe: "asm/sparcv8.s", line
536: error: statement syntax
    /export/home/SUNWspro/bin/../SC3.0/bin/fbe: "asm/sparcv8.s", line
537: error: statement syntax
    /export/home/SUNWspro/bin/../SC3.0/bin/fbe: "asm/sparcv8.s", line
538: error: statement syntax
    /export/home/SUNWspro/bin/../SC3.0/bin/fbe: "asm/sparcv8.s", line
540: error: statement syntax
    [... (one line like this for virtually eevery line of the file) ...]

    cc: cg failed for asm/sparcv8.s
    *** Error code 2
    make: Fatal error: Command failed for target `asm/sparcv8.o'
    Current working directory /tmp/openssl-0.9.5a/crypto/bn
    *** Error code 1
    make: Fatal error: Command failed for target `subdirs'
    Current working directory /tmp/openssl-0.9.5a/crypto
    *** Error code 1
    make: Fatal error: Command failed for target `all'

It now looks like its at least trying to compile the assembler file, and

now failing at that point instead!

I've tried removing the "-xO4" optimsation flag, but to no avail.

If I start again and configure this time with "no-asm" then everything
builds and tests fine.

Please find attached the output from "make report" (before I changed the

".S" to ".s").

Any help would be greatly appreciated!

Thanks,
Steve Hay

OpenSSL self-test report:

OpenSSL version:  0.9.5a
Last change:      Make sure _lrotl and _lrotr are only used with MSVC....
Options:          --prefix=/usr/local --openssldir=/usr/local/openssl
OS (uname):       SunOS radsun2-4 5.4 Generic_101945-41 sun4m sparc
OS (config):      sun4m-sun-solaris2
Target (default): solaris-sparcv8-cc
Target:           solaris-sparcv8-cc
Compiler:         cc: SC3.0 15 Dec 1993

Failure!
-----------------------------------------------------------------------------
making all in crypto...
making all in crypto/md2...
making all in crypto/md5...
making all in crypto/sha...
making all in crypto/mdc2...
making all in crypto/hmac...
making all in crypto/ripemd...
making all in crypto/des...
making all in crypto/rc2...
making all in crypto/rc4...
making all in crypto/rc5...
making all in crypto/idea...
making all in crypto/bf...
making all in crypto/cast...
making all in crypto/bn...
cc -I.. -I../../include -DTHREADS -D_REENTRANT -xarch=v8 -xO4 -xstrconst -Xa 
-DB_ENDIAN -DBN_DIV2W   -c -o asm/sparcv8.o asm/sparcv8.S
ar r ../../libcrypto.a bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o  
bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o  bn_gcd.o bn_prime.o bn_err.o 
bn_sqr.o asm/sparcv8.o bn_recp.o bn_mont.o  bn_mpi.o bn_exp2.o
ar: asm/sparcv8.o cannot open
ar: asm/sparcv8.o not found
*** Error code 1
make: Fatal error: Command failed for target `lib'
Current working directory /tmp/openssl-0.9.5a/crypto/bn
*** Error code 1
make: Fatal error: Command failed for target `subdirs'
Current working directory /tmp/openssl-0.9.5a/crypto
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /tmp/openssl-0.9.5a
-----------------------------------------------------------------------------
c_rehash: rehashing skipped ('openssl' program not available)
touch rehash.time
testing...
cc -I../include -DTHREADS -D_REENTRANT -xarch=v8 -xO4 -xstrconst -Xa -DB_ENDIAN 
-DBN_DIV2W  -c  bntest.c
cc -o bntest -I../include -DTHREADS -D_REENTRANT -xarch=v8 -xO4 -xstrconst -Xa 
-DB_ENDIAN -DBN_DIV2W bntest.o -L. -L.. -L../.. -L../../.. -L.. -lcrypto -lsocket -lnsl
Undefined                       first referenced
 symbol                             in file
ERR_error_string                    bntest.o
ERR_print_errors_fp                 bntest.o
RAND_seed                           bntest.o
RAND_add                            ../libcrypto.a(bn_rand.o)
bn_mul_comba4                       ../libcrypto.a(bn_mul.o)
bn_mul_comba8                       ../libcrypto.a(bn_mul.o)
bn_sqr_comba4                       ../libcrypto.a(bn_sqr.o)
bn_sqr_comba8                       ../libcrypto.a(bn_sqr.o)
bn_mul_add_words                    ../libcrypto.a(bn_mul.o)
BIO_puts                            bntest.o
BIO_ctrl                            bntest.o
RAND_pseudo_bytes                   ../libcrypto.a(bn_rand.o)
bn_sub_words                        ../libcrypto.a(bn_mul.o)
bn_sqr_words                        ../libcrypto.a(bn_sqr.o)
bn_mul_words                        ../libcrypto.a(bn_div.o)
BIO_s_file                          bntest.o
ERR_put_error                       ../libcrypto.a(bn_add.o)
RAND_bytes                          ../libcrypto.a(bn_rand.o)
BIO_new                             bntest.o
bn_add_words                        ../libcrypto.a(bn_add.o)
BIO_free                            bntest.o
BIO_write                           ../libcrypto.a(bn_print.o)
ERR_load_crypto_strings             bntest.o
bn_div_words                        ../libcrypto.a(bn_word.o)
ERR_get_error                       bntest.o
ld: fatal: Symbol referencing errors. No output written to bntest
*** Error code 1
make: Fatal error: Command failed for target `bntest'
Current working directory /tmp/openssl-0.9.5a/test
*** Error code 1
make: Fatal error: Command failed for target `tests'
Current working directory /tmp/openssl-0.9.5a
-----------------------------------------------------------------------------

Reply via email to