Problems building openssl on Solaris

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems building openssl on Solaris

Dmitry Belyavsky-3
Hello,

We experience problems building OpenSSL on Solaris.


/usr/local/src/openssl-1.1.0g>uname -a

SunOS pooh.tcinet.ru 5.10 Generic_147147-26 sun4u sparc SUNW,SPARC-Enterprise


/usr/local/src/openssl-1.1.0g>gcc -v

Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6

OpenSSL 1.1.0g is configured via 
./Configure solaris64-sparcv9-gcc

Here is the end of output:

...

LD_LIBRARY_PATH=.:/usr/local/ssl/lib:/usr/sfw/lib/sparcv9:/usr/local/lib gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl" -DENGINESDIR="/usr/local/lib/engines-1.1" -m64 -mcpu=ultrasparc -Wall -DB_ENDIAN -DBN_DIV2W -O3 -pthread -DFILIO_H -o apps/openssl apps/app_rand.o apps/apps.o apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o apps/crl.o apps/crl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o apps/ecparam.o apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o apps/nseq.o apps/ocsp.o apps/openssl.o apps/opt.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o apps/pkcs8.o apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o apps/rehash.o apps/req.o apps/rsa.o apps/rsautl.o apps/s_cb.o apps/s_client.o apps/s_server.o apps/s_socket.o apps/s_time.o apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/ts.o apps/verify.o apps/version.o apps/x509.o -L. -lssl -L. -lcrypto -lsocket -lnsl -ldl
gcc: unrecognized option `-pthread'
ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBEPARAM_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBE2PARAM_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBKDF2PARAM_it: relocation bound to a symbol with STV_PROTECTED visibility
Undefined                       first referenced
 symbol                             in file
_sparcv9_rdtick                     ./libcrypto.so
bn_add_words                        ./libcrypto.so
_sparcv9_vis1_instrument            ./libcrypto.so
bn_sub_words                        ./libcrypto.so
bn_sqr_words                        ./libcrypto.so
OPENSSL_cleanse                     apps/apps.o
_sparcv9_rdcfr                      ./libcrypto.so
_sparcv9_vis1_instrument_bus2       ./libcrypto.so
_sparcv9_vis3_probe                 ./libcrypto.so
bn_mul_words                        ./libcrypto.so
_sparcv9_vis2_probe                 ./libcrypto.so
_sparcv9_vis1_probe                 ./libcrypto.so
ChaCha20_ctr32                      ./libcrypto.so
_sparcv9_vis1_instrument_bus        ./libcrypto.so
bn_mul_comba4                       ./libcrypto.so
bn_mul_comba8                       ./libcrypto.so
bn_sqr_comba4                       ./libcrypto.so
bn_sqr_comba8                       ./libcrypto.so
_sparcv9_fmadd_probe                ./libcrypto.so
CRYPTO_memcmp                       ./libssl.so
bn_mul_add_words                    ./libcrypto.so
bn_div_words                        ./libcrypto.so
_sparcv9_fjaesx_probe               ./libcrypto.so
ld: fatal: symbol referencing errors. No output written to apps/openssl
collect2: ld returned 1 exit status
*** Error code 1

What can we do to fix it?

Thank you!

--
SY, Dmitry Belyavsky

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

Re: Problems building openssl on Solaris

Richard Levitte - VMS Whacker-2
I suggest adding 'no-threads' to the OpenSSL configuration options, at
least as a first step.  That should at least take away gcc's complaint
about '-pthread'...  I cannot say if that'll fix the rest, I don't
know Solaris enough.

Cheers,
Richard

In message <[hidden email]> on Fri, 17 Nov 2017 11:08:34 +0300, Dmitry Belyavsky <[hidden email]> said:

beldmit> Hello,
beldmit>
beldmit> We experience problems building OpenSSL on Solaris.
beldmit>
beldmit> /usr/local/src/openssl-1.1.0g>uname -a
beldmit>
beldmit> SunOS pooh.tcinet.ru 5.10 Generic_147147-26 sun4u sparc SUNW,SPARC-Enterprise
beldmit>
beldmit> /usr/local/src/openssl-1.1.0g>gcc -v
beldmit>
beldmit> Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
beldmit> Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared
beldmit> --enable-languages=c,c++,f77
beldmit> Thread model: posix
beldmit> gcc version 3.4.6
beldmit>
beldmit> OpenSSL 1.1.0g is configured via
beldmit> ./Configure solaris64-sparcv9-gcc
beldmit>
beldmit> Here is the end of output:
beldmit>
beldmit> ...
beldmit>
beldmit> LD_LIBRARY_PATH=.:/usr/local/ssl/lib:/usr/sfw/lib/sparcv9:/usr/local/lib gcc -DDSO_DLFCN
beldmit> -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE
beldmit> -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM
beldmit> -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
beldmit> -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl" -DENGINESDIR="/usr/local/lib/engines-1.1" -m64
beldmit> -mcpu=ultrasparc -Wall -DB_ENDIAN -DBN_DIV2W -O3 -pthread -DFILIO_H -o apps/openssl
beldmit> apps/app_rand.o apps/apps.o apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o apps/crl.o
beldmit> apps/crl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o apps/ecparam.o
beldmit> apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o apps/nseq.o
beldmit> apps/ocsp.o apps/openssl.o apps/opt.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o apps/pkcs8.o
beldmit> apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o apps/rehash.o apps/req.o
beldmit> apps/rsa.o apps/rsautl.o apps/s_cb.o apps/s_client.o apps/s_server.o apps/s_socket.o apps/s_time.o
beldmit> apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/ts.o apps/verify.o
beldmit> apps/version.o apps/x509.o -L. -lssl -L. -lcrypto -lsocket -lnsl -ldl
beldmit> gcc: unrecognized option `-pthread'
beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBEPARAM_it: relocation
beldmit> bound to a symbol with STV_PROTECTED visibility
beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBE2PARAM_it:
beldmit> relocation bound to a symbol with STV_PROTECTED visibility
beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBKDF2PARAM_it:
beldmit> relocation bound to a symbol with STV_PROTECTED visibility
beldmit> Undefined first referenced
beldmit> symbol in file
beldmit> _sparcv9_rdtick ./libcrypto.so
beldmit> bn_add_words ./libcrypto.so
beldmit> _sparcv9_vis1_instrument ./libcrypto.so
beldmit> bn_sub_words ./libcrypto.so
beldmit> bn_sqr_words ./libcrypto.so
beldmit> OPENSSL_cleanse apps/apps.o
beldmit> _sparcv9_rdcfr ./libcrypto.so
beldmit> _sparcv9_vis1_instrument_bus2 ./libcrypto.so
beldmit> _sparcv9_vis3_probe ./libcrypto.so
beldmit> bn_mul_words ./libcrypto.so
beldmit> _sparcv9_vis2_probe ./libcrypto.so
beldmit> _sparcv9_vis1_probe ./libcrypto.so
beldmit> ChaCha20_ctr32 ./libcrypto.so
beldmit> _sparcv9_vis1_instrument_bus ./libcrypto.so
beldmit> bn_mul_comba4 ./libcrypto.so
beldmit> bn_mul_comba8 ./libcrypto.so
beldmit> bn_sqr_comba4 ./libcrypto.so
beldmit> bn_sqr_comba8 ./libcrypto.so
beldmit> _sparcv9_fmadd_probe ./libcrypto.so
beldmit> CRYPTO_memcmp ./libssl.so
beldmit> bn_mul_add_words ./libcrypto.so
beldmit> bn_div_words ./libcrypto.so
beldmit> _sparcv9_fjaesx_probe ./libcrypto.so
beldmit> ld: fatal: symbol referencing errors. No output written to apps/openssl
beldmit> collect2: ld returned 1 exit status
beldmit> *** Error code 1
beldmit>
beldmit> What can we do to fix it?
beldmit>
beldmit> Thank you!
beldmit>
beldmit> --
beldmit> SY, Dmitry Belyavsky
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building openssl on Solaris

Dmitry Belyavsky-3
Dear Richard, 

Adding no-threads just removes gcc complaint about -pthreads. 

On Fri, Nov 17, 2017 at 1:23 PM, Richard Levitte <[hidden email]> wrote:
I suggest adding 'no-threads' to the OpenSSL configuration options, at
least as a first step.  That should at least take away gcc's complaint
about '-pthread'...  I cannot say if that'll fix the rest, I don't
know Solaris enough.

Cheers,
Richard

In message <[hidden email]> on Fri, 17 Nov 2017 11:08:34 +0300, Dmitry Belyavsky <[hidden email]> said:

beldmit> Hello,
beldmit>
beldmit> We experience problems building OpenSSL on Solaris.
beldmit>
beldmit> /usr/local/src/openssl-1.1.0g>uname -a
beldmit>
beldmit> SunOS pooh.tcinet.ru 5.10 Generic_147147-26 sun4u sparc SUNW,SPARC-Enterprise
beldmit>
beldmit> /usr/local/src/openssl-1.1.0g>gcc -v
beldmit>
beldmit> Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
beldmit> Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared
beldmit> --enable-languages=c,c++,f77
beldmit> Thread model: posix
beldmit> gcc version 3.4.6
beldmit>
beldmit> OpenSSL 1.1.0g is configured via
beldmit> ./Configure solaris64-sparcv9-gcc
beldmit>
beldmit> Here is the end of output:
beldmit>
beldmit> ...
beldmit>
beldmit> LD_LIBRARY_PATH=.:/usr/local/ssl/lib:/usr/sfw/lib/sparcv9:/usr/local/lib gcc -DDSO_DLFCN
beldmit> -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE
beldmit> -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM
beldmit> -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
beldmit> -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl" -DENGINESDIR="/usr/local/lib/engines-1.1" -m64
beldmit> -mcpu=ultrasparc -Wall -DB_ENDIAN -DBN_DIV2W -O3 -pthread -DFILIO_H -o apps/openssl
beldmit> apps/app_rand.o apps/apps.o apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o apps/crl.o
beldmit> apps/crl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o apps/ecparam.o
beldmit> apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o apps/nseq.o
beldmit> apps/ocsp.o apps/openssl.o apps/opt.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o apps/pkcs8.o
beldmit> apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o apps/rehash.o apps/req.o
beldmit> apps/rsa.o apps/rsautl.o apps/s_cb.o apps/s_client.o apps/s_server.o apps/s_socket.o apps/s_time.o
beldmit> apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/ts.o apps/verify.o
beldmit> apps/version.o apps/x509.o -L. -lssl -L. -lcrypto -lsocket -lnsl -ldl
beldmit> gcc: unrecognized option `-pthread'
beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBEPARAM_it: relocation
beldmit> bound to a symbol with STV_PROTECTED visibility
beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBE2PARAM_it:
beldmit> relocation bound to a symbol with STV_PROTECTED visibility
beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBKDF2PARAM_it:
beldmit> relocation bound to a symbol with STV_PROTECTED visibility
beldmit> Undefined first referenced
beldmit> symbol in file
beldmit> _sparcv9_rdtick ./libcrypto.so
beldmit> bn_add_words ./libcrypto.so
beldmit> _sparcv9_vis1_instrument ./libcrypto.so
beldmit> bn_sub_words ./libcrypto.so
beldmit> bn_sqr_words ./libcrypto.so
beldmit> OPENSSL_cleanse apps/apps.o
beldmit> _sparcv9_rdcfr ./libcrypto.so
beldmit> _sparcv9_vis1_instrument_bus2 ./libcrypto.so
beldmit> _sparcv9_vis3_probe ./libcrypto.so
beldmit> bn_mul_words ./libcrypto.so
beldmit> _sparcv9_vis2_probe ./libcrypto.so
beldmit> _sparcv9_vis1_probe ./libcrypto.so
beldmit> ChaCha20_ctr32 ./libcrypto.so
beldmit> _sparcv9_vis1_instrument_bus ./libcrypto.so
beldmit> bn_mul_comba4 ./libcrypto.so
beldmit> bn_mul_comba8 ./libcrypto.so
beldmit> bn_sqr_comba4 ./libcrypto.so
beldmit> bn_sqr_comba8 ./libcrypto.so
beldmit> _sparcv9_fmadd_probe ./libcrypto.so
beldmit> CRYPTO_memcmp ./libssl.so
beldmit> bn_mul_add_words ./libcrypto.so
beldmit> bn_div_words ./libcrypto.so
beldmit> _sparcv9_fjaesx_probe ./libcrypto.so
beldmit> ld: fatal: symbol referencing errors. No output written to apps/openssl
beldmit> collect2: ld returned 1 exit status
beldmit> *** Error code 1
beldmit>
beldmit> What can we do to fix it?
beldmit>
beldmit> Thank you!
beldmit>
beldmit> --
beldmit> SY, Dmitry Belyavsky
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev



--
SY, Dmitry Belyavsky

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

Re: Problems building openssl on Solaris

Richard Levitte - VMS Whacker-2
Ah, sorry, I didn't read the output properly.

Regarding the STV_PROTECTED warnings, I don't know at all...  I did a
bit of a search and saw that this has been discussed before, a little
more than a year ago.  See
https://mta.openssl.org/pipermail/openssl-dev/2016-August/008192.html

As for the missing symbols, that tells me something went horribly
wrong when compiling assembler stuff.  The quick fix is to use the
'no-asm' configuration option.  However, if you want to help getting
assembler to compile, I suggest doing this (no configuration change):

    rm crypto/sparccpuid.o
    make build_generated
    make crypto/sparccpuid.o

Have a look at the output, and if you can't figure it out, please send
us that output.

(note: there are other assembler files that seem to fail as well, for
example those for the bignum library, so this is clearly an assembler
issue)

Cheers,
Richard

In message <CADqLbzKz5wU9Jjt746bmfWRt3jM9YeTvArHX=[hidden email]> on Fri, 17 Nov 2017 13:46:31 +0300, Dmitry Belyavsky <[hidden email]> said:

beldmit> Dear Richard,
beldmit>
beldmit> Adding no-threads just removes gcc complaint about -pthreads.
beldmit>
beldmit> On Fri, Nov 17, 2017 at 1:23 PM, Richard Levitte <[hidden email]> wrote:
beldmit>
beldmit>  I suggest adding 'no-threads' to the OpenSSL configuration options, at
beldmit>  least as a first step. That should at least take away gcc's complaint
beldmit>  about '-pthread'... I cannot say if that'll fix the rest, I don't
beldmit>  know Solaris enough.
beldmit>
beldmit>  Cheers,
beldmit>  Richard
beldmit>
beldmit>  In message
beldmit>  <[hidden email]> on Fri, 17
beldmit>  Nov 2017 11:08:34 +0300, Dmitry Belyavsky <[hidden email]> said:
beldmit>
beldmit>  beldmit> Hello,
beldmit>  beldmit>
beldmit>  beldmit> We experience problems building OpenSSL on Solaris.
beldmit>  beldmit>
beldmit>  beldmit> /usr/local/src/openssl-1.1.0g>uname -a
beldmit>  beldmit>
beldmit>  beldmit> SunOS pooh.tcinet.ru 5.10 Generic_147147-26 sun4u sparc SUNW,SPARC-Enterprise
beldmit>  beldmit>
beldmit>  beldmit> /usr/local/src/openssl-1.1.0g>gcc -v
beldmit>  beldmit>
beldmit>  beldmit> Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
beldmit>  beldmit> Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld
beldmit>  --enable-shared
beldmit>  beldmit> --enable-languages=c,c++,f77
beldmit>  beldmit> Thread model: posix
beldmit>  beldmit> gcc version 3.4.6
beldmit>  beldmit>
beldmit>  beldmit> OpenSSL 1.1.0g is configured via
beldmit>  beldmit> ./Configure solaris64-sparcv9-gcc
beldmit>  beldmit>
beldmit>  beldmit> Here is the end of output:
beldmit>  beldmit>
beldmit>  beldmit> ...
beldmit>  beldmit>
beldmit>  beldmit> LD_LIBRARY_PATH=.:/usr/local/ssl/lib:/usr/sfw/lib/sparcv9:/usr/local/lib gcc
beldmit>  -DDSO_DLFCN
beldmit>  beldmit> -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE
beldmit>  beldmit> -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
beldmit>  -DSHA1_ASM
beldmit>  beldmit> -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM
beldmit>  -DECP_NISTZ256_ASM
beldmit>  beldmit> -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl"
beldmit>  -DENGINESDIR="/usr/local/lib/engines-1.1" -m64
beldmit>  beldmit> -mcpu=ultrasparc -Wall -DB_ENDIAN -DBN_DIV2W -O3 -pthread -DFILIO_H -o
beldmit>  apps/openssl
beldmit>  beldmit> apps/app_rand.o apps/apps.o apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o
beldmit>  apps/crl.o
beldmit>  beldmit> apps/crl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o
beldmit>  apps/ecparam.o
beldmit>  beldmit> apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o
beldmit>  apps/nseq.o
beldmit>  beldmit> apps/ocsp.o apps/openssl.o apps/opt.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o
beldmit>  apps/pkcs8.o
beldmit>  beldmit> apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o
beldmit>  apps/rehash.o apps/req.o
beldmit>  beldmit> apps/rsa.o apps/rsautl.o apps/s_cb.o apps/s_client.o apps/s_server.o apps/s_socket.o
beldmit>  apps/s_time.o
beldmit>  beldmit> apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/ts.o
beldmit>  apps/verify.o
beldmit>  beldmit> apps/version.o apps/x509.o -L. -lssl -L. -lcrypto -lsocket -lnsl -ldl
beldmit>  beldmit> gcc: unrecognized option `-pthread'
beldmit>  beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol
beldmit>  PBEPARAM_it: relocation
beldmit>  beldmit> bound to a symbol with STV_PROTECTED visibility
beldmit>  beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol
beldmit>  PBE2PARAM_it:
beldmit>  beldmit> relocation bound to a symbol with STV_PROTECTED visibility
beldmit>  beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol
beldmit>  PBKDF2PARAM_it:
beldmit>  beldmit> relocation bound to a symbol with STV_PROTECTED visibility
beldmit>  beldmit> Undefined first referenced
beldmit>  beldmit> symbol in file
beldmit>  beldmit> _sparcv9_rdtick ./libcrypto.so
beldmit>  beldmit> bn_add_words ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis1_instrument ./libcrypto.so
beldmit>  beldmit> bn_sub_words ./libcrypto.so
beldmit>  beldmit> bn_sqr_words ./libcrypto.so
beldmit>  beldmit> OPENSSL_cleanse apps/apps.o
beldmit>  beldmit> _sparcv9_rdcfr ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis1_instrument_bus2 ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis3_probe ./libcrypto.so
beldmit>  beldmit> bn_mul_words ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis2_probe ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis1_probe ./libcrypto.so
beldmit>  beldmit> ChaCha20_ctr32 ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis1_instrument_bus ./libcrypto.so
beldmit>  beldmit> bn_mul_comba4 ./libcrypto.so
beldmit>  beldmit> bn_mul_comba8 ./libcrypto.so
beldmit>  beldmit> bn_sqr_comba4 ./libcrypto.so
beldmit>  beldmit> bn_sqr_comba8 ./libcrypto.so
beldmit>  beldmit> _sparcv9_fmadd_probe ./libcrypto.so
beldmit>  beldmit> CRYPTO_memcmp ./libssl.so
beldmit>  beldmit> bn_mul_add_words ./libcrypto.so
beldmit>  beldmit> bn_div_words ./libcrypto.so
beldmit>  beldmit> _sparcv9_fjaesx_probe ./libcrypto.so
beldmit>  beldmit> ld: fatal: symbol referencing errors. No output written to apps/openssl
beldmit>  beldmit> collect2: ld returned 1 exit status
beldmit>  beldmit> *** Error code 1
beldmit>  beldmit>
beldmit>  beldmit> What can we do to fix it?
beldmit>  beldmit>
beldmit>  beldmit> Thank you!
beldmit>  beldmit>
beldmit>  beldmit> --
beldmit>  beldmit> SY, Dmitry Belyavsky
beldmit>  --
beldmit>  openssl-dev mailing list
beldmit>  To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
beldmit>
beldmit> --
beldmit> SY, Dmitry Belyavsky
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building openssl on Solaris

