# Building Ruby 1.8 preview 3

**URL:** <https://rubytalk.org/t/building-ruby-1-8-preview-3/6763>\
**Category:** ruby-talk\
**Created:** [9 July 2003 08:43 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763 "2003-07-09T08:43:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [9 July 2003 08:43 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763/1 "2003-07-09T08:43:36Z")

</div>

Folks,

I’m trying to build 1.8p3 on Cygwin, and failing for a rather  
unsatisfactory reason. It creates miniruby OK, but fails on the next step  
with the following error (hand typed):

Creating library file: libcygwin-ruby18.dll.a  
./ext/extmk.rb:28:in `require’: No such file to load – mkmf (LoadError)  
from ./ext/extmk.rb:28  
make: \*\*\* [all] Error 1

The output of (./miniruby -e ‘puts $:’) is  
/home/gavin/build/ruby-1.8.0/lib/ruby/…

where … = 1.8, site\_ruby, and the normal subdirs.

./lib/ruby doesn’t exist; all the libs are in ./lib.

Am I doing something wrong?

Regards,  
Gavin

---

<div class="post-metadata">

**Author:** ![Patrick\_Zesar](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@Patrick\_Zesar](https://rubytalk.org/u/Patrick_Zesar)\
**Post date:** [9 July 2003 09:09 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763/2 "2003-07-09T09:09:59Z")

</div>

> Creating library file: libcygwin-ruby18.dll.a  
> ./ext/extmk.rb:28:in `require’: No such file to load – mkmf(LoadError)  
> from ./ext/extmk.rb:28

yeah - i get this one too but i didn’t dare to ask this in the group - i  
just thought i was too stupid. good to know there are other people having  
the same problem :-))

patrick

---

<div class="post-metadata">

**Author:** ![WATANABE\_Hirofumi1](https://avatars.discourse-cdn.com/v4/letter/w/c2a13f/32.png) [@WATANABE\_Hirofumi1](https://rubytalk.org/u/WATANABE_Hirofumi1)\
**Post date:** [9 July 2003 09:32 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763/3 "2003-07-09T09:32:01Z")

</div>

Hi,

“Gavin Sinclair” [gsinclair@soyabean.com.au](mailto:gsinclair@soyabean.com.au) writes:

> I’m trying to build 1.8p3 on Cygwin, and failing for a rather  
> unsatisfactory reason. It creates miniruby OK, but fails on the next step  
> with the following error (hand typed):
> 
> Creating library file: libcygwin-ruby18.dll.a  
> ./ext/extmk.rb:28:in `require’: No such file to load – mkmf (LoadError)  
> from ./ext/extmk.rb:28  
> make: \*\*\* [all] Error 1
> 
> The output of (./miniruby -e ‘puts $:’) is  
> /home/gavin/build/ruby-1.8.0/lib/ruby/…
> 
> where … = 1.8, site\_ruby, and the normal subdirs.
> 
> ./lib/ruby doesn’t exist; all the libs are in ./lib.
> 
> Am I doing something wrong?

Try this or check the latest CVS.

Index: mkconfig.rb

> **···**
>
> ===================================================================  
> RCS file: /src/ruby/mkconfig.rb,v  
> retrieving revision 1.30  
> diff -u -1 -r1.30 mkconfig.rb  
> — mkconfig.rb 9 Apr 2003 15:45:28 -0000 1.30  
> +++ mkconfig.rb 9 Jul 2003 09:26:12 -0000  
> @@ -50,3 +50,3 @@  
> elsif /^(?:ac\_given\_)?srcdir=(.\*)/ =~ line
> 
> - srcdir = $1
> 
> - srcdir = $1.strip  
> elsif /^ac\_given\_INSTALL=(.\*)/ =~ line

---

<div class="post-metadata">

**Author:** ![Gour](https://avatars.discourse-cdn.com/v4/letter/g/f1d935/32.png) [@Gour](https://rubytalk.org/u/Gour)\
**Post date:** [9 July 2003 10:26 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763/4 "2003-07-09T10:26:08Z")

</div>

Although it’s not the real solution, but I just compiled Ruby with MinGW in MSYS  
environment.

Sincerely,  
Gour

> **···**
>
> patrick zesar ([jonnypichler@gmx.net](mailto:jonnypichler@gmx.net)) wrote:
> 
> > > Creating library file: libcygwin-ruby18.dll.a  
> > > ./ext/extmk.rb:28:in `require’: No such file to load – mkmf(LoadError)  
> > > from ./ext/extmk.rb:28
> > 
> > yeah - i get this one too but i didn’t dare to ask this in the group - i  
> > just thought i was too stupid. good to know there are other people having  
> > the same problem :-))
> 
> –  
> Gour  
> gour@mail.inet.hr  
> Registered Linux User #278493

