www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dub run with flags to openSSL 1.1.1l

reply igrik <igrik1987 gmail.com> writes:
Hello!

I have a problem. My project was created for openssl v1.1.1. Both 
openssl v1.1.1 and v3.0.7(main) are installed on ubuntu 22.04 
LTS. I get an error when compiling the application: (dub run ore 
dub build)

[code]
dub/packages/vibe-d-0.9.2/vibe-d/tls/vibe/stream/openssl.d:1373: 
undefined reference to «ERR_put_error»
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/usr/bin/dmd failed with exit code 1.
[/code]

[code]
igrik igrikpc:~$ /usr/local/ssl/bin/openssl <<< version
OpenSSL> OpenSSL 1.1.1l  24 Aug 2021

igrik igrikpc:~$ openssl version
OpenSSL 3.0.7 1 Nov 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
[/code]


I understand that you need to specify compiler flags. Which flags 
should be specified? How to do it? Please help.

[b]PS:[/b]
Ubuntu 22.04 LTS.
Openssl v.1.1l and v3.0.7(main)
Dmd v2.096.0
Nov 12 2022
parent Vladimir Panteleev <thecybershadow.lists gmail.com> writes:
On Sunday, 13 November 2022 at 05:59:34 UTC, igrik wrote:
 Hello!

 I have a problem. My project was created for openssl v1.1.1. 
 Both openssl v1.1.1 and v3.0.7(main) are installed on ubuntu 
 22.04 LTS. I get an error when compiling the application: (dub 
 run ore dub build)
This may be a bug with the [D OpenSSL bindings](https://github.com/D-Programming-Deimos/openssl) (specifically the definition of `ERR_put_error`). (Unfortunately many such bugs are difficult to avoid because OpenSSL keeps changing which functions are macros and which need to be linked across OpenSSL versions.)
Nov 13 2022