[MacPorts] #52507: erlang @19.1_0+hipe+ssl.darwin_10.x86_64 fails to compile/assemble?

MacPorts noreply at macports.org
Sat May 12 17:39:06 UTC 2018

#52507: erlang @19.1_0+hipe+ssl.darwin_10.x86_64 fails to compile/assemble?
  Reporter:  macports@…  |      Owner:  ci42
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.3.4
Resolution:              |   Keywords:  snowleopard
      Port:  erlang      |

Comment (by kencu):

 OK. It installs:
 $ port -v installed erlang
 The following ports are currently installed:
   erlang @20.3_0+hipe+ssl (active) platform='darwin 10' archs='x86_64'
 My system is set up with LibcxxOnOlderSystems, and defaults to macports-
 clang-3.9 as a compiler. I did not see the error you saw above, so
 presumably my newer compiler got by that error.

 However, the build did error out on the patch that was put in for 10.6
 some years ago
 $ cat patch-erts_emulator_sys_unix_ddll.c.diff
 --- erts/emulator/sys/unix/erl_unix_sys_ddll.c.orig
 +++ erts/emulator/sys/unix/erl_unix_sys_ddll.c
 @@ -49,6 +49,13 @@ static char **errcodes = NULL;
  static int num_errcodes = 0;
  static int num_errcodes_allocated = 0;

 +static void call_cf_initialize() __attribute__ ((constructor));
 +static void call_cf_initialize()
 +    __CFInitialize();
  #define my_strdup(WHAT) my_strdup_in(ERTS_ALC_T_DDLL_ERRCODES, WHAT);

  static char *my_strdup_in(ErtsAlcType_t type, char *what)
 with this error:
  CC     obj/x86_64-apple-darwin10.8.0/opt/smp/erl_unix_sys_ddll.o
 sys/unix/erl_unix_sys_ddll.c:57:5: error: implicit declaration of function
 '__CFInitialize' is invalid in C99 [-Werror,-Wimplicit-function-
 1 error generated.

 That was funny -- looks like it's not seeing the CoreFoundation headers on
 10.6.8. I just deleted that patch, and then it built right on through to
 the end without any troubles for me.

 SO: for you to get it built, without going through the whole
 LibcxxOnOlderSystems routine, I would try a newer compiler, like this
 sudo port -v install clang-3.9
 sudo port -v install erlang configure.compiler=macports-clang-3.9
 you can either take out the patch in the Portfile now, or try it yourself,
 and if it errors, delete the patched bit from:
 like I did.

 Still to be considered: that patch was put in there for a reason, as per
 the note in the Portfile. It should still work. It would probably be best
 to figure out why the CFInitialize definition can't be found, and fix that
 -- possibly by including the header in that file? I'm not sure about that
 just now.

Ticket URL: <https://trac.macports.org/ticket/52507#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS

More information about the macports-tickets mailing list