Project

General

Profile

Actions

Bug #15726

closed

Error compiling Ruby

Added by robin850 (Robin Dupret) about 5 years ago. Updated over 4 years ago.

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

Description

Hello,

I'm sorry if I'm reporting that to the wrong place but the errors are so meaningless that it's hard to know where the issue really comes from.

Trying to install Ruby by compiling it, several errors happen. The process follows these commands:

$ wget https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.2.tar.gz
$ tar -xvf ruby-2.6.2.tar.gz
$ cd ruby-2.6.2
$ ./configure
$ make V=1

Actually the make task fails. The first time, it fails at the ar step:

Makefile:283: recipe for target 'libruby-static.a' failed
make: *** [libruby-static.a] Interrupt

Running make in verbose mode show that the error happens running:

ar rcD  libruby-static.a dln.o localeinit.o loadpath.o array.o ast.o bignum.o class.o compar.o compile.o complex.o cont.o debug.o debug_counter.o dir.o dln_find.o encoding.o enum.o enumerator.o error.o eval.o file.ogc.o hash.o inits.o io.o iseq.o load.o marshal.o math.o mjit.o mjit_compile.o node.o numeric.o object.o pack.o parse.o proc.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o symbol.o thread.o time.otranscode.o transient_heap.o util.o variable.o version.o vm.o vm_backtrace.o vm_dump.o vm_trace.o coroutine/amd64/Context.o  enc/ascii.o enc/us_ascii.o enc/unicode.o enc/utf_8.o enc/trans/newline.o explicit_bzero.o setproctitle.o strlcat.o strlcpy.o addr2line.o  prelude.o dmyext.o dmyenc.o

Running it manually says :

ar: file.ogc.o: No such file or directory

And ditto for time.otranscode.o once file.ogc.o has been replaced with file.o. Replacing time.otranscode.o with time.o makes the error go away but running the command for a few seconds, then it exits with Killed but nothing is present in dmesg.

Trying to rerun make, the standard library gets compiled but it fails trying to compile BigDecimal with the following error:

In file included from bigdecimal.c:13:0:
bigdecimal.h:122:1: error: redefinition of 'rb_array_const_ptr'
 rb_array_const_ptr(VALUE a)
 ^~~~~~~~~~~~~~~~~~
In file included from bigdecimal.h:14:0,
                 from bigdecimal.c:13:
../.././include/ruby/ruby.h:2154:1: note: previous definition of 'rb_array_const_ptr' was here
 rb_array_const_ptr(VALUE a)
 ^~~~~~~~~~~~~~~~~~
In file included from bigdecimal.c:13:0:
bigdecimal.h:139:1: error: static declaration of 'rb_sym2str' follows non-static declaration
 rb_sym2str(VALUE sym)
 ^~~~~~~~~~
In file included from bigdecimal.h:14:0,
                 from bigdecimal.c:13:
../.././include/ruby/ruby.h:1806:7: note: previous declaration of 'rb_sym2str' was here
 VALUE rb_sym2str(VALUE);
       ^~~~~~~~~~
bigdecimal.c:108:1: error: static declaration of 'rb_rational_num' follows non-static declaration
 rb_rational_num(VALUE rat)
 ^~~~~~~~~~~~~~~
In file included from ../.././include/ruby/ruby.h:2111:0,
                 from bigdecimal.h:14,
                 from bigdecimal.c:13:
../.././include/ruby/intern.h:180:7: note: previous declaration of 'rb_rational_num' was here
 VALUE rb_rational_num(VALUE rat);
       ^~~~~~~~~~~~~~~
bigdecimal.c:120:1: error: static declaration of 'rb_rational_den' follows non-static declaration
 rb_rational_den(VALUE rat)
 ^~~~~~~~~~~~~~~
In file included from ../.././include/ruby/ruby.h:2111:0,
                 from bigdecimal.h:14,
                 from bigdecimal.c:13:
../.././include/ruby/intern.h:181:7: note: previous declaration of 'rb_rational_den' was here
 VALUE rb_rational_den(VALUE rat);
       ^~~~~~~~~~~~~~~
cc1: warning: unrecognized command line option '-Wno-self-assign'
cc1: warning: unrecognized command line option '-Wno-parentheses-equality'
cc1: warning: unrecognized command line option '-Wno-constant-logical-operand'
cc1: warning: unrecognized command line option '-Wno-cast-function-type'
Makefile:293: recipe for target 'bigdecimal.o' failed
make[2]: *** [bigdecimal.o] Error 1
make[2]: Leaving directory '/root/ruby-2.6.2/ext/bigdecimal'
exts.mk:189: recipe for target 'ext/bigdecimal/all' failed
make[1]: *** [ext/bigdecimal/all] Error 2
make[1]: Leaving directory '/root/ruby-2.6.2'
uncommon.mk:286: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2

Is that a bug in the compilation process or something I do wrong or missing in my setup ?

System configuration:

  • System: Debian 9.8 Stretch (Linux Kernel 2.6.32)
  • GCC: 6.3.0 20170516
  • Make: 4.1
  • ld: GNU ld (GNU Binutils for Debian) 2.28
  • OpenSSL : 1.1.0j 20 Nov 2018
  • Yacc: Bison 3.0.4

Thanks for your time !


Files

config.log (1.22 MB) config.log robin850 (Robin Dupret), 03/24/2019 05:59 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0