You are not logged in.

#1 2020-08-06 12:44:50

yegorov
Member
Registered: 2020-08-06
Posts: 3

Build ruby 2.6.6 from git source

Hello!
I try build ruby 2.6.6 from git source, but get error.

My Dockerfile:

FROM archlinux:20200705

RUN pacman -Sy vim curl git ruby --noconfirm && \
    pacman -S --needed base-devel libffi libyaml openssl zlib --noconfirm

CMD /bin/bash

Build and run docker:

docker build -t archlinux_ruby .
docker run --rm -it archlinux_ruby /bin/bash

My steps for reproduce error (in docker bash):

mkdir gitruby && cd gitruby
git clone https://github.com/ruby/ruby.git -b v2_6_6 --depth 1
cd ruby
autoconf
./configure
make

Error

compiling parse.c                                                                                               [7/2146]
parse.c: In function ‘ruby_yyparse’:                                                                                    
parse.c:10667:51: error: macro "yydestruct" passed 5 arguments, but takes just 3                                        
10667 |           if (yychar == END_OF_INPUT)                                                                           
      |                                                   ^                                                             
parse.c:5299: note: macro "yydestruct" defined here                                                                     
 5299 | #define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, p)                                                  
      |                                                                                                                 
parse.c:10666:11: error: ‘yydestruct’ undeclared (first use in this function)
10666 |           /* Return failure if at end of input.  */
      |           ^~~~~~~~~~  
parse.c:10666:11: note: each undeclared identifier is reported only once for each function it appears in
parse.c:10722:65: error: macro "yydestruct" passed 5 arguments, but takes just 3
10722 |       /* Pop the current state because it cannot handle the error token.  */
      |                                                                 ^                                               
parse.c:5299: note: macro "yydestruct" defined here
 5299 | #define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, p)
      | 
parse.c:10780:47: error: macro "yydestruct" passed 5 arguments, but takes just 3
10780 |   if (yychar != YYEMPTY)
      |                                               ^     
parse.c:5299: note: macro "yydestruct" defined here
 5299 | #define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, p)
      | 
parse.c:10789:65: error: macro "yydestruct" passed 5 arguments, but takes just 3
10789 |      this YYABORT or YYACCEPT.  */
      |                                                                 ^                                               
parse.c:5299: note: macro "yydestruct" defined here
 5299 | #define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, p)
      | 
At top level:
parse.c:5297:1: warning: ‘ruby_parser_yydestruct’ defined but not used [-Wunused-function]
 5297 | ruby_parser_yydestruct (const char *yymsg,
      | ^~~~~~~~~~~~~~~~~~~~~~
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagno
stics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier di
agnostics
make: *** [Makefile:419: parse.o] Error 1

What are the comments about the building ruby?
From tarball source (https://www.ruby-lang.org/en/downloads/) builded is successful.

What am I doing wrong?

Offline

#2 2020-08-06 15:52:36

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Build ruby 2.6.6 from git source

Confirmed.

I do not think you are doing anything wrong. File an upstream bug report, if you really need ruby 2.6.6 from git, or stick to the tarball.

Offline

#3 2020-08-07 06:12:41

yegorov
Member
Registered: 2020-08-06
Posts: 3

Re: Build ruby 2.6.6 from git source

Ok, thanks, for answer!

Offline

#4 2020-08-07 11:28:22

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: Build ruby 2.6.6 from git source

Offline

#5 2020-08-10 13:25:30

yegorov
Member
Registered: 2020-08-06
Posts: 3

Re: Build ruby 2.6.6 from git source

Thanks!!! After cherry-pick it does building successfully!

Offline

Board footer

Powered by FluxBB