PR# 19514 C linking fails on applications using openssl1.1.1a

Problem Report Summary
Submitter: markghoward
Category: C Compilation
Priority: High
Date: 2019/01/27
Class: Bug
Severity: Critical
Number: 19514
Release: 18.11
Confidential: No
Status: Analyzed
Responsible: jvelilla
Environment: mac
Synopsis: C linking fails on applications using openssl1.1.1a

Description
Apparently openssl1.1.1a no longer needs to be initialized...if I comment out all of the initializations in SSL_SHARED (and their c externals) then my application will link.  I then get a segmentation violation on the first call to c_ssl_ctx_new, which seems to be the expected behavior if things are not initialized...if I don't comment them out then I get link errors missing openssl_init_ssl, etc. This is using a new installation of opensslI ... I removed all vestiges of the old one.
To Reproduce
compile an Eiffel system using openssl1.1.1a (although I have only built it on a Mac, so could be specific)
Problem Report Interactions
From:jvelilla    Date:2019/01/28    Status: Analyzed    Download   
I will check, I've configured a VirtualBox with MacOS to check how to reproduce the issue and find a solution
I know some features are deprecated but they are still part of the code, now sure why on Mac they are undefined.

Can you let me know how did you install OpenSSL on Mac?

From:markghoward    Date:2019/01/28    Status: Open    Download   
Looks like it works now, but not as shipped...DYLD_LIBRARY_PATH is not exported to child processes on Mac anymore for security reasons, hence XQuartz doesn't get it, so it looks like you need some other way to link the libraries than in clib_openssl which just uses -lssl and -lcrypto.  Also the other externals in SSL_SHARED don't seem to exist anymore and commenting them out did not seem to break anything.

From:markghoward    Date:2019/01/28    Status: Open    Download   
ok seem to have fixed (some) things by linking explicitly to the libssl.a and libcrypto.a (need to figure out why) and commenting out crypto and ssl load externals ... only need OPENSSL_init_ssl apparently ... at least I no longer get the undefined symbol or the segmentation violation ... will see if it actually works now

From:markghoward    Date:2019/01/28    Status: Open    Download   
Incidentally the error is 
Undefined symbols for architecture x86_64:
  "_OPENSSL_init_ssl", referenced from: