[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rubynodes extension failed compilation

Alexandru Popescu

7/19/2006 7:30:00 PM

Hi!

For the first time I am trying to install a Ruby package that has C
extensions (at least this is what I read). I am talking about
rubynode-0.1.0.

So, I have unarchived the tar.gz and tried running ruby setup.rb.
Unfortunately what I see is:

[console]
D:\mydlds\ruby\rubynode-0.1.0>ruby setup.rb
---> lib
<--- lib
---> ext
---> ext/ruby_node_ext
C:/ruby/ruby_1.8.4/bin/ruby.exe
D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext/extconf.rb
C:/ruby/ruby_1.8.4/lib/ruby/1.8/i386-mswin32/node.h
is different from
D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext/ruby_src/1.8.4/node.h

Please set RUBY_SOURCE_DIR to the source path of the current ruby!
*** D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext/extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--srcdir=D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext
--curdir
--ruby=C:/ruby/ruby_1.8.4/bin/ruby
setup.rb:655:in `command':
system("C:\\ruby\\ruby_1.8.4\\bin\\ruby.exe"
"D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext
/extconf.rb") failed (RuntimeError)
from setup.rb:660:in `ruby'
from setup.rb:1238:in `extconf'
from setup.rb:1230:in `config_dir_ext'
from setup.rb:1532:in `traverse'
from setup.rb:1549:in `dive_into'
from setup.rb:1530:in `traverse'
from setup.rb:1534:in `traverse'
from setup.rb:1533:in `traverse'
from setup.rb:1549:in `dive_into'
from setup.rb:1530:in `traverse'
from setup.rb:1524:in `exec_task_traverse'
from setup.rb:1519:in `exec_task_traverse'
from setup.rb:1223:in `exec_config'
from setup.rb:991:in `exec_config'
from setup.rb:812:in `invoke'
from setup.rb:773:in `invoke'
from setup.rb:1578
[/console]

I have an WinXP system, on which I have Ruby 1.8.4 (OneClickInstall -
I am reading the thread about compilers; in fact I am the one that
re-started somehow this discussion :-) ), and MinGW.

If I try setting the env variable
RUBY_SOURCE_DIR=C:\ruby\ruby_1.8.4\src\ruby-1.8.4\ or alternatives I
am always seeing the same error.

How can I get passed this? (so that I at least reach the problem
regarding compilers).

/alex
--
w( the_mindstorm )p.

7 Answers

Alexandru Popescu

7/19/2006 7:47:00 PM

0

I got past this problem... it looks like the rubynode distro includes
a header file that is compaired with the one existing in the Ruby
installation.

Now, I will try to get my hands on a VC6 compiler and see what's next.

Did anyone compiled rubynode with MinGW on a WinXP for Ruby built with
VC6? (damn, this question sounds so bad).

/alex
--
w( the_mindstorm )p.


On 7/19/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> Hi!
>
> For the first time I am trying to install a Ruby package that has C
> extensions (at least this is what I read). I am talking about
> rubynode-0.1.0.
>
> So, I have unarchived the tar.gz and tried running ruby setup.rb.
> Unfortunately what I see is:
>
> [console]
> D:\mydlds\ruby\rubynode-0.1.0>ruby setup.rb
> ---> lib
> <--- lib
> ---> ext
> ---> ext/ruby_node_ext
> C:/ruby/ruby_1.8.4/bin/ruby.exe
> D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext/extconf.rb
> C:/ruby/ruby_1.8.4/lib/ruby/1.8/i386-mswin32/node.h
> is different from
> D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext/ruby_src/1.8.4/node.h
>
> Please set RUBY_SOURCE_DIR to the source path of the current ruby!
> *** D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext/extconf.rb failed ***
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers. Check the mkmf.log file for more
> details. You may need configuration options.
>
> Provided configuration options:
> --with-opt-dir
> --without-opt-dir
> --with-opt-include
> --without-opt-include=${opt-dir}/include
> --with-opt-lib
> --without-opt-lib=${opt-dir}/lib
> --with-make-prog
> --srcdir=D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext
> --curdir
> --ruby=C:/ruby/ruby_1.8.4/bin/ruby
> setup.rb:655:in `command':
> system("C:\\ruby\\ruby_1.8.4\\bin\\ruby.exe"
> "D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext
> /extconf.rb") failed (RuntimeError)
> from setup.rb:660:in `ruby'
> from setup.rb:1238:in `extconf'
> from setup.rb:1230:in `config_dir_ext'
> from setup.rb:1532:in `traverse'
> from setup.rb:1549:in `dive_into'
> from setup.rb:1530:in `traverse'
> from setup.rb:1534:in `traverse'
> from setup.rb:1533:in `traverse'
> from setup.rb:1549:in `dive_into'
> from setup.rb:1530:in `traverse'
> from setup.rb:1524:in `exec_task_traverse'
> from setup.rb:1519:in `exec_task_traverse'
> from setup.rb:1223:in `exec_config'
> from setup.rb:991:in `exec_config'
> from setup.rb:812:in `invoke'
> from setup.rb:773:in `invoke'
> from setup.rb:1578
> [/console]
>
> I have an WinXP system, on which I have Ruby 1.8.4 (OneClickInstall -
> I am reading the thread about compilers; in fact I am the one that
> re-started somehow this discussion :-) ), and MinGW.
>
> If I try setting the env variable
> RUBY_SOURCE_DIR=C:\ruby\ruby_1.8.4\src\ruby-1.8.4\ or alternatives I
> am always seeing the same error.
>
> How can I get passed this? (so that I at least reach the problem
> regarding compilers).
>
> ./alex
> --
> .w( the_mindstorm )p.
>

Alexandru Popescu

7/19/2006 9:23:00 PM

0

Just to make the story short... I gave up (hey, don't blame me... my
time is limitted).

Here is why:

1/ the installation of VC6 is huge and after the time to install it,
when trying to launch cl.exe I got a DLL missing error.

2/ I have downloaded different distros for Windows (mswin32 from 04/14
and 06/12) and also one mingw (which looks to be the original 1.8.4)).
However, when trying ruby setup.rb it results in another error:

