On a Raspberry PI 2 the lang/erlang port fails to build with HiPE enabled. Disabling HiPE and build works. CC obj/armv6-portbld-freebsd11.0/opt/smp/erl_bif_info.o beam/erl_bif_info.c:2109:10: error: use of undeclared identifier 'am_arm'; did you mean 'alarm'? BIF_RET(hipe_arch_name); ^~~~~~~~~~~~~~ alarm hipe/hipe_arm.h:39:24: note: expanded from macro 'hipe_arch_name' #define hipe_arch_name am_arm ^ beam/bif.h:118:28: note: expanded from macro 'BIF_RET' #define BIF_RET(x) return (x) ^ /usr/include/unistd.h:323:15: note: 'alarm' declared here unsigned int alarm(unsigned int); ^ 1 error generated. armv6-portbld-freebsd11.0/Makefile:685: recipe for target 'obj/armv6-portbld-freebsd11.0/opt/smp/erl_bif_info.o' failed gmake[5]: *** [obj/armv6-portbld-freebsd11.0/opt/smp/erl_bif_info.o] Error 1 gmake[5]: Leaving directory '/usr/ports/lang/erlang/work/otp_src_17.5/erts/emulator' /usr/ports/lang/erlang/work/otp_src_17.5/make/run_make.mk:34: recipe for target 'opt' failed gmake[4]: *** [opt] Error 2 gmake[4]: Leaving directory '/usr/ports/lang/erlang/work/otp_src_17.5/erts/emulator' Makefile:60: recipe for target 'smp' failed gmake[3]: *** [smp] Error 2 gmake[3]: Leaving directory '/usr/ports/lang/erlang/work/otp_src_17.5/erts' Makefile:443: recipe for target 'emulator' failed gmake[2]: *** [emulator] Error 2 gmake[2]: Leaving directory '/usr/ports/lang/erlang/work/otp_src_17.5' *** Error code 1
Created attachment 156940 [details] make configure output Log from make configure as requested by port maintainer.
Port maintainer wanted to know the following in previous email: Output from uname -m: arm "Does it compile without HiPE enable?" Yes Let me know if you want more information.
Created attachment 156941 [details] armv6 fix Hi, Can you try the attached patch?
(In reply to mikael.urankar from comment #3) Got the same error with that patch.
Maybe I applied it incorrectly? root@rpi2:/usr/ports/lang/erlang # patch < test.patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- /dev/null |+++ files/patch-erts_configure.in -------------------------- Patching file files/patch-erts_configure.in using Plan A... Empty context always matches. Hunk #1 succeeded at 1. done
(In reply to a.andersson.thn from comment #5) Hi, can you check if the patch file ended up in files/ or in the main port directory?
The patch created this file: files/patch-erts_configure.in
Created attachment 156980 [details] Fix for HiPe in lang/erlang Turns out the fix was rather easy. Mikaël Urankar told me he got it to compile with: .if ${ARCH} == armv6 MAKE_ARGS+= ARCH=arm .endif This allows HiPE in erlang to be compiled on arm. Tested and verified to work as well.
Created attachment 156981 [details] Erlang patch As per Mikaël Urankars direction I am submitting a cleaned up diff.
(In reply to a.andersson.thn from comment #9) Great news - are you able to build erlang-runtime15 and 16 with this patch?
(In reply to Jimmy Olgeni from comment #10) Nope, I only tried lang/erlang. I can check tomorrow though.
A commit references this bug: Author: olgeni Date: Wed May 20 20:09:55 UTC 2015 New revision: 386887 URL: https://svnweb.freebsd.org/changeset/ports/386887 Log: Unbreak build on armv6. PR: 200322 Submitted by: a.andersson.thn@gmail.com Changes: head/lang/erlang/Makefile head/lang/erlang-runtime17/Makefile
If you are able check the runtime ports for armv6 I can update them too :)