---

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [12 July 2003 03:22 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763/5 "2003-07-12T03:22:21Z")

</div>

Thanks so much, that worked well … at “installing” (though  
/usr/local/bin/ruby.exe was not created).

Now “make clean; make” breaks. I’ll investigate and repost if  
necessary.

Cheers,  
Gavin

> **···**
>
> On Wednesday, July 9, 2003, 7:32:01 PM, WATANABE wrote:
> 
> > > Am I doing something wrong?
> 
> > Try this or check the latest CVS.
> 
> > […]

---

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [12 July 2003 02:16 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763/6 "2003-07-12T02:16:33Z")

</div>

Hmmmmm… I just gave that a go and it worked (to a certain extent).  
I wonder why the difference.

Under MinGW, “make install” does not install ruby.exe anywhere,  
though. It only creates the /usr/local/lib directory.

Gavin

> **···**
>
> On Wednesday, July 9, 2003, 8:26:08 PM, Gour wrote:
> 
> > patrick zesar ([jonnypichler@gmx.net](mailto:jonnypichler@gmx.net)) wrote:
> > 
> > > > Creating library file: libcygwin-ruby18.dll.a  
> > > > ./ext/extmk.rb:28:in `require’: No such file to load – mkmf(LoadError)  
> > > > from ./ext/extmk.rb:28
> > > 
> > > yeah - i get this one too but i didn’t dare to ask this in the group - i  
> > > just thought i was too stupid. good to know there are other people having  
> > > the same problem :-))
> 
> > Although it’s not the real solution, but I just compiled Ruby with MinGW in MSYS  
> > environment.

---

<div class="post-metadata">

**Author:** ![Gour](https://avatars.discourse-cdn.com/v4/letter/g/f1d935/32.png) [@Gour](https://rubytalk.org/u/Gour)\
**Post date:** [12 July 2003 07:40 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763/7 "2003-07-12T07:40:20Z")

</div>

Unfortunately I cannot reproduce your problem. With MingW (gcc 3.2) and latest MSYS 1.09,  
running configure --prefix=C:/mingw, everything is installed nicely (I install all my  
programs under /mingw which is symlink to c:/MinGW, not under msys folder.), and ruby.exe  
is produced, as well as rubyw.exe and miniruby.exe.

Do you have miniruby.exe after make?

Sincerely,  
Gour

> **···**
>
> Gavin Sinclair (gsinclair@soyabean.com.au) wrote:
> 
> > Hmmmmm… I just gave that a go and it worked (to a certain extent).  
> > I wonder why the difference.
> > 
> > Under MinGW, “make install” does not install ruby.exe anywhere,  
> > though. It only creates the /usr/local/lib directory.
> 
> –  
> Gour  
> gour@mail.inet.hr  
> Registered Linux User #278493

---

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [13 July 2003 09:03 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763/8 "2003-07-13T09:03:03Z")

</div>

Yes, miniruiby.exe is created (several build steps depend on this),  
and ruby.exe and rubyw.exe are created, but only in the “current”  
directory (i.e. where the build is performed).

I’ll do what I can to produce a pristine operating environment and try  
again.

Also, it seems that perhaps it’s best to just build from the latest  
CVS, rather than a “preview” snapshot.

Gavin

> **···**
>
> On Saturday, July 12, 2003, 5:40:20 PM, Gour wrote:
> 
> > Gavin Sinclair (gsinclair@soyabean.com.au) wrote:
> 
> > > Hmmmmm… I just gave that a go and it worked (to a certain extent).  
> > > I wonder why the difference.
> > > 
> > > Under MinGW, “make install” does not install ruby.exe anywhere,  
> > > though. It only creates the /usr/local/lib directory.
> 
> > Unfortunately I cannot reproduce your problem. With MingW (gcc 3.2) and latest MSYS 1.09,  
> > running configure --prefix=C:/mingw, everything is installed nicely (I install all my  
> > programs under /mingw which is symlink to c:/MinGW, not under msys folder.), and ruby.exe  
> > is produced, as well as rubyw.exe and miniruby.exe.
> 
> > Do you have miniruby.exe after make?

---

<div class="post-metadata">

**Author:** ![Ariff\_Abdullah1](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@Ariff\_Abdullah1](https://rubytalk.org/u/Ariff_Abdullah1)\
**Post date:** [13 July 2003 11:14 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763/9 "2003-07-13T11:14:10Z")

</div>

My solution is using something like

1. miniruby.exe instruby.rb --dest-dir=c:/whatever
2. miniruby.exe ext\extmk.rb --dest-dir=c:/whatever install

> **···**
>
> On Sun, 13 Jul 2003 18:03:03 +0900 Gavin Sinclair [gsinclair@soyabean.com.au](mailto:gsinclair@soyabean.com.au) wrote:
> 
> > On Saturday, July 12, 2003, 5:40:20 PM, Gour wrote:
> > 
> > > Gavin Sinclair (gsinclair@soyabean.com.au) wrote:
> > 
> > > > Hmmmmm… I just gave that a go and it worked (to a certain extent).  
> > > > I wonder why the difference.
> > > > 
> > > > Under MinGW, “make install” does not install ruby.exe anywhere,  
> > > > though. It only creates the /usr/local/lib directory.
> > 
> > > Unfortunately I cannot reproduce your problem. With MingW (gcc 3.2) and latest MSYS 1.09,  
> > > running configure --prefix=C:/mingw, everything is installed nicely (I install all my  
> > > programs under /mingw which is symlink to c:/MinGW, not under msys folder.), and ruby.exe  
> > > is produced, as well as rubyw.exe and miniruby.exe.
> > 
> > > Do you have miniruby.exe after make?
> > 
> > Yes, miniruiby.exe is created (several build steps depend on this),  
> > and ruby.exe and rubyw.exe are created, but only in the “current”  
> > directory (i.e. where the build is performed).
> > 
> > I’ll do what I can to produce a pristine operating environment and try  
> > again.
> > 
> > Also, it seems that perhaps it’s best to just build from the latest  
> > CVS, rather than a “preview” snapshot.
> > 
> > Gavin
> 
> –  
> Ariff Abdullah  
> MyBSD

---

<div class="post-metadata">

**Author:** ![Gour](https://avatars.discourse-cdn.com/v4/letter/g/f1d935/32.png) [@Gour](https://rubytalk.org/u/Gour)\
**Post date:** [13 July 2003 17:34 UTC](https://rubytalk.org/t/building-ruby-1-8-preview-3/6763/10 "2003-07-13T17:34:44Z")

</div>

> I’ll do what I can to produce a pristine operating environment and try  
> again.

Well, MinGW & MSYS environment is, imho, very easy to install - just running  
two installers and then install everythin udner /MinGW tree.

> Also, it seems that perhaps it’s best to just build from the latest  
> CVS, rather than a “preview” snapshot.

With Ruby 1.8.0pre1 I wasn’t able to compile it, but pre3 is clean install.

Sincerely,  
Gour

> **···**
>
> Gavin Sinclair (gsinclair@soyabean.com.au) wrote:
> 
> –  
> Gour  
> gour@mail.inet.hr  
> Registered Linux User #278493
