Print

Print


How about this:

1) Take the two pieces of the patch below which get rid of the magic string ".so" from the source files.
2) I have another patch I'm working on that which allows us to have conditionals in Makefile.am on Mac OS X.
3) We treat the "module vs library" thing as a Mac-only issue, and we change it only on Mac along with the issue with libXrdOss symbol visibility.

Once we work through (3), then the server should minimally startup and operate on Macs and I can do development next time I'm on an airplane :).

Brian

On Oct 25, 2010, at 7:17 AM, Lukasz Janyst wrote:

> To be frank I haven't followed Apple upgrade strategies. Fons
> mentioned at some point that this should be fixed with the newest
> Darwin kernel but it doesn't seem work for me on 10.6 either.
> 
>   Lukasz
> 
> On Mon, Oct 25, 2010 at 2:14 PM, Brian Bockelman <[log in to unmask]> wrote:
>> Wait -
>> 
>> I'm on Mac OS X 10.6, so if this is believed to be fixed in the most recent versions, maybe there's something wrong with my environment.
>> 
>> brian-bockelmans-macbook-pro-3:~ brian$ gcc -version
>> i686-apple-darwin10-gcc-4.2.1: no input files
>> 
>> What should I be staring at?
>> 
>> Brian
>> 
>> On Oct 25, 2010, at 6:38 AM, Lukasz Janyst wrote:
>> 
>>> Well, we actually fixed the problem of compiling the secssl plugin on
>>> a really outdated macosx some two weeks ago, which shows that these
>>> are still in use, so I would be in favor of fixing this one as well.
>>> It's not a dramatic change after all.
>>> 
>>>   Lukasz
>>> 
>>> On Mon, Oct 25, 2010 at 9:12 AM, Andrew Hanushevsky
>>> <[log in to unmask]> wrote:
>>>> Hi Brian,
>>>> 
>>>> Unfortunately, that his distinction went way in the most recent release. So,
>>>> it's q question of how far back we want to carry support. Given Apple's
>>>> aggresive upgrade schedule, it's not clear whather we want to actually do
>>>> this. I looking for the maintanenrs to respond.
>>>> 
>>>> Andy
>>>> 
>>>> On Sat, 23 Oct 2010, Brian Bockelman wrote:
>>>> 
>>>>> 
>>>>> Mac OS X makes a distinction between shared libraries and shared modules.
>>>>>  Shared libraries end in .dylib and are loaded when the executable starts
>>>>> up.  Shared modules end in .so and can be loaded during runtime using
>>>>> dlopen.
>>>>> 
>>>>> This patch makes XrdCrypto and friends shared modules, and uses an
>>>>> autoconf macro to auto-determine the shared library extension.
>>>>> 
>>>>> This patch also generates a few warnings when shared libraries (such as
>>>>> libXrdClient) are linked against the shared modules.  In testing, this seems
>>>>> to be harmless.
>>>>> ---
>>>>> configure.ac                      |    2 ++
>>>>> src/XrdCrypto/Makefile.am         |    3 +++
>>>>> src/XrdCrypto/XrdCryptoFactory.cc |    8 ++++++--
>>>>> 3 files changed, 11 insertions(+), 2 deletions(-)
>>>>> 
>>>>> diff --git a/configure.ac b/configure.ac
>>>>> index 770fcaa..0232eea 100644
>>>>> --- a/configure.ac
>>>>> +++ b/configure.ac
>>>>> @@ -1017,6 +1017,8 @@ fi
>>>>> 
>>>>> AM_CONDITIONAL(ENABLE_SECSSL,test x"$activate_secssl" = xyes -o
>>>>> x"$activate_secssl" = xdefault_yes)
>>>>> 
>>>>> +# Record the extension of dynamic libraries on this platform
>>>>> +LT_SYS_MODULE_EXT
>>>>> 
>>>>> ###########################################
>>>>> # tkauthz checks
>>>>> diff --git a/src/XrdCrypto/Makefile.am b/src/XrdCrypto/Makefile.am
>>>>> index 9b2f3a9..edd19b7 100644
>>>>> --- a/src/XrdCrypto/Makefile.am
>>>>> +++ b/src/XrdCrypto/Makefile.am
>>>>> @@ -70,11 +70,13 @@ libXrdCrypto_la_LIBADD = libXrdSSLutil.la \
>>>>>                         ../XrdSys/libXrdSys.la \
>>>>>                         ../XrdNet/libXrdNet.la \
>>>>>                         ../XrdNet/libXrdNetUtil.la
>>>>> +libXrdCrypto_la_LDFLAGS = -module
>>>>> 
>>>>> libXrdCryptoLite_la_SOURCES = \
>>>>>        XrdCryptoLite.hh \
>>>>>        XrdCryptoLite.cc \
>>>>>        XrdCryptoLite_bf32.cc
>>>>> +libXrdCryptoLite_la_LDFLAGS = -module
>>>>> libXrdCrytoLite_la_CXXFLAGS = $(SSLCXXFLAGS)
>>>>> 
>>>>> 
>>>>> @@ -91,6 +93,7 @@ libXrdCryptossl_la_SOURCES = \
>>>>>        XrdCryptosslgsiX509Chain.cc
>>>>> libXrdCryptossl_la_LIBADD = ../XrdSut/libXrdSut.la \
>>>>>                            $(OPENSSL_LIBDIR) -lssl -lcrypto
>>>>> +libXrdCryptossl_la_LDFLAGS = -module
>>>>> libXrdCryptossl_la_CXXFLAGS = $(SSLCXXFLAGS)
>>>>> 
>>>>> 
>>>>> diff --git a/src/XrdCrypto/XrdCryptoFactory.cc
>>>>> b/src/XrdCrypto/XrdCryptoFactory.cc
>>>>> index 6f110b5..ec9ed1f 100644
>>>>> --- a/src/XrdCrypto/XrdCryptoFactory.cc
>>>>> +++ b/src/XrdCrypto/XrdCryptoFactory.cc
>>>>> @@ -26,6 +26,10 @@ const char *XrdCryptoFactoryCVSID = "$Id$";
>>>>> #include <XrdCrypto/XrdCryptoFactory.hh>
>>>>> #include <XrdCrypto/XrdCryptolocalFactory.hh>
>>>>> 
>>>>> +#ifndef LT_MODULE_EXT
>>>>> +#define LT_MODULE_EXT ".so"
>>>>> +#endif
>>>>> +
>>>>> // We have always an instance of the simple RSA implementation
>>>>> static XrdCryptolocalFactory localCryptoFactory;
>>>>> 
>>>>> @@ -374,7 +378,7 @@ XrdCryptoFactory
>>>>> *XrdCryptoFactory::GetCryptoFactory(const char *factoryid)
>>>>> 
>>>>>   //
>>>>>   // Form library name
>>>>> -   snprintf(libfn, sizeof(libfn)-1, "libXrdCrypto.so");
>>>>> +   snprintf(libfn, sizeof(libfn)-1, "libXrdCrypto%s", LT_MODULE_EXT);
>>>>>   libfn[sizeof(libfn)-1] = '\0';
>>>>> 
>>>>>   //
>>>>> @@ -396,7 +400,7 @@ XrdCryptoFactory
>>>>> *XrdCryptoFactory::GetCryptoFactory(const char *factoryid)
>>>>> 
>>>>>      //
>>>>>      // Try also specific library name
>>>>> -      snprintf(libfn, sizeof(libfn)-1, "libXrdCrypto%s.so", factoryid);
>>>>> +      snprintf(libfn, sizeof(libfn)-1, "libXrdCrypto%s%s", factoryid,
>>>>> LT_MODULE_EXT);
>>>>>      libfn[sizeof(libfn)-1] = '\0';
>>>>> 
>>>>>      //
>>>>> --
>>>>> 1.7.3.1
>>>>> 
>>>>> 
>>>> 
>> 
>>