OpenSSL - Dev mailing list
In reply to this post by Dmitry Belyavsky-3
I tested 1.1.0g on my solaris10 sparc machine and it worked
fine, but I use opencsw packages with a more modern gcc (4.9.2).

Essentially my build environment and build looks like this:

# Install packages from opencsw
pkgadd -d http://get.opencsw.org/now            && \
/opt/csw/bin/pkgutil -U                         && \
/opt/csw/bin/pkgutil -y -i bash                 && \
/opt/csw/bin/pkgutil -y -i nano                 && \
/opt/csw/bin/pkgutil -y -i bzip2                && \
/opt/csw/bin/pkgutil -y -i gtar                 && \
/opt/csw/bin/pkgutil -y -i ggrep                && \
/opt/csw/bin/pkgutil -y -i gsed                 && \
/opt/csw/bin/pkgutil -y -i gpatch               && \
/opt/csw/bin/pkgutil -y -i wget                 && \
/opt/csw/bin/pkgutil -y -i perl                 && \
/opt/csw/bin/pkgutil -y -i top                  && \
/opt/csw/bin/pkgutil -y -i gmake                && \
/opt/csw/bin/pkgutil -y -i gcc4g++              && \
/opt/csw/bin/pkgutil -y -i gdb                  && \
/opt/csw/bin/pkgutil -y -i python               && \
/opt/csw/bin/pkgutil -y -i cmake                && \
mkdir -p /usr/local/bin                         && \
ln -sf /opt/csw/bin/gtar   /usr/local/bin/tar   && \
ln -sf /opt/csw/bin/bash   /usr/local/bin/bash  && \
ln -sf /opt/csw/bin/ggrep  /usr/local/bin/grep  && \
ln -sf /opt/csw/bin/gsed   /usr/local/bin/sed   && \
ln -sf /opt/csw/bin/gmake  /usr/local/bin/make  && \
ln -sf /opt/csw/bin/gpatch /usr/local/bin/patch

