Re: [openssl-dev] Problems building openssl on Solaris

2017-11-17 Thread Dmitry Belyavsky
Hello,

On Fri, Nov 17, 2017 at 2:21 PM, Richard Levitte 
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 

Re: [openssl-dev] Problems building openssl on Solaris

2017-11-17 Thread Brad House via openssl-dev

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 > 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 
> 
on Fri, 17 Nov 2017 11:08:34 +0300,
Dmitry Belyavsky > 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 

Re: [openssl-dev] Problems building openssl on Solaris

2017-11-17 Thread Richard Levitte
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 

Re: [openssl-dev] Problems building openssl on Solaris

2017-11-17 Thread Dmitry Belyavsky
Dear Richard,

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

On Fri, Nov 17, 2017 at 1:23 PM, Richard Levitte 
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  gmail.com> on Fri, 17 Nov 2017 11:08:34 +0300, Dmitry Belyavsky <
> beld...@gmail.com> 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


Re: [openssl-dev] Problems building openssl on Solaris

2017-11-17 Thread Richard Levitte
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  
on Fri, 17 Nov 2017 11:08:34 +0300, Dmitry Belyavsky  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