While I agree that this approach fixes the current issues with OpenSSL on OS/X, this way to fix problems doesn’t scale… This makes OpenSSL the highest priority library in the library order, while each of the dependencies (including many platform specific libraries) may have a similar ordering problem. We can’t prioritize each of them above everything else.
This problem *should* be fixed at a different layer, to do this properly… Too bad in this case we would have to convince Apple to apply the fix, which makes it very unlikely to be fixed. I really don’t know what we should do here… Bert Sent from Mail for Windows 10 From: C. Michael Pilato Sent: zaterdag 23 april 2016 19:48 To: Branko Čibej Cc: dev@serf.apache.org Subject: Re: Overriding the location of OpenSSL I haven't tested the patch, but the logic makes sense to me. On Apr 23, 2016 1:26 PM, "Branko Čibej" <br...@apache.org> wrote: > Hmmm ... is this thing on? > > On 07.04.2016 15:29, Branko Čibej wrote: > > [The following was observed on Mac OS X, but I believe it applies to any > > platform.] > > > > I've been building Serf 1.3.8 on OSX for a while (as part of a > > closed-source project). Recently I noticed that the shared lib refers to > > the system default OpenSSL (0.9.8f) instead of the one installed by > > Homebrew (1.0.2g). That made me a bit unhappy because I'd explicitly > > told the Scons about the path to Homebrew's OpenSSL. > > > > The really scary part is that I don't have the 0.9.8f headers anywhere > > in /usr/include; just the shared libs in /usr/lib. > > > > After rummaging in SConstruct, I came up with the following patch for > > 1.3.8 which fixes the problem for me on OSX and also continues to work > > on Linux; I did not try to build on Windows, but can't see any reason > > why it wouldn't work. > > > > Assuming everyone agrees this is the correct approach, I'll create > > patches for trunk and the 1.3.x branch. > > > > -- Brane > > > > [[[ > > Put OpenSSL include and library paths first in their respective lists > > to make sure the compiler and linker find the requested versions. > > ]]] > > > > [[[ > > Index: SConstruct > > =================================================================== > > --- SConstruct (revision 1487) > > +++ SConstruct (working copy) > > @@ -318,14 +318,14 @@ if sys.platform == 'win32': > > # openssl > > env.Append(LIBS=['libeay32.lib', 'ssleay32.lib']) > > if not env.get('SOURCE_LAYOUT', None): > > - env.Append(CPPPATH='$OPENSSL/include/openssl', > > - LIBPATH='$OPENSSL/lib') > > + env.Prepend(CPPPATH='$OPENSSL/include/openssl', > > + LIBPATH='$OPENSSL/lib') > > elif 0: # opensslstatic: > > - env.Append(CPPPATH='$OPENSSL/inc32', > > - LIBPATH='$OPENSSL/out32') > > + env.Prepend(CPPPATH='$OPENSSL/inc32', > > + LIBPATH='$OPENSSL/out32') > > else: > > - env.Append(CPPPATH='$OPENSSL/inc32', > > - LIBPATH='$OPENSSL/out32dll') > > + env.Prepend(CPPPATH='$OPENSSL/inc32', > > + LIBPATH='$OPENSSL/out32dll') > > else: > > if os.path.isdir(apr): > > apr = os.path.join(apr, 'bin', 'apr-1-config') > > @@ -351,8 +351,8 @@ else: > > apr_libs = '' > > apu_libs = '' > > > > - env.Append(CPPPATH='$OPENSSL/include') > > - env.Append(LIBPATH='$OPENSSL/lib') > > + env.Prepend(CPPPATH='$OPENSSL/include') > > + env.Prepend(LIBPATH='$OPENSSL/lib') > > > > > > # If build with gssapi, get its information and define SERF_HAVE_GSSAPI > > ]]] > > > >