Re: Assistance building curl 7.77.0 with OpenSSL 3.0

2021-08-22 Thread Dennis Clarke via curl-library
On 8/21/21 12:33, Randall S. Becker via curl-library wrote:
> On August 21, 2021 5:35 AM, Daniel Stenberg wrote:
>> On Fri, 20 Aug 2021, Randall S. Becker via curl-library wrote:
>>
>>> My latest configure command for OpenSSL 3.0 is:
>>>
>>> CFLAGS="-c99" CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -Wlp64 -WIEEE_float
>>> -I/usr/local-ssl3.0/openssl/include" LDFLAGS="-L/usr/local-ssl3.0/lib"
>>> conf_script_floss_cc --with-ssl=/usr/local-ssl3.0 --disable-pthreads
>>> --disable-threaded-resolver --enable-ipv6'
>>

I had no issues on ye old Fujitsu SPARC64 :

beta $ curl --version
curl 7.78.0 (sparc64-sun-solaris2.10) libcurl/7.78.0 OpenSSL/3.0.0
zlib/1.2.11 libidn2/2.3.0 libssh2/1.9.0
Release-Date: 2021-07-21
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap
ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTPS-proxy IDN IPv6 Largefile libz
NTLM NTLM_WB SSL TLS-SRP UnixSockets
beta $

>> On 64 bit systems, OpenSSL doesn't make a 'lib' anymore. It uses lib64 only 
>> ..


Yep, I saw that and it is annoying. Trivial to just move the resultant
target libs around after install however. Just be careful of the
RPATH/RUNPATH data in your final ELF objects.


>> (and no, I don't know why they decided this). 

Line forms on the left behind me. I have no clue why either :\

Try moving the final libssl/libcrypto shared objects into a nice
comfortable lib directory and then re-do the curl config. Worth a try.


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

RE: Assistance building curl 7.77.0 with OpenSSL 3.0

2021-08-21 Thread Randall S. Becker via curl-library
On August 21, 2021, Daniel Stenberg wrote:
>On Sat, 21 Aug 2021, Randall S. Becker wrote:
>
>> The OpenSSL build is definitely 64 bit - I know because I did the
>> build/install about 2 weeks ago. If I leave off the -Wlp64, the linker
>> complains about mixing 64 (openssl) and 32 models (curl) during the
>> configure phase claiming it can't find openssl.
>
>Using -Wlp64 is a mistake. It would simplify if you dropped all custom flags 
>and then showed us what fails.

Using -Wlp64 triggers a 64-bit build, which is not the default on the platform. 
OpenSSL is also not in /usr/local/lib, so that
messes things up a bit. However, I will grant that it may be easier to do a 
32-bit build so will try that. I will need a 32-bit
build of OpenSSL 3 also, so will report back in a few days once that is 
installed.

Thanks,
Randall

---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

RE: Assistance building curl 7.77.0 with OpenSSL 3.0

2021-08-21 Thread Daniel Stenberg via curl-library

On Sat, 21 Aug 2021, Randall S. Becker wrote:

The OpenSSL build is definitely 64 bit - I know because I did the 
build/install about 2 weeks ago. If I leave off the -Wlp64, the linker 
complains about mixing 64 (openssl) and 32 models (curl) during the 
configure phase claiming it can't find openssl.


Using -Wlp64 is a mistake. It would simplify if you dropped all custom flags 
and then showed us what fails.


--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

RE: Assistance building curl 7.77.0 with OpenSSL 3.0

2021-08-21 Thread Randall S. Becker via curl-library
On August 21, 2021 5:35 AM, Daniel Stenberg wrote:
>On Fri, 20 Aug 2021, Randall S. Becker via curl-library wrote:
>
>> My latest configure command for OpenSSL 3.0 is:
>>
>> CFLAGS="-c99" CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -Wlp64 -WIEEE_float
>> -I/usr/local-ssl3.0/openssl/include" LDFLAGS="-L/usr/local-ssl3.0/lib"
>> conf_script_floss_cc --with-ssl=/usr/local-ssl3.0 --disable-pthreads
>> --disable-threaded-resolver --enable-ipv6'
>
>On 64 bit systems, OpenSSL doesn't make a 'lib' anymore. It uses lib64 only 
>(and no, I don't know why they decided this). My custom
>OpenSSL 3 install dir:
>
>$ ls ~/build-openssl/
>bin  include  lib64  share  ssl
>
>This breaks old curl configure scripts but the current one is adapted and I 
>build with OpenSSL 3 fine and we have a CI job doing it
as well.
>
>My configure line for this needs nothing special:
>
>   ./configure --with-ssl=$HOME/build-openssl
>
>... even if I also usually set LDFLAGS="-Wl,-rpath,$HOME/build-openssl/lib64"
>to make it co-exist with other OpenSSL installs better.

Also, it looks like configure is mis-identifying OpenSSL 3 anyway:

configure:24609: cpp -D_XOPEN_SOURCE_EXTENDED=1 -Wlp64 -WIEEE_float -I/usr/local
-ssl3.0/openssl/include -I/usr/local-ssl3.0/include -I/usr/local-ssl3.0/include/
openssl -DOPENSSL_SUPPRESS_DEPRECATED  conftest.c
configure:24609: $? = 0
configure:24671: result: unknown - ( (3<<28) |(0<<20) |(0<<4) |0x0L )
configure:24680: checking for OpenSSL library version

The result should be 3.0.0 - and appears to be. OpenSSL changed how the release 
defines work, so maybe this is not a surprise.

---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

RE: Assistance building curl 7.77.0 with OpenSSL 3.0

2021-08-21 Thread Randall S. Becker via curl-library
On August 21, 2021 5:35 AM, Daniel Stenberg wrote:
>On Fri, 20 Aug 2021, Randall S. Becker via curl-library wrote:
>
>> My latest configure command for OpenSSL 3.0 is:
>>
>> CFLAGS="-c99" CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -Wlp64 -WIEEE_float
>> -I/usr/local-ssl3.0/openssl/include" LDFLAGS="-L/usr/local-ssl3.0/lib"
>> conf_script_floss_cc --with-ssl=/usr/local-ssl3.0 --disable-pthreads
>> --disable-threaded-resolver --enable-ipv6'
>
>On 64 bit systems, OpenSSL doesn't make a 'lib' anymore. It uses lib64 only 
>(and no, I don't know why they decided this). My custom
>OpenSSL 3 install dir:
>
>$ ls ~/build-openssl/
>bin  include  lib64  share  ssl
>
>This breaks old curl configure scripts but the current one is adapted and I 
>build with OpenSSL 3 fine and we have a CI job doing it
as well.
>
>My configure line for this needs nothing special:
>
>   ./configure --with-ssl=$HOME/build-openssl
>
>... even if I also usually set LDFLAGS="-Wl,-rpath,$HOME/build-openssl/lib64"
>to make it co-exist with other OpenSSL installs better.

I don't see the same thing - and there is no lib64 directory in OpenSSL 3 
anywhere. Using OpenSSL 3.0.0 beta2, my directory is as
follows:

/usr/local-ssl3.0: ls lib
engines-3libcrypto.so  libssl.so pkgconfig
libcrypto.a  libssl.a  ossl-modules

The OpenSSL build is definitely 64 bit - I know because I did the build/install 
about 2 weeks ago. If I leave off the -Wlp64, the
linker complains about mixing 64 (openssl) and 32 models (curl) during the 
configure phase claiming it can't find openssl.

This is really perplexing.

Randall

---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Re: Assistance building curl 7.77.0 with OpenSSL 3.0

2021-08-21 Thread Daniel Stenberg via curl-library

On Fri, 20 Aug 2021, Randall S. Becker via curl-library wrote:


My latest configure command for OpenSSL 3.0 is:

CFLAGS="-c99" CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -Wlp64 -WIEEE_float 
-I/usr/local-ssl3.0/openssl/include" LDFLAGS="-L/usr/local-ssl3.0/lib" 
conf_script_floss_cc --with-ssl=/usr/local-ssl3.0 --disable-pthreads 
--disable-threaded-resolver --enable-ipv6'


On 64 bit systems, OpenSSL doesn't make a 'lib' anymore. It uses lib64 only 
(and no, I don't know why they decided this). My custom OpenSSL 3 install dir:


$ ls ~/build-openssl/
bin  include  lib64  share  ssl

This breaks old curl configure scripts but the current one is adapted and I 
build with OpenSSL 3 fine and we have a CI job doing it as well.


My configure line for this needs nothing special:

  ./configure --with-ssl=$HOME/build-openssl

... even if I also usually set LDFLAGS="-Wl,-rpath,$HOME/build-openssl/lib64" 
to make it co-exist with other OpenSSL installs better.


--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html