# Start a Bash shell
/opt/csw/bin/bash

# Set up environment
export PATH=/opt/csw/bin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/X/bin:/usr/ccs/bin
export LD_LIBRARY_PATH=/opt/csw/lib:/opt/csw/lib/64:/usr/sfw/lib
export LD_LIBRARY_PATH_64=$LD_LIBRARY_PATH

# build and install openssl 1.1.0g
wget https://www.openssl.org/source/openssl-1.1.0g.tar.gz && \
tar -zxvpf openssl-1.1.0g.tar.gz && \
cd openssl-1.1.0g && \
KERNEL_BITS=64 ./config --prefix=/usr/local/ssl-1.1.0g && \
make && \
make install

# Verify
LD_LIBRARY_PATH_64=/usr/local/ssl-1.1.0g/lib:$LD_LIBRARY_PATH_64 /usr/local/ssl-1.1.0g/bin/openssl version
OpenSSL 1.1.0g  2 Nov 2017



On 11/17/17 5:46 AM, Dmitry Belyavsky wrote:

> Dear Richard,
>
> Adding no-threads just removes gcc complaint about -pthreads.
>
> On Fri, Nov 17, 2017 at 1:23 PM, Richard Levitte <[hidden email] <mailto:[hidden email]>> wrote:
>
>     I suggest adding 'no-threads' to the OpenSSL configuration options, at
>     least as a first step.  That should at least take away gcc's complaint
>     about '-pthread'...  I cannot say if that'll fix the rest, I don't
>     know Solaris enough.
>
>     Cheers,
>     Richard
>
>     In message <[hidden email]
>     <mailto:CADqLbzKeQXGaFWGGAz5GyrQP9XGEwjfj2fVTkLN9sRNReJ%[hidden email]>> on Fri, 17 Nov 2017 11:08:34 +0300,
>     Dmitry Belyavsky <[hidden email] <mailto:[hidden email]>> said:
>
>     beldmit> Hello,
>     beldmit>
>     beldmit> We experience problems building OpenSSL on Solaris.
>     beldmit>
>     beldmit> /usr/local/src/openssl-1.1.0g>uname -a
>     beldmit>
>     beldmit> SunOS pooh.tcinet.ru <http://pooh.tcinet.ru> 5.10 Generic_147147-26 sun4u sparc SUNW,SPARC-Enterprise
>     beldmit>
>     beldmit> /usr/local/src/openssl-1.1.0g>gcc -v
>     beldmit>
>     beldmit> Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
>     beldmit> Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared
>     beldmit> --enable-languages=c,c++,f77
>     beldmit> Thread model: posix
>     beldmit> gcc version 3.4.6
>     beldmit>
>     beldmit> OpenSSL 1.1.0g is configured via
>     beldmit> ./Configure solaris64-sparcv9-gcc
>     beldmit>
>     beldmit> Here is the end of output:
>     beldmit>
>     beldmit> ...
>     beldmit>
>     beldmit> LD_LIBRARY_PATH=.:/usr/local/ssl/lib:/usr/sfw/lib/sparcv9:/usr/local/lib gcc -DDSO_DLFCN
>     beldmit> -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE
>     beldmit> -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM
>     beldmit> -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
>     beldmit> -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl" -DENGINESDIR="/usr/local/lib/engines-1.1" -m64
>     beldmit> -mcpu=ultrasparc -Wall -DB_ENDIAN -DBN_DIV2W -O3 -pthread -DFILIO_H -o apps/openssl
>     beldmit> apps/app_rand.o apps/apps.o apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o apps/crl.o
>     beldmit> apps/crl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o apps/ecparam.o
>     beldmit> apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o apps/nseq.o
>     beldmit> apps/ocsp.o apps/openssl.o apps/opt.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o apps/pkcs8.o
>     beldmit> apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o apps/rehash.o apps/req.o
>     beldmit> apps/rsa.o apps/rsautl.o apps/s_cb.o apps/s_client.o apps/s_server.o apps/s_socket.o apps/s_time.o
>     beldmit> apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/ts.o apps/verify.o
>     beldmit> apps/version.o apps/x509.o -L. -lssl -L. -lcrypto -lsocket -lnsl -ldl
>     beldmit> gcc: unrecognized option `-pthread'
>     beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBEPARAM_it: relocation
>     beldmit> bound to a symbol with STV_PROTECTED visibility
>     beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBE2PARAM_it:
>     beldmit> relocation bound to a symbol with STV_PROTECTED visibility
>     beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol PBKDF2PARAM_it:
>     beldmit> relocation bound to a symbol with STV_PROTECTED visibility
>     beldmit> Undefined first referenced
>     beldmit> symbol in file
>     beldmit> _sparcv9_rdtick ./libcrypto.so
>     beldmit> bn_add_words ./libcrypto.so
>     beldmit> _sparcv9_vis1_instrument ./libcrypto.so
>     beldmit> bn_sub_words ./libcrypto.so
>     beldmit> bn_sqr_words ./libcrypto.so
>     beldmit> OPENSSL_cleanse apps/apps.o
>     beldmit> _sparcv9_rdcfr ./libcrypto.so
>     beldmit> _sparcv9_vis1_instrument_bus2 ./libcrypto.so
>     beldmit> _sparcv9_vis3_probe ./libcrypto.so
>     beldmit> bn_mul_words ./libcrypto.so
>     beldmit> _sparcv9_vis2_probe ./libcrypto.so
>     beldmit> _sparcv9_vis1_probe ./libcrypto.so
>     beldmit> ChaCha20_ctr32 ./libcrypto.so
>     beldmit> _sparcv9_vis1_instrument_bus ./libcrypto.so
>     beldmit> bn_mul_comba4 ./libcrypto.so
>     beldmit> bn_mul_comba8 ./libcrypto.so
>     beldmit> bn_sqr_comba4 ./libcrypto.so
>     beldmit> bn_sqr_comba8 ./libcrypto.so
>     beldmit> _sparcv9_fmadd_probe ./libcrypto.so
>     beldmit> CRYPTO_memcmp ./libssl.so
>     beldmit> bn_mul_add_words ./libcrypto.so
>     beldmit> bn_div_words ./libcrypto.so
>     beldmit> _sparcv9_fjaesx_probe ./libcrypto.so
>     beldmit> ld: fatal: symbol referencing errors. No output written to apps/openssl
>     beldmit> collect2: ld returned 1 exit status
>     beldmit> *** Error code 1
>     beldmit>
>     beldmit> What can we do to fix it?
>     beldmit>
>     beldmit> Thank you!
>     beldmit>
>     beldmit> --
>     beldmit> SY, Dmitry Belyavsky
>     --
>     openssl-dev mailing list
>     To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
>     <https://mta.openssl.org/mailman/listinfo/openssl-dev>
>
>
>
>
> --
> SY, Dmitry Belyavsky
>
>
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building openssl on Solaris

Dmitry Belyavsky-3
In reply to this post by Richard Levitte - VMS Whacker-2
Hello, 

On Fri, Nov 17, 2017 at 2:21 PM, Richard Levitte <[hidden email]> wrote:
Ah, sorry, I didn't read the output properly.

Regarding the STV_PROTECTED warnings, I don't know at all...  I did a
bit of a search and saw that this has been discussed before, a little
more than a year ago.  See
https://mta.openssl.org/pipermail/openssl-dev/2016-August/008192.html

As for the missing symbols, that tells me something went horribly
wrong when compiling assembler stuff.  The quick fix is to use the
'no-asm' configuration option.  However, if you want to help getting
assembler to compile, I suggest doing this (no configuration change):

    rm crypto/sparccpuid.o
    make build_generated
    make crypto/sparccpuid.o

No errors.
 
(note: there are other assembler files that seem to fail as well, for
example those for the bignum library, so this is clearly an assembler
issue)

Sure...
 

Cheers,
Richard

In message <CADqLbzKz5wU9Jjt746bmfWRt3jM9YeTvArHX=[hidden email]> on Fri, 17 Nov 2017 13:46:31 +0300, Dmitry Belyavsky <[hidden email]> said:

beldmit> Dear Richard,
beldmit>
beldmit> Adding no-threads just removes gcc complaint about -pthreads.
beldmit>
beldmit> On Fri, Nov 17, 2017 at 1:23 PM, Richard Levitte <[hidden email]> wrote:
beldmit>
beldmit>  I suggest adding 'no-threads' to the OpenSSL configuration options, at
beldmit>  least as a first step. That should at least take away gcc's complaint
beldmit>  about '-pthread'... I cannot say if that'll fix the rest, I don't
beldmit>  know Solaris enough.
beldmit>
beldmit>  Cheers,
beldmit>  Richard
beldmit>
beldmit>  In message
beldmit>  <[hidden email]> on Fri, 17
beldmit>  Nov 2017 11:08:34 +0300, Dmitry Belyavsky <[hidden email]> said:
beldmit>
beldmit>  beldmit> Hello,
beldmit>  beldmit>
beldmit>  beldmit> We experience problems building OpenSSL on Solaris.
beldmit>  beldmit>
beldmit>  beldmit> /usr/local/src/openssl-1.1.0g>uname -a
beldmit>  beldmit>
beldmit>  beldmit> SunOS pooh.tcinet.ru 5.10 Generic_147147-26 sun4u sparc SUNW,SPARC-Enterprise
beldmit>  beldmit>
beldmit>  beldmit> /usr/local/src/openssl-1.1.0g>gcc -v
beldmit>  beldmit>
beldmit>  beldmit> Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
beldmit>  beldmit> Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld
beldmit>  --enable-shared
beldmit>  beldmit> --enable-languages=c,c++,f77
beldmit>  beldmit> Thread model: posix
beldmit>  beldmit> gcc version 3.4.6
beldmit>  beldmit>
beldmit>  beldmit> OpenSSL 1.1.0g is configured via
beldmit>  beldmit> ./Configure solaris64-sparcv9-gcc
beldmit>  beldmit>
beldmit>  beldmit> Here is the end of output:
beldmit>  beldmit>
beldmit>  beldmit> ...
beldmit>  beldmit>
beldmit>  beldmit> LD_LIBRARY_PATH=.:/usr/local/ssl/lib:/usr/sfw/lib/sparcv9:/usr/local/lib gcc
beldmit>  -DDSO_DLFCN
beldmit>  beldmit> -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE
beldmit>  beldmit> -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
beldmit>  -DSHA1_ASM
beldmit>  beldmit> -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM
beldmit>  -DECP_NISTZ256_ASM
beldmit>  beldmit> -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl"
beldmit>  -DENGINESDIR="/usr/local/lib/engines-1.1" -m64
beldmit>  beldmit> -mcpu=ultrasparc -Wall -DB_ENDIAN -DBN_DIV2W -O3 -pthread -DFILIO_H -o
beldmit>  apps/openssl
beldmit>  beldmit> apps/app_rand.o apps/apps.o apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o
beldmit>  apps/crl.o
beldmit>  beldmit> apps/crl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o
beldmit>  apps/ecparam.o
beldmit>  beldmit> apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o
beldmit>  apps/nseq.o
beldmit>  beldmit> apps/ocsp.o apps/openssl.o apps/opt.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o
beldmit>  apps/pkcs8.o
beldmit>  beldmit> apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o
beldmit>  apps/rehash.o apps/req.o
beldmit>  beldmit> apps/rsa.o apps/rsautl.o apps/s_cb.o apps/s_client.o apps/s_server.o apps/s_socket.o
beldmit>  apps/s_time.o
beldmit>  beldmit> apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/ts.o
beldmit>  apps/verify.o
beldmit>  beldmit> apps/version.o apps/x509.o -L. -lssl -L. -lcrypto -lsocket -lnsl -ldl
beldmit>  beldmit> gcc: unrecognized option `-pthread'
beldmit>  beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol
beldmit>  PBEPARAM_it: relocation
beldmit>  beldmit> bound to a symbol with STV_PROTECTED visibility
beldmit>  beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol
beldmit>  PBE2PARAM_it:
beldmit>  beldmit> relocation bound to a symbol with STV_PROTECTED visibility
beldmit>  beldmit> ld: warning: relocation warning: R_SPARC_COPY: file ./libcrypto.so: symbol
beldmit>  PBKDF2PARAM_it:
beldmit>  beldmit> relocation bound to a symbol with STV_PROTECTED visibility
beldmit>  beldmit> Undefined first referenced
beldmit>  beldmit> symbol in file
beldmit>  beldmit> _sparcv9_rdtick ./libcrypto.so
beldmit>  beldmit> bn_add_words ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis1_instrument ./libcrypto.so
beldmit>  beldmit> bn_sub_words ./libcrypto.so
beldmit>  beldmit> bn_sqr_words ./libcrypto.so
beldmit>  beldmit> OPENSSL_cleanse apps/apps.o
beldmit>  beldmit> _sparcv9_rdcfr ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis1_instrument_bus2 ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis3_probe ./libcrypto.so
beldmit>  beldmit> bn_mul_words ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis2_probe ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis1_probe ./libcrypto.so
beldmit>  beldmit> ChaCha20_ctr32 ./libcrypto.so
beldmit>  beldmit> _sparcv9_vis1_instrument_bus ./libcrypto.so
beldmit>  beldmit> bn_mul_comba4 ./libcrypto.so
beldmit>  beldmit> bn_mul_comba8 ./libcrypto.so
beldmit>  beldmit> bn_sqr_comba4 ./libcrypto.so
beldmit>  beldmit> bn_sqr_comba8 ./libcrypto.so
beldmit>  beldmit> _sparcv9_fmadd_probe ./libcrypto.so
beldmit>  beldmit> CRYPTO_memcmp ./libssl.so
beldmit>  beldmit> bn_mul_add_words ./libcrypto.so
beldmit>  beldmit> bn_div_words ./libcrypto.so
beldmit>  beldmit> _sparcv9_fjaesx_probe ./libcrypto.so
beldmit>  beldmit> ld: fatal: symbol referencing errors. No output written to apps/openssl
beldmit>  beldmit> collect2: ld returned 1 exit status
beldmit>  beldmit> *** Error code 1
beldmit>  beldmit>
beldmit>  beldmit> What can we do to fix it?
beldmit>  beldmit>
beldmit>  beldmit> Thank you!
beldmit>  beldmit>
beldmit>  beldmit> --
beldmit>  beldmit> SY, Dmitry Belyavsky
beldmit>  --
beldmit>  openssl-dev mailing list
beldmit>  To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
beldmit>
beldmit> --
beldmit> SY, Dmitry Belyavsky
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev



--
SY, Dmitry Belyavsky

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