ruby: no such file to load -- ubygems (LoadError)

Result: after about 2 hours of playing... I gave up. C extensions are
not for me, and more important not for my environment. I guess
everybody else can pull his conclusions from this short story.

/alex
--
w( the_mindstorm )p.


On 7/19/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> I got past this problem... it looks like the rubynode distro includes
> a header file that is compaired with the one existing in the Ruby
> installation.
>
> Now, I will try to get my hands on a VC6 compiler and see what's next.
>
> Did anyone compiled rubynode with MinGW on a WinXP for Ruby built with
> VC6? (damn, this question sounds so bad).
>
> ./alex
> --
> .w( the_mindstorm )p.
>
>
> On 7/19/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> > Hi!
> >
> > For the first time I am trying to install a Ruby package that has C
> > extensions (at least this is what I read). I am talking about
> > rubynode-0.1.0.
> >
> > So, I have unarchived the tar.gz and tried running ruby setup.rb.
> > Unfortunately what I see is:
> >
> > [console]
> > D:\mydlds\ruby\rubynode-0.1.0>ruby setup.rb
> > ---> lib
> > <--- lib
> > ---> ext
> > ---> ext/ruby_node_ext
> > C:/ruby/ruby_1.8.4/bin/ruby.exe
> > D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext/extconf.rb
> > C:/ruby/ruby_1.8.4/lib/ruby/1.8/i386-mswin32/node.h
> > is different from
> > D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext/ruby_src/1.8.4/node.h
> >
> > Please set RUBY_SOURCE_DIR to the source path of the current ruby!
> > *** D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext/extconf.rb failed ***
> > Could not create Makefile due to some reason, probably lack of
> > necessary libraries and/or headers. Check the mkmf.log file for more
> > details. You may need configuration options.
> >
> > Provided configuration options:
> > --with-opt-dir
> > --without-opt-dir
> > --with-opt-include
> > --without-opt-include=${opt-dir}/include
> > --with-opt-lib
> > --without-opt-lib=${opt-dir}/lib
> > --with-make-prog
> > --srcdir=D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext
> > --curdir
> > --ruby=C:/ruby/ruby_1.8.4/bin/ruby
> > setup.rb:655:in `command':
> > system("C:\\ruby\\ruby_1.8.4\\bin\\ruby.exe"
> > "D:/mydlds/ruby/rubynode-0.1.0/ext/ruby_node_ext
> > /extconf.rb") failed (RuntimeError)
> > from setup.rb:660:in `ruby'
> > from setup.rb:1238:in `extconf'
> > from setup.rb:1230:in `config_dir_ext'
> > from setup.rb:1532:in `traverse'
> > from setup.rb:1549:in `dive_into'
> > from setup.rb:1530:in `traverse'
> > from setup.rb:1534:in `traverse'
> > from setup.rb:1533:in `traverse'
> > from setup.rb:1549:in `dive_into'
> > from setup.rb:1530:in `traverse'
> > from setup.rb:1524:in `exec_task_traverse'
> > from setup.rb:1519:in `exec_task_traverse'
> > from setup.rb:1223:in `exec_config'
> > from setup.rb:991:in `exec_config'
> > from setup.rb:812:in `invoke'
> > from setup.rb:773:in `invoke'
> > from setup.rb:1578
> > [/console]
> >
> > I have an WinXP system, on which I have Ruby 1.8.4 (OneClickInstall -
> > I am reading the thread about compilers; in fact I am the one that
> > re-started somehow this discussion :-) ), and MinGW.
> >
> > If I try setting the env variable
> > RUBY_SOURCE_DIR=C:\ruby\ruby_1.8.4\src\ruby-1.8.4\ or alternatives I
> > am always seeing the same error.
> >
> > How can I get passed this? (so that I at least reach the problem
> > regarding compilers).
> >
> > ./alex
> > --
> > .w( the_mindstorm )p.
> >
>

Simon Kröger

7/19/2006 9:38:00 PM

0

Alexandru Popescu wrote:
> Just to make the story short... I gave up (hey, don't blame me... my
> time is limitted).
>
> Here is why:
>
> [...]
>
> ruby: no such file to load -- ubygems (LoadError)

At least this one is easy, you have an environment variable

RUBYOPT=rubygems

but no rubygems installed.

cheers

Simon

Dominik Bathon

7/19/2006 10:50:00 PM

0

On Wed, 19 Jul 2006 21:46:46 +0200, Alexandru Popescu
<the.mindstorm.mailinglist@gmail.com> wrote:

> I got past this problem... it looks like the rubynode distro includes
> a header file that is compaired with the one existing in the Ruby
> installation.

The problem seems to be that the 1.8.4 One Click Installer uses Ruby 1.8.4
CVS HEAD as of 2006-04-14 (as Curt said in [ruby-talk:199979]), while the
official 1.8.4 was released on 2005-12-25. The node.h that is included in
the rubynode distribution is the one from the official release.

So you would need to somehow get the 1.8.4 source as of 2006-04-14 to
cleanly solve this. But the current stable snapshot should also work,
since node.h wasn't modified since 2006-04-14.

Dominik

> Now, I will try to get my hands on a VC6 compiler and see what's next.
>
> Did anyone compiled rubynode with MinGW on a WinXP for Ruby built with
> VC6? (damn, this question sounds so bad).
>
> ./alex
> --
> .w( the_mindstorm )p.

Alexandru Popescu

7/19/2006 11:26:00 PM

0

Many thanks for your additional infos.

However, please don't waste your time on this thread. For the moment,
I have decided that till I will not find a good documentation about
how to do it, and read that it works without any problems, I am NOT
gonna spend anymore time on this. (I do not intend to sound/be
sarcastic, but my time is limitted and I canot allow myself too much
play time that doesn't proove to go the right direction).

/alex
--
w( the_mindstorm )p.



On 7/20/06, Dominik Bathon <dbatml@gmx.de> wrote:
> On Wed, 19 Jul 2006 21:46:46 +0200, Alexandru Popescu
> <the.mindstorm.mailinglist@gmail.com> wrote:
>
> > I got past this problem... it looks like the rubynode distro includes
> > a header file that is compaired with the one existing in the Ruby
> > installation.
>
> The problem seems to be that the 1.8.4 One Click Installer uses Ruby 1.8.4
> CVS HEAD as of 2006-04-14 (as Curt said in [ruby-talk:199979]), while the
> official 1.8.4 was released on 2005-12-25. The node.h that is included in
> the rubynode distribution is the one from the official release.
>
> So you would need to somehow get the 1.8.4 source as of 2006-04-14 to
> cleanly solve this. But the current stable snapshot should also work,
> since node.h wasn't modified since 2006-04-14.
>
> Dominik
>
> > Now, I will try to get my hands on a VC6 compiler and see what's next.
> >
> > Did anyone compiled rubynode with MinGW on a WinXP for Ruby built with
> > VC6? (damn, this question sounds so bad).
> >
> > ./alex
> > --
> > .w( the_mindstorm )p.
>
>

Eric Hodel

7/20/2006 12:13:00 AM

0

On Jul 19, 2006, at 4:25 PM, Alexandru Popescu wrote:

> Many thanks for your additional infos.
>
> However, please don't waste your time on this thread. For the moment,
> I have decided that till I will not find a good documentation about
> how to do it, and read that it works without any problems, I am NOT
> gonna spend anymore time on this. (I do not intend to sound/be
> sarcastic, but my time is limitted and I canot allow myself too much
> play time that doesn't proove to go the right direction).

You may be interested in ParseTree instead.

It is written using RubyInline and works off of ruby newer than 1.8.2
(including CVS) and supports most of 1.9's nodes.

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...



ptkwt

7/20/2006 5:29:00 AM

0

In article <op.tcykdgsgd62ajc@localhost>, Dominik Bathon <dbatml@gmx.de> wrote:
>On Wed, 19 Jul 2006 21:46:46 +0200, Alexandru Popescu
><the.mindstorm.mailinglist@gmail.com> wrote:
>
>> I got past this problem... it looks like the rubynode distro includes
>> a header file that is compaired with the one existing in the Ruby
>> installation.
>
>The problem seems to be that the 1.8.4 One Click Installer uses Ruby 1.8.4
>CVS HEAD as of 2006-04-14 (as Curt said in [ruby-talk:199979]), while the
>official 1.8.4 was released on 2005-12-25. The node.h that is included in
>the rubynode distribution is the one from the official release.
>
>So you would need to somehow get the 1.8.4 source as of 2006-04-14 to
>cleanly solve this. But the current stable snapshot should also work,
>since node.h wasn't modified since 2006-04-14.
>

I seem to have had a similar problem, but on Linux. For some reason the
node.h included with the package didn't match the one on my system (ruby
1.8.4 as well). I just commented out the diff check in
ext/ruby_node_ext/extconf.rb and everything built fine. Here's the
relevant section of the extconf.rb:

node_h = IO.read(File.join($rbsrcdir, "node.h"))
gc_c = IO.read(File.join($rbsrcdir, "gc.c"))
eval_c = IO.read(File.join($rbsrcdir, "eval.c"))
# check if $hdrdir is "compatible" with $rbsrcdir
unless node_h == IO.read(File.join($hdrdir, "node.h"))
warn File.join($hdrdir, "node.h")
warn "is different from"
warn File.join($rbsrcdir, "node.h")
warn ""
warn "Please set RUBY_SOURCE_DIR to the source path of the
current ruby!"
#exit 1 <= COMMENT THIS LINE
end


After doing that everything was fine.

Phil