[Bug 237960] land/erlang does not build on arm with the NATIVE option

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat May 18 01:30:21 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237960

            Bug ID: 237960
           Summary: land/erlang does not build on arm with the NATIVE
                    option
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs at FreeBSD.org
          Reporter: bsdpr at phoe.frmug.org

The erland/OTP port (lang/erlang) fails to build on a RPI when the NATIVE
option is selected in addition to the pre-selected ones. Compilation halts on
an bad system call:

[...]
erlc -W  -DMERL_NO_TRANSFORM +debug_info -pa ../ebin -pa ./ -I../include
+native +nowarn_shadow_vars +warn_unused_import  -o ./ merl_transform.erl
erlc -W +debug_info -pa ../ebin -pa ./ -I../include +native +nowarn_shadow_vars
+warn_unused_import  -o../ebin merl_transform.erl
gmake[5]: *** [Makefile:74: ../ebin/merl_transform.beam] Bad system call (core
dumped)
gmake[5]: Leaving directory
'/usr/obj/ports/usr/ports/lang/erlang/work/otp-OTP-19.3.6.13/lib/syntax_tools/src'


This build was attempted on a RPI2 using a 11-STABLE base system built from svn
revision 345570. The core dump does not look readily informative:

# gdb ../../../bin/armv6-portbld-freebsd11.2/beam.smp beam.smp.core
[...]
(gdb) bt
#0  0x001b1e30 in try_alloc ()
#1  0x001b1cf0 in hipe_alloc_code ()
#2  0x001aab04 in hipe_bifs_enter_code_2 ()
#3  0x00043e3c in $a.18 ()
#4  0x00043e3c in $a.18 ()


Since I'm new at bean/erlang/otp I have no idea on how to further investigate
this issue. Having beam machines on the inexpensive RPIs would be extremely
useful to experiment with the distributive features of erlang.

As I did suspect that some-thing might be amiss with the HiPE compiler on arm,
I also attempted a build without it and without NATIVE. That build also failed
for another reason which is oulined bellow:

erlc -W  +debug_info -I../include -I../../kernel/include -Werror -o../ebin
dets_utils.erl
gmake[5]: ***
[/usr/obj/ports/usr/ports/lang/erlang/work/otp-OTP-19.3.6.13/make/armv6-portbld-freebsd11.2/otp.mk:119:
../ebin/dets_utils.beam] Segmentation fault (core dumped)
gmake[5]: Leaving directory
'/usr/obj/ports/usr/ports/lang/erlang/work/otp-OTP-19.3.6.13/lib/stdlib/src'

Again the stack trace in uninformative:

# gdb ../../../bin/armv6-portbld-freebsd11.2/beam.smp beam.smp.core
[...]
(gdb) bt
#0  0x00000004 in ?? ()


The only build that did complete and eventually install is with HiPE and
without NATIVE. However, at that point, I'm left in a confused state: should I
trust this virtual machine? I'm inclined to not give it my trust.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list