Opened 2 years ago

Closed 7 months ago

Last modified 7 months ago

#52507 closed defect (fixed)

erlang @19.1_0+hipe+ssl.darwin_10.x86_64 fails to compile/assemble?

Reported by: macportsraf Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: snowleopard Cc: ci42
Port: erlang


Upgrading, cleaning, uninstalling and reinstalling didn't work. Here are the errors from the logfile:

:info:build  CC	obj/x86_64-apple-darwin10.8.0/opt/smp/erl_alloc.o
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_erlang/erlang/work/.tmp/ccZprxSk.s:9392:Expected comma after symbol-name
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_erlang/erlang/work/.tmp/ccZprxSk.s:9392:Rest of line ignored. 1st junk character valued 95 (_).
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_erlang/erlang/work/.tmp/ccZprxSk.s:9395:Expected comma after symbol-name
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_erlang/erlang/work/.tmp/ccZprxSk.s:9395:Rest of line ignored. 1st junk character valued 95 (_).
:info:build make[3]: *** [obj/x86_64-apple-darwin10.8.0/opt/smp/erl_alloc.o] Error 1
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_erlang/erlang/work/erlang-19.1/erts/emulator'
:info:build make[2]: *** [opt] Error 2
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_erlang/erlang/work/erlang-19.1/erts/emulator'
:info:build make[1]: *** [smp] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_erlang/erlang/work/erlang-19.1/erts'
:info:build make: *** [emulator] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_erlang/erlang/work/erlang-19.1'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_erlang/erlang/work/erlang-19.1" && /usr/bin/make -w all 
:info:build Exit code: 2
:error:build for port erlang returned: command execution failed
:debug:build Error code: CHILDSTATUS 56527 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for erlang: org.macports.activate org.macports.destroot org.macports.install

Attachments (2)

main.log (18.2 KB) - added by macportsraf 2 years ago.
complete logfile from a clean install attempt
main-edited.log (2.4 KB) - added by shamekas 7 months ago.
Build log failing at the same place.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 2 years ago by ci42

Owner: changed from macports-tickets@… to ciserlohn@…

Please provide a complete log from a clean install attempt.

Last edited 2 years ago by ci42 (previous) (diff)

Changed 2 years ago by macportsraf

Attachment: main.log added

complete logfile from a clean install attempt

Changed 7 months ago by shamekas

Attachment: main-edited.log added

Build log failing at the same place.

comment:2 Changed 7 months ago by shamekas

This ticket is almost 2 years old. Is anyone looking into this?

Last edited 7 months ago by shamekas (previous) (diff)

comment:3 Changed 7 months ago by kencu (Ken)

looks like erlang built fine on 10.6.8 through the 18.x series, but stopped as of the 19.x series. Cause is not obvious from the (previous) log. May or may not be fixable. 10.6.8 has limited ( but loyal! ) users now, and resources on Macports focus on the tickets involving the past three system versions, which affect 99% of users.

Some assistance is needed. Did you try forcing a newer compiler?

comment:4 Changed 7 months ago by kencu (Ken)

the website says erlang still supports 10.6.8, so that is encouraging.

comment:5 Changed 7 months ago by kencu (Ken)

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' date='2018-05-12T10:30:23-0700'

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-declaration]
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 perhaps:

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.

comment:6 Changed 7 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

In 66b25e1930aecb7642060ecaf1d471f4e830e830/macports-ports (master):

erlang: blacklist gcc-4.2

Fixes: #52507

comment:7 Changed 7 months ago by kencu (Ken)

Interesting. This forces the build to llvm-gcc-4.2, which doesn't error on the implicit function definition like clang-3.9 does:

sys/unix/erl_unix_sys_ddll.c:57: warning: implicit declaration of function ‘__CFInitialize’

and I guess finds the objects at the link, in the end.

If we disable the error for implicit function defs, that should fix the rest of the builds with newer compilers.

Now why, I wonder, don't newer clangs error out on that as well, I wonder?

Note: See TracTickets for help on using tickets.