Project

General

Profile

Actions

Bug #13811

closed

Ruby 2.4.1 fails to compile inside qemu armhf - signal 11 (Segmentation fault)

Added by hackeron (Roman Gaufman) about 7 years ago. Updated about 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:82370]

Description

I'm using this Dockerfile to compile: https://github.com/docker-library/ruby/blob/ecbfdeb2b71e155222b1d3df0a33685247f00616/2.4/alpine3.6/Dockerfile, except with FROM resin/armhf-alpine (https://hub.docker.com/r/resin/armhf-alpine/) which forces docker to run through qemu with armhf emulation.

The compile is pretty standard:

	&& autoconf \
	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
# the configure script does not detect isnan/isinf as macros
	&& export ac_cv_func_isnan=yes ac_cv_func_isinf=yes \
	&& ./configure \
		--build="$gnuArch" \
		--disable-install-doc \
		--enable-shared \
	&& make -j "$(nproc)" \
	&& make install \

The above compiles without issues on am armhf and amd64 device, however when compiling through qemu armhf, it throws the following segmentation fault:

compiling util.c
compiling variable.c
compiling version.c
compiling vm.c
In file included from vm.c:293:0:
vm_exec.c: In function 'vm_exec_core':
vm_exec.c:83:18: warning: variable 'reg_pc' set but not used [-Wunused-but-set-variable]
     const VALUE *reg_pc;
                  ^~~~~~
compiling vm_backtrace.c
compiling vm_dump.c
compiling vm_trace.c
compiling ./missing/explicit_bzero.c
compiling ./missing/setproctitle.c
compiling addr2line.c
compiling dmyenc.c
compiling dln.c
compiling localeinit.c
compiling prelude.c
compiling array.c
compiling enc/ascii.c
compiling enc/us_ascii.c
compiling enc/unicode.c
compiling enc/utf_8.c
compiling enc/trans/newline.c
vm.c: At top level:
cc1: warning: unrecognized command line option '-Wno-self-assign'
cc1: warning: unrecognized command line option '-Wno-constant-logical-operand'
cc1: warning: unrecognized command line option '-Wno-parentheses-equality'
linking miniruby
generating encdb.h
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
make: *** [uncommon.mk:854: encdb.h] Segmentation fault
make: *** Waiting for unfinished jobs....
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
make: *** [uncommon.mk:643: .rbconfig.time] Segmentation fault

Any ideas?

Updated by jeremyevans0 (Jeremy Evans) over 5 years ago

  • Status changed from Open to Feedback

Does this still happen with Ruby 2.5.5, 2.6.3, or the master branch?

Actions #2

Updated by jeremyevans0 (Jeremy Evans) about 5 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0