From 882c90f72ba4e298aa5a7796661c28053c540a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 4 Jul 2017 14:57:09 +0200 Subject: macOS: Fix problems loading crypto On macOS, it was not possible to start crypto after running observer. (ERL_251) On the beta of macOS 10.13 (High Sierra), crypto does not work at all. (ERL-439) The problem is that the use of the -flat_namespace option when linking dynamic drivers such as the one for crypto. With that option, all function names must be unique among all linked libraries and frameworks, or the wrong function could be called. Resolve the problem by using the two-level namespace as recommended by Apple. We need to use the -bundle_loader option to point out beam.smp when building all drivers and NIF libraries. https://bugs.erlang.org/browse/ERL-251 https://bugs.erlang.org/browse/ERL-439 --- erts/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/configure.in') diff --git a/erts/configure.in b/erts/configure.in index 830e3d7776..85351ab7c7 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -3855,7 +3855,7 @@ case $host_os in darwin*) # Mach-O linker: a shared lib and a loadable # object file is not the same thing. - DED_LDFLAGS="-bundle -flat_namespace -undefined suppress" + DED_LDFLAGS="-bundle -bundle_loader ${ERL_TOP}/bin/$host/beam.smp" case $ARCH in amd64) DED_LDFLAGS="-m64 $DED_LDFLAGS" -- cgit v1.2.3