# Problem on compiling ruby in windows

**URL:** <https://www.ruby-forum.com/t/problem-on-compiling-ruby-in-windows/115420>\
**Category:** Ruby\
**Created:** [September 25, 2007, 4:43am UTC](https://www.ruby-forum.com/t/problem-on-compiling-ruby-in-windows/115420 "2007-09-25T04:43:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shinwoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Post date:** [September 25, 2007, 4:43am UTC](https://www.ruby-forum.com/t/problem-on-compiling-ruby-in-windows/115420/1 "2007-09-25T04:43:51Z")

</div>

Hi,

I am using the ruby one click installer all the while. Recently, I tried  
to compile the latest ruby 1.8.6-p110 and I found it is quite painful to  
compile it in windows.

I am able to compile it with VS2003. I can compile the ruby.exe and  
rubyw.exe and some standard library without any problem.

After compile the ruby.exe, I tried it and it run quite well but when I  
tried to install rubygems, it start complaining zlib not install. So, I  
recheck the compile log and found that there are still a lot of ruby  
extension which is not able to compile in windows because of missing of  
some library/development header, for eg openssl, zlib, readline, curse,  
nbm, iconv, pty, tk, syslog…etc .  
This is no problem for linux coz linux can download all the dev file  
easily like they can download zlib-dev with linux. However, doing this  
in windows is hard.

For zlib, luckily I can found the source code and compile it  
successfully. After that, I just install rubygems without any problem.  
After install rubygems, I fire up IRB and type ‘require  
‘irb/completion’’. It complain again no readline ext found… ☹ I had  
to start finding any readline source/library for windows available on  
net. I successful to found it with GNUWin but still not able to compile  
readline binding for ruby…I read the log file, it will check for  
ncurse.lib, termcap.lib, curse.lib, edit/readline.h…where do I get all  
this file???

So, can anyone tell me how to compile readline for ruby in windows?  
and so for openssl, curse, iconv, tk…

---

<div class="post-metadata">

**Author:** ![shinwoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Post date:** [September 25, 2007, 5:34am UTC](https://www.ruby-forum.com/t/problem-on-compiling-ruby-in-windows/115420/2 "2007-09-25T05:34:26Z")

</div>

Shin guey Wong wrote:

> So, how do I configure with “–enable-threads” ? changing the Makefile?  
> I never compile any ruby source myself.
> 
> My previous post question, I still no idea on how to compile readline  
> for ruby…

Just finish compile the curse standard library with the lib from:

> **[PDCurses - Browse Files at SourceForge.net](https://sourceforge.net/projects/pdcurses/files/)**
>
> An implementation of the curses library for Windows, DOS, OS/2, X11 and SDL.

I had tried to compile it with pdcurse from gnuwin32 but it fails to  
compile.

---

<div class="post-metadata">

**Author:** ![shinwoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Post date:** [September 25, 2007, 5:17am UTC](https://www.ruby-forum.com/t/problem-on-compiling-ruby-in-windows/115420/3 "2007-09-25T05:17:17Z")

</div>

Shin guey Wong wrote:

> So, can anyone tell me how to compile readline for ruby in windows?  
> and so for openssl, curse, iconv, tk…

I just successful compile openssl base on the instruction below:  
[http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/120695?120482-121114+split-mode-vertical](http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/120695?120482-121114+split-mode-vertical)

I use the same technique to compile the tk binding. I can compile it but  
I get the following warning message:

* * *

\*\*  
\*\* PTHREAD SUPPORT MODE WARNING:  
\*\*  
\*\* Ruby is compiled with --enable-pthread, but your Tcl/Tk library  
\*\* seems to be compiled without pthread support. Although you can  
\*\* create the tcltklib library, this combination may cause errors  
\*\* (e.g. hangs or segmentation faults). If you have no reason to  
\*\* keep the current pthread support status, we recommend you  
reconfigure  
\*\* and recompile the libraries so that both or neither support  
pthreads.  
\*\*  
\*\* If you want change the status of pthread support, please recompile  
\*\* Ruby without “–enable-pthread” configure option or recompile  
Tcl/Tk  
\*\* with “–enable-threads” configure option (if your Tcl/Tk is later  
\*\* than or equal to Tcl/Tk 8.1).  
\*\*

* * *

So, how do I configure with “–enable-threads” ? changing the Makefile?  
I never compile any ruby source myself.

My previous post question, I still no idea on how to compile readline  
for ruby…

---

<div class="post-metadata">

**Author:** ![shinwoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Post date:** [September 27, 2007, 12:59am UTC](https://www.ruby-forum.com/t/problem-on-compiling-ruby-in-windows/115420/4 "2007-09-27T00:59:24Z")

</div>

On 9/25/07, M. Edward (Ed) Borasky [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > After compile the ruby.exe, I tried it and it run quite well but when I  
> > successfully. After that, I just install rubygems without any problem.
> 
> You might want to look at the RubyForge details for the Windows  
> One-Click Installer. Since it’s an open-source project, I’m guessing all  
> the scripts, Vulcan nerve pinches, etc., necessary to build the  
> One-Click Installer are there in the SCM repository. There may actually  
> be a forum there too. Then again, Curt might just update the One-Click  
> and Instant Rails with the latest Ruby source soon too. 🙂

I am working on an One-Click Ruby Installer update (currently stuck on  
a problem with the ODBC bindings). I hope I can have something out  
fairly soon (actually, I need to because I’m really short on available  
time).

Curt

---

<div class="post-metadata">

**Author:** ![shinwoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Post date:** [September 25, 2007, 7:19am UTC](https://www.ruby-forum.com/t/problem-on-compiling-ruby-in-windows/115420/5 "2007-09-25T07:19:15Z")

</div>

Shin guey Wong wrote:

> tried to install rubygems, it start complaining zlib not install. So, I  
> After install rubygems, I fire up IRB and type ‘require  
> ‘irb/completion’’. It complain again no readline ext found… ☹ I had  
> to start finding any readline source/library for windows available on  
> net. I successful to found it with GNUWin but still not able to compile  
> readline binding for ruby…I read the log file, it will check for  
> ncurse.lib, termcap.lib, curse.lib, edit/readline.h…where do I get all  
> this file???
> 
> So, can anyone tell me how to compile readline for ruby in windows?  
> and so for openssl, curse, iconv, tk…

You might want to look at the RubyForge details for the Windows  
One-Click Installer. Since it’s an open-source project, I’m guessing all  
the scripts, Vulcan nerve pinches, etc., necessary to build the  
One-Click Installer are there in the SCM repository. There may actually  
be a forum there too. Then again, Curt might just update the One-Click  
and Instant Rails with the latest Ruby source soon too. 🙂
