[SOLVED] FreeBSD 12.0 - TFPHttpClient -OpenSSL- Access violation lazarus / 36-Other ---------------------------------------------------------------------- trev · 2019-07-02 10:26 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function GetWebPage(const aURL: string): string;var  Client: TFPHttpClient;begin  Client := TFPHttpClient.Create(nil);   Try    Client.AllowRedirect := true;    Client.AddHeader('User-Agent', 'Mozilla/5.0(compatible; fpweb)');    Result := Client.Get(aURL);  except      on E: Exception do           ShowMessage('Retrieval of: ' + aURL + LineEnding                    + 'Failed with error: ' + E.Message + LineEnding                    + 'HTTP code: ' + IntToSTr(Client.ResponseStatusCode));  end;end;  The above code results in the attached 'Access Violatioin' error dialog. After much hair pulling I can no longer afford, I tracked the cause down to trying to make an HTTPS connection. HTTP connections work without error. Yes, I have openssl installed (it's part of the FreeBSD 'base' code): Code: [Select]trev@macfbsd [/home/trev] $ ldconfig -r | grep '[st][ls][ls]'         103:-lssl.111 => /usr/lib/libssl.so.111         394:-lgnutlsxx.28 => /usr/local/lib/libgnutlsxx.so.28         397:-lgnutls.30 => /usr/local/lib/libgnutls.so.30         419:-levent_openssl-2.1.6 => /usr/local/lib/libevent_openssl-2.1.so.6         540:-lssl.5 => /usr/local/lib/compat/libssl.so.5 trev@macfbsd [/home/trev] $ ldconfig -r | grep crypto         39:-lcrypto.111 => /lib/libcrypto.so.111         477:-lcrypto.5 => /usr/local/lib/compat/libcrypto.so.5 And I have the FPC openssl unit installed: Code: [Select]trev@macfbsd [/home/trev] $ pkg info | grep -i openssl fpc-openssl-3.0.4              Free Pascal unit for OpenSSL FPC 3.04; Lazarus 2.0 (from FreeBSD ports). Any ideas why Lazarus/FPC cannot seem to find the openssl libraries which I'm assuming from my research is the underlying issue? (The same code works for macOS.) ---------------------------------------------------------------------- rsz · 2019-07-02 10:39 It's probably related to this nasty bug: https://bugs.freepascal.org/view.php?id=32789 I can't say for FreeBSD, but building and installing the latest FPC and Lazarus solved the issue for me on Ubuntu 19.04. ---------------------------------------------------------------------- trev · 2019-07-02 10:48 Thanks rsz, I'll give it a go and see what happens. ---------------------------------------------------------------------- trev · 2019-07-18 01:49 Yes! Updating to FPC 3.3.1 and adding the OpenSSLSockets unit to the project was the solution. Thanks again rsz.