Project

General

Profile

Bug #17106

Build ruby 2.6.6 from git source

Added by yegorov (Artem Yegorov) 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:99508]

Description

Hello!
I tried to build ruby 2.6.6 from git source, but get an 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 reproducing 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 do the comments mean that appeared while building ruby?
Building from tarball source (https://www.ruby-lang.org/en/downloads/) was successful.

What am I doing wrong?


Related issues

Related to Ruby master - Bug #16998: [Backport] support for Bison 3 to 2.6 and 2.7ClosedActions

Updated by mame (Yusuke Endoh) 6 months ago

Hi,

I think you are using bison that is newer than the latest version at Ruby 2.6 release.
I guess nobu (Nobuyoshi Nakada) has already fixed the issue in ruby master, so we need to backport something.

#2

Updated by sawa (Tsuyoshi Sawada) 6 months ago

  • Description updated (diff)

Updated by yegorov (Artem Yegorov) 6 months ago

mame (Yusuke Endoh) wrote in #note-1:

Hi,

I think you are using bison that is newer than the latest version at Ruby 2.6 release.
I guess nobu (Nobuyoshi Nakada) has already fixed the issue in ruby master, so we need to backport something.

Thanks, i'll wait backport.

#4

Updated by hsbt (Hiroshi SHIBATA) 6 months ago

  • Related to Bug #16998: [Backport] support for Bison 3 to 2.6 and 2.7 added
#5

Updated by hsbt (Hiroshi SHIBATA) 6 months ago

  • Status changed from Open to Closed

Updated by wanabe (_ wanabe) 6 months ago

47720e2255f34ecad49763c66a7ea02a55a3f60a will fix the error.
But I don't know if it won't cause a regression.
ruby_2_7 doesn't have the issue because of b971bad49b95d4c1f68bb2242d4267355f1cd497.

Also available in: Atom PDF