Bug 246680 - lang/perl5.30 compilation fails on CURRENT (r361370) amd64
Summary: lang/perl5.30 compilation fails on CURRENT (r361370) amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Mathieu Arnold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-23 16:21 UTC by schaiba
Modified: 2020-05-24 14:18 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description schaiba 2020-05-23 16:21:14 UTC
I installed a Bhyve VM with CURRENT (latest as of today - r361307) and proceeded to get the ports tree and install tmux. It has a dependency on Perl, which fails to build thus : 

cc -pthread -Wl,-E  -fstack-protector-strong -L/usr/local/lib -o miniperl  mpdtrace/opmini.o mpdtrace/perlmini.o mpdtrace/gv.o mpdtrace/toke.o mpdtrace/perly.o mpdtrace/pad.o mpdtrace/regcomp.o mpdtrace/dump.o mpdtrace/util.o mpdtrace/mg.o mpdtrace/reentr.o mpdtrace/mro_core.o mpdtrace/keywords.o mpdtrace/hv.o mpdtrace/av.o mpdtrace/run.o mpdtrace/pp_hot.o mpdtrace/sv.o mpdtrace/pp.o mpdtrace/scope.o mpdtrace/pp_ctl.o mpdtrace/pp_sys.o mpdtrace/doop.o mpdtrace/doio.o mpdtrace/regexec.o mpdtrace/utf8.o mpdtrace/taint.o mpdtrace/deb.o mpdtrace/universal.o mpdtrace/globals.o mpdtrace/perlio.o mpdtrace/perlapi.o mpdtrace/numeric.o mpdtrace/mathoms.o mpdtrace/locale.o mpdtrace/pp_pack.o mpdtrace/pp_sort.o mpdtrace/caretx.o mpdtrace/dquote.o mpdtrace/time64.o mpdtrace/miniperlmain.o dtrace_mini.o -lpthread -lm -lcrypt -lutil
LD_LIBRARY_PATH=/usr/ports/lang/perl5.30/work/perl-5.30.2 ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
Segmentation fault (core dumped)
Failed to build miniperl. Please run make minitest
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/lang/perl5.30/work/perl-5.30.2
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/perl5.30
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/perl5.30

From what I see, it's the bootstrapped miniperl crashing here, so here is the lldb output : 

lldb ./miniperl
(lldb) target create "./miniperl"
Current executable set to '/usr/ports/lang/perl5.30/work/perl-5.30.2/miniperl' (x86_64).
(lldb) run
Process 47039 launching
Process 47039 launched: '/usr/ports/lang/perl5.30/work/perl-5.30.2/miniperl' (x86_64)
Process 47039 stopped
* thread #1, name = 'miniperl', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
    frame #0: 0x0000000000517e7a miniperl`dtrace_dof_init at drti.c:149:30
(lldb) bt
* thread #1, name = 'miniperl', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
  * frame #0: 0x0000000000517e7a miniperl`dtrace_dof_init at drti.c:149:30
    frame #1: 0x00000008005329ad
    frame #2: 0x00000008005316d4

The OS is installed with default options, especially regarding security hardening. Any info I can provide, let me know.
Comment 1 schaiba 2020-05-23 17:07:25 UTC
Using the core file doesn't add much info : 

(lldb) target create --core ./miniperl.core ./miniperl
Core file '/usr/ports/lang/perl5.30/work/perl-5.30.2/miniperl.core' (x86_64) was loaded.
(lldb) thread list
Process 0 stopped
* thread #1: tid = 100347, 0x0000000000517e7a miniperl`dtrace_dof_init at drti.c:149:30, name = 'miniperl', stop reason = signal SIGSEGV
(lldb) thread backtrace all
* thread #1, name = 'miniperl', stop reason = signal SIGSEGV
  * frame #0: 0x0000000000517e7a miniperl`dtrace_dof_init at drti.c:149:30
    frame #1: 0x00000008005329ad ld-elf.so.1
    frame #2: 0x00000008005316d4 ld-elf.so.1
Comment 2 daniel.engberg.lists 2020-05-24 00:51:03 UTC
Builds fine on FreeBSD 13.0-CURRENT #0 r361421 (amd64) with debugging disabled for world and kernel in Hyper-V.
Comment 3 schaiba 2020-05-24 14:18:56 UTC
upgraded to r361429, problem went away