crypto and ssl modules under OSX

Bjorn Gustavsson <>
Fri Dec 3 10:01:06 CET 2004


Sean Hinde <> writes:

> 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

No, sorry.

Our Makefiles must work on all platforms (including other Unixes,
Windows, VxWorks and other embedded system). Currently, the Makefiles
use the C compiler for compiling and ld for linking.

Starting to use the C compiler for linking will probably not work
for some platform, so that is not an option.

The best way to solve the problem would of course be to choose whether to use
gcc or ld for linking on a platform-by-platform basis, but that would
require changes to configure.in and many Makefiles in source code and a lot of
time for testing.

This is not something we can do for a patch release. Maybe for R11B,
if it gets high enough priority.

/Bjorn

> 
> 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
> 

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list