crypto and ssl modules under OSX

Sean Hinde <>
Thu Dec 2 23:32:15 CET 2004


Hi Bjorn,

I hope your change gets rid of the undocumented -lbundle1.o and reverts 
to using the mechanism in the README - namely -bundle, and using the cc 
program to link rather than ld

Quote from README:

If you develop linked in drivers (shared library) you need to link
using "cc" and the flags "-bundle -flat_namespace -undefined
suppress". You also include "-fno-common" in CFLAGS when
compiling. Use ".so" as the library suffix.

Sean


On 1 Dec 2004, at 15:36, Bjorn Gustavsson wrote:

> Actually, we DID get that part correct in R10B (getting rid of -R
> for Mac OS X).
>
> Unfortunately, there is another problem... which I think I have
> solved now. If my change doesn't break linking on some other platform,
> it shold appear in R10B-2.
>
> /Bjorn
>
> Sean Hinde <> writes:
>
>> I have submitted a patch for this more times than I care to remember.
>>
>> In addition the correct mechanism is described in Erlang/OTPs very own
>> README file.
>>
>> Please try to get this right for OS X next time.
>>
>> Sean
>>
>> On 18 Nov 2004, at 11:34, Peter H|gfeldt wrote:
>>
>>>
>>> Just remove the -R switch from the Makefile. In R10B the -R switch is
>>> not included for OSX (or is it called Darwin?).
>>>
>>> /Peter
>>>
>>>
>>> On Wed, 17 Nov 2004, Reto Kramer wrote:
>>>
>>>> I'm trying to build the R9C-2 ssl and crypto under OSX 10.3.4. Can
>>>> some
>>>> BSD/Mac guru out there help me figure out how to change the ld
>>>> switches
>>>> (under OSX, the R option of the -Wl switch is not available).
>>>>
>>>> Thanks,
>>>> - Reto
>>>>
>>>> from: otp_src_R9C-2/otp_src_R9C-2/lib/crypto/c_src/Makefile.in
>>>>
>>>> $(LIBDIR)/crypto_drv.so: $(OBJS)
>>>> 	$(INSTALL_DIR) $(LIBDIR)
>>>> 	$(CC) $(LDFLAGS) -L$(SSL_LIBDIR) -Wl,-R$(SSL_LIBDIR) \
>>>> 			-o $@ $^ $(LDLIBS) -lcrypto
>>>>
>>>>
>>>> === Entering application crypto
>>>> make[3]: Nothing to be done for `opt'.
>>>> make -f powerpc-apple-darwin7.5.0/Makefile TYPE=opt
>>>> /usr/bin/install -c -d ../priv/lib/powerpc-apple-darwin7.5.0
>>>> gcc -bundle -flat_namespace -undefined suppress -lbundle1.o 
>>>> -L/usr/lib
>>>> -Wl,-R/usr/lib \
>>>> 		 -o ../priv/lib/powerpc-apple-darwin7.5.0/crypto_drv.so
>>>> ../priv/obj/powerpc-apple-darwin7.5.0/crypto_drv.o  -lcrypto
>>>> ld: unknown flag: -R/usr/lib
>>>> === Skipping subdir doc/src, it is missing
>>>> === Leaving application crypto
>>>>
>>>> #
>>>>
>>>
>>
>
> -- 
> Björn Gustavsson, Erlang/OTP, Ericsson AB




More information about the erlang-questions mailing list