# Error at "bison parse.y" when compiling Ruby with MinGW

**URL:** <https://www.ruby-forum.com/t/error-at-bison-parse-y-when-compiling-ruby-with-mingw/71455>\
**Category:** Ruby\
**Created:** [October 9, 2006, 1:56am UTC](https://www.ruby-forum.com/t/error-at-bison-parse-y-when-compiling-ruby-with-mingw/71455 "2006-10-09T01:56:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [October 9, 2006, 1:56am UTC](https://www.ruby-forum.com/t/error-at-bison-parse-y-when-compiling-ruby-with-mingw/71455/1 "2006-10-09T01:56:39Z")

</div>

I’m trying to build Ruby from source with MinGW (Windows XP SP 2), and  
it bombs at bison:

> sh configure --prefix=c:\my\_ruby --enable-shared i386-mingw32  
> … lots 'o stuff

> make  
> gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c array.c  
> … other files  
> gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c pack.c  
> bison -y parse.y  
> parse.y: fatal error: invalid token in skeleton: @output  
> @output\_parser\_name@  
> make: \*\*\* [parse.c] Error 1

Lengthy searches on google and rubygarden to no avail. I grabbed the  
latest parse.y from the CVS repository, but I don’t think that’s where  
the problem is. Does anyone have any ideas?

Tools:

MinGW packages:  
binutils-2.15.91-20040904-1.tar.gz  
gcc-core-3.4.2-20040916-1.tar.gz  
gcc-g+±3.4.2-20040916-1.tar.gz  
mingw-runtime-3.9.tar.gz  
mingw32-make-3.80.0-3.exe  
w32api-3.6.tar.gz

MSYS packages:  
bison-2.0-MSYS.tar.gz  
MSYS-1.0.11-2004.04.30-1.exe  
msys-autoconf-2.59.tar  
msys-automake-1.8.2.tar  
msys-libtool-1.5.tar  
msysDTK-1.0.1.exe

GNU bash, version 2.04.0(1)-release-(i686-pc-msys)

All installed, all on path, can compile C programs with gcc. Autoconf  
works.

Thanks,

Jeff

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [October 9, 2006, 2:34am UTC](https://www.ruby-forum.com/t/error-at-bison-parse-y-when-compiling-ruby-with-mingw/71455/2 "2006-10-09T02:34:41Z")

</div>

Hi,

In message “Re: Error at “bison parse.y” when compiling Ruby with MinGW”  
on Mon, 9 Oct 2006 08:55:10 +0900, removed\_email\_address@domain.invalid writes:

|bison -y parse.y  
|parse.y: fatal error: invalid token in skeleton: @output  
|@output\_parser\_name@  
|make: \*\*\* [parse.c] Error 1

Perhaps something wrong in your bison template file, bison.simple.  
Can you find it and search through “@output\_parser\_name@”?  
Re-installing bison may solve the problem.

```
						matz.
```

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [October 9, 2006, 5:00am UTC](https://www.ruby-forum.com/t/error-at-bison-parse-y-when-compiling-ruby-with-mingw/71455/3 "2006-10-09T05:00:51Z")

</div>

Hello Matz,

> Perhaps something wrong in your bison template file, bison.simple.  
> Interestingly, I didn’t have this file, and when I searched the  
> download source it wasn’t there either! Funny. I got a copy of  
> bison.simple from an MIT server and put it in the bison.exe directory,  
> but that didn’t solve the problem. It also didn’t have any  
> “output\_parser\_name” variables.

> Re-installing bison may solve the problem.  
> Unfortunately, no.

I’ll keep looking.

jz
