I am using ruby <b>1.8.4</b> (2005-12-24). <br><br>I added this code:<br><br>#define RARRAY_LEN(a) \<br> ((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ? \<br> (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \<br>
(RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)) : \<br> RARRAY(a)->as.heap.len)<br>#define RARRAY_PTR(a) \<br> ((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ? \<br> RARRAY(a)->as.ary : \<br>
RARRAY(a)->as.heap.ptr)<br><br>#define RREGEXP_SRC_LEN(r) RSTRING_LEN(RREGEXP(r)->src)<br><br>to my current "<font size="4"><b>ruby.h</b></font>" I try to compile and it failed again giving me a runtime error of other file. I took this code from the file ruby.h in Ruby's release: ruby-1.9.1-p0<br>
<br>I substitute my ruby.h (version 1.8.4) using ruby.h (version ruby-1.9.1-p0) but it failed to compile, too.<br><br>As I am newbie in this matter, I am thinking in to update my Ruby version. Maybe it can fix my issue.<br>
<br>What do you think/suggest?<br><br><br><br>Regards,<br><br><br>--<br>GatoLinux<br><br><br>In file included from librb.c:355:<br>/usr/lib/ruby/1.8/i486-linux/ruby.h:476: error: syntax error before "struct"<br>
make: *** [librb.o] Error 1<br>install.rb:655:in `command': system("make") failed (RuntimeError)<br> from install.rb:664:in `make'<br> from install.rb:1258:in `setup_dir_ext'<br> from install.rb:1532:in `traverse'<br>
from install.rb:1549:in `dive_into'<br> from install.rb:1530:in `traverse'<br> from install.rb:1534:in `traverse'<br> from install.rb:1533:in `traverse'<br> from install.rb:1549:in `dive_into'<br>
from install.rb:1530:in `traverse'<br> from install.rb:1524:in `exec_task_traverse'<br> from install.rb:1519:in `exec_task_traverse'<br> from install.rb:1246:in `exec_setup'<br>
from install.rb:996:in `exec_setup'<br> from install.rb:826:in `invoke'<br> from install.rb:773:in `invoke'<br> from install.rb:1578<br><br><br><br><br><br><div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 13 Feb 2009 12:53:19 -0600<br>
From: GatoLinux <<a href="mailto:gatolinux@gmail.com">gatolinux@gmail.com</a>><br>
Subject: [fxruby-users] install.rb:655:in `command': system("make")<br>
failed (RuntimeError)<br>
To: <a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a><br>
Message-ID:<br>
<<a href="mailto:a77c2c700902131053w77c7ac11o639db9f8841dbc55@mail.gmail.com">a77c2c700902131053w77c7ac11o639db9f8841dbc55@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hello!<br>
<br>
<br>
I used this command:<br>
<br>
<br>
ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/include/<br>
--with-fox-lib=/opt/fox-1.6.35/lib/<br>
<br>
to configure FXRuby; then, I ran:<br>
<br>
ruby install.rb setup followed by ruby install.rb install<br>
<br>
but I got this installation error:<br>
<br>
<br>
In file included from include/FXRuby.h:825,<br>
from include/FXRbCommon.h:93,<br>
from ui_wrap.cpp:584:<br>
include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*, VALUE,<br>
bool)':<br>
include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in this scope<br>
ui_wrap.cpp: In function `void<br>
FXFileSelector_setPatternList(FX::FXFileSelector*, VALUE)':<br>
ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope<br>
ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int, VALUE*,<br>
VALUE)':<br>
ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope<br>
ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int, VALUE*,<br>
VALUE)':<br>
ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope<br>
ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int, VALUE*,<br>
VALUE)':<br>
ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope<br>
make: *** [ui_wrap.o] Error 1<br>
install.rb:655:in `command': system("make") failed (RuntimeError)<br>
from install.rb:664:in `make'<br>
from install.rb:1258:in `setup_dir_ext'<br>
from install.rb:1532:in `traverse'<br>
from install.rb:1549:in `dive_into'<br>
from install.rb:1530:in `traverse'<br>
from install.rb:1534:in `traverse'<br>
from install.rb:1533:in `traverse'<br>
from install.rb:1549:in `dive_into'<br>
from install.rb:1530:in `traverse'<br>
from install.rb:1524:in `exec_task_traverse'<br>
from install.rb:1519:in `exec_task_traverse'<br>
from install.rb:1246:in `exec_setup'<br>
from install.rb:996:in `exec_setup'<br>
from install.rb:826:in `invoke'<br>
from install.rb:773:in `invoke'<br>
from install.rb:1578<br>
<br>
So, I was unable to install FXRuby (version 1.6.13) from its sources.<br>
<br>
Can you give me any clue to fix this issue?<br>
<br>
I am running Slackware 11.0 with fox-1.6.35<br>
<br>
<br>
Regards,<br>
<br>
<br>
<br>
GatoLinux<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://rubyforge.org/pipermail/fxruby-users/attachments/20090213/a0f640db/attachment-0001.html" target="_blank">http://rubyforge.org/pipermail/fxruby-users/attachments/20090213/a0f640db/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Fri, 13 Feb 2009 17:48:22 -0600<br>
From: Lyle Johnson <<a href="mailto:lyle@lylejohnson.name">lyle@lylejohnson.name</a>><br>
Subject: Re: [fxruby-users] install.rb:655:in `command':<br>
system("make") failed (RuntimeError)<br>
To: "<a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a>" <<a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a>><br>
Message-ID: <<a href="mailto:397F82D6-D454-4CC3-A4EA-C3AB2341DBFC@lylejohnson.name">397F82D6-D454-4CC3-A4EA-C3AB2341DBFC@lylejohnson.name</a>><br>
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes<br>
<br>
What version of Ruby are you building against? I thought the<br>
RARRAY_LEN macro had been available for awhile now.<br>
<br>
On Feb 13, 2009, at 12:53 PM, GatoLinux <<a href="mailto:gatolinux@gmail.com">gatolinux@gmail.com</a>> wrote:<br>
<br>
> Hello!<br>
><br>
><br>
> I used this command:<br>
><br>
><br>
> ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/<br>
> include/ --with-fox-lib=/opt/fox-1.6.35/lib/<br>
><br>
> to configure FXRuby; then, I ran:<br>
><br>
> ruby install.rb setup followed by ruby install.rb install<br>
><br>
> but I got this installation error:<br>
><br>
><br>
> In file included from include/FXRuby.h:825,<br>
> from include/FXRbCommon.h:93,<br>
> from ui_wrap.cpp:584:<br>
> include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*,<br>
> VALUE, bool)':<br>
> include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in<br>
> this scope<br>
> ui_wrap.cpp: In function `void<br>
> FXFileSelector_setPatternList(FX::FXFileSelector*, VALUE)':<br>
> ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope<br>
> ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int,<br>
> VALUE*, VALUE)':<br>
> ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope<br>
> ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int,<br>
> VALUE*, VALUE)':<br>
> ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope<br>
> ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int,<br>
> VALUE*, VALUE)':<br>
> ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope<br>
> make: *** [ui_wrap.o] Error 1<br>
> install.rb:655:in `command': system("make") failed (RuntimeError)<br>
> from install.rb:664:in `make'<br>
> from install.rb:1258:in `setup_dir_ext'<br>
> from install.rb:1532:in `traverse'<br>
> from install.rb:1549:in `dive_into'<br>
> from install.rb:1530:in `traverse'<br>
> from install.rb:1534:in `traverse'<br>
> from install.rb:1533:in `traverse'<br>
> from install.rb:1549:in `dive_into'<br>
> from install.rb:1530:in `traverse'<br>
> from install.rb:1524:in `exec_task_traverse'<br>
> from install.rb:1519:in `exec_task_traverse'<br>
> from install.rb:1246:in `exec_setup'<br>
> from install.rb:996:in `exec_setup'<br>
> from install.rb:826:in `invoke'<br>
> from install.rb:773:in `invoke'<br>
> from install.rb:1578<br>
><br>
> So, I was unable to install FXRuby (version 1.6.13) from its sources.<br>
><br>
> Can you give me any clue to fix this issue?<br>
><br>
> I am running Slackware 11.0 with fox-1.6.35<br>
><br>
><br>
> Regards,<br>
><br>
><br>
><br>
> GatoLinux<br>
> _______________________________________________<br>
> fxruby-users mailing list<br>
> <a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a><br>
> <a href="http://rubyforge.org/mailman/listinfo/fxruby-users" target="_blank">http://rubyforge.org/mailman/listinfo/fxruby-users</a><br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Fri, 13 Feb 2009 21:43:20 -0800<br>
From: David MacMahon <<a href="mailto:davidm@astro.berkeley.edu">davidm@astro.berkeley.edu</a>><br>
Subject: Re: [fxruby-users] install.rb:655:in `command':<br>
system("make") failed (RuntimeError)<br>
To: <a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a><br>
Message-ID: <<a href="mailto:C95732A1-4CDF-4AC3-A04A-6329B873007B@astro.berkeley.edu">C95732A1-4CDF-4AC3-A04A-6329B873007B@astro.berkeley.edu</a>><br>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed<br>
<br>
Hi, Lyle,<br>
<br>
FWIW, I also ran into this problem when building fxruby against Ruby<br>
1.8.5 (on SuSE 10.1, I think). I think I just hacked definitions of<br>
these macros into 1.8.5's ruby.h file...<br>
<br>
RARRAY_LEN<br>
RARRAY_PTR<br>
RSTRING_LEN<br>
RSTRING_PTR<br>
<br>
I took the definitions from a 1.8.6 ruby.h file.<br>
<br>
IMHO, it wouldn't be a bad thing to put them in an fxruby include<br>
file with #ifndef guards around them.<br>
<br>
Dave<br>
<br>
On Feb 13, 2009, at 15:48 , Lyle Johnson wrote:<br>
<br>
> What version of Ruby are you building against? I thought the<br>
> RARRAY_LEN macro had been available for awhile now.<br>
><br>
> On Feb 13, 2009, at 12:53 PM, GatoLinux <<a href="mailto:gatolinux@gmail.com">gatolinux@gmail.com</a>> wrote:<br>
><br>
>> Hello!<br>
>><br>
>><br>
>> I used this command:<br>
>><br>
>><br>
>> ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/<br>
>> include/ --with-fox-lib=/opt/fox-1.6.35/lib/<br>
>><br>
>> to configure FXRuby; then, I ran:<br>
>><br>
>> ruby install.rb setup followed by ruby install.rb install<br>
>><br>
>> but I got this installation error:<br>
>><br>
>><br>
>> In file included from include/FXRuby.h:825,<br>
>> from include/FXRbCommon.h:93,<br>
>> from ui_wrap.cpp:584:<br>
>> include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*,<br>
>> VALUE, bool)':<br>
>> include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in<br>
>> this scope<br>
>> ui_wrap.cpp: In function `void FXFileSelector_setPatternList<br>
>> (FX::FXFileSelector*, VALUE)':<br>
>> ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope<br>
>> ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int,<br>
>> VALUE*, VALUE)':<br>
>> ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope<br>
>> ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int,<br>
>> VALUE*, VALUE)':<br>
>> ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope<br>
>> ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int,<br>
>> VALUE*, VALUE)':<br>
>> ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope<br>
>> make: *** [ui_wrap.o] Error 1<br>
>> install.rb:655:in `command': system("make") failed (RuntimeError)<br>
>> from install.rb:664:in `make'<br>
>> from install.rb:1258:in `setup_dir_ext'<br>
>> from install.rb:1532:in `traverse'<br>
>> from install.rb:1549:in `dive_into'<br>
>> from install.rb:1530:in `traverse'<br>
>> from install.rb:1534:in `traverse'<br>
>> from install.rb:1533:in `traverse'<br>
>> from install.rb:1549:in `dive_into'<br>
>> from install.rb:1530:in `traverse'<br>
>> from install.rb:1524:in `exec_task_traverse'<br>
>> from install.rb:1519:in `exec_task_traverse'<br>
>> from install.rb:1246:in `exec_setup'<br>
>> from install.rb:996:in `exec_setup'<br>
>> from install.rb:826:in `invoke'<br>
>> from install.rb:773:in `invoke'<br>
>> from install.rb:1578<br>
>><br>
>> So, I was unable to install FXRuby (version 1.6.13) from its sources.<br>
>><br>
>> Can you give me any clue to fix this issue?<br>
>><br>
>> I am running Slackware 11.0 with fox-1.6.35<br>
>><br>
>><br>
>> Regards,<br>
>><br>
>><br>
>><br>
>> GatoLinux<br>
>> _______________________________________________<br>
>> fxruby-users mailing list<br>
>> <a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a><br>
>> <a href="http://rubyforge.org/mailman/listinfo/fxruby-users" target="_blank">http://rubyforge.org/mailman/listinfo/fxruby-users</a><br>
> _______________________________________________<br>
> fxruby-users mailing list<br>
> <a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a><br>
> <a href="http://rubyforge.org/mailman/listinfo/fxruby-users" target="_blank">http://rubyforge.org/mailman/listinfo/fxruby-users</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Sat, 14 Feb 2009 10:33:50 -0600<br>
From: Lyle Johnson <<a href="mailto:lyle@lylejohnson.name">lyle@lylejohnson.name</a>><br>
Subject: Re: [fxruby-users] install.rb:655:in `command':<br>
system("make") failed (RuntimeError)<br>
To: "<a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a>" <<a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a>><br>
Message-ID: <<a href="mailto:7E577695-D3B6-41C8-BCD5-6DC50228220B@lylejohnson.name">7E577695-D3B6-41C8-BCD5-6DC50228220B@lylejohnson.name</a>><br>
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes<br>
<br>
Dave,<br>
<br>
Thanks. I'll look at adding those #defines in the next release. Ruby<br>
1.8.6 has been available for so long now that I didn't consider I<br>
might be breaking back-compatibility!<br>
<br>
Sent from my iPhone<br>
<br>
On Feb 13, 2009, at 11:43 PM, David MacMahon<br>
<<a href="mailto:davidm@astro.berkeley.edu">davidm@astro.berkeley.edu</a>> wrote:<br>
<br>
> Hi, Lyle,<br>
><br>
> FWIW, I also ran into this problem when building fxruby against Ruby<br>
> 1.8.5 (on SuSE 10.1, I think). I think I just hacked definitions of<br>
> these macros into 1.8.5's ruby.h file...<br>
><br>
> RARRAY_LEN<br>
> RARRAY_PTR<br>
> RSTRING_LEN<br>
> RSTRING_PTR<br>
><br>
> I took the definitions from a 1.8.6 ruby.h file.<br>
><br>
> IMHO, it wouldn't be a bad thing to put them in an fxruby include<br>
> file with #ifndef guards around them.<br>
><br>
> Dave<br>
><br>
> On Feb 13, 2009, at 15:48 , Lyle Johnson wrote:<br>
><br>
>> What version of Ruby are you building against? I thought the<br>
>> RARRAY_LEN macro had been available for awhile now.<br>
>><br>
>> On Feb 13, 2009, at 12:53 PM, GatoLinux <<a href="mailto:gatolinux@gmail.com">gatolinux@gmail.com</a>> wrote:<br>
>><br>
>>> Hello!<br>
>>><br>
>>><br>
>>> I used this command:<br>
>>><br>
>>><br>
>>> ruby install.rb config -- \ --with-fox-include=/opt/fox-1.6.35/<br>
>>> include/ --with-fox-lib=/opt/fox-1.6.35/lib/<br>
>>><br>
>>> to configure FXRuby; then, I ran:<br>
>>><br>
>>> ruby install.rb setup followed by ruby install.rb install<br>
>>><br>
>>> but I got this installation error:<br>
>>><br>
>>><br>
>>> In file included from include/FXRuby.h:825,<br>
>>> from include/FXRbCommon.h:93,<br>
>>> from ui_wrap.cpp:584:<br>
>>> include/inlinestubs.h: In function `void FXApp_init(FX::FXApp*,<br>
>>> VALUE, bool)':<br>
>>> include/inlinestubs.h:20: error: `RARRAY_LEN' was not declared in<br>
>>> this scope<br>
>>> ui_wrap.cpp: In function `void<br>
>>> FXFileSelector_setPatternList(FX::FXFileSelector*, VALUE)':<br>
>>> ui_wrap.cpp:1016: error: `RARRAY_LEN' was not declared in this scope<br>
>>> ui_wrap.cpp: In function `VALUE _wrap_FXComboBox_fillItems(int,<br>
>>> VALUE*, VALUE)':<br>
>>> ui_wrap.cpp:4979: error: `RARRAY_LEN' was not declared in this scope<br>
>>> ui_wrap.cpp: In function `VALUE _wrap_FXListBox_fillItems(int,<br>
>>> VALUE*, VALUE)':<br>
>>> ui_wrap.cpp:5444: error: `RARRAY_LEN' was not declared in this scope<br>
>>> ui_wrap.cpp: In function `VALUE _wrap_FXTreeListBox_fillItems(int,<br>
>>> VALUE*, VALUE)':<br>
>>> ui_wrap.cpp:5903: error: `RARRAY_LEN' was not declared in this scope<br>
>>> make: *** [ui_wrap.o] Error 1<br>
>>> install.rb:655:in `command': system("make") failed (RuntimeError)<br>
>>> from install.rb:664:in `make'<br>
>>> from install.rb:1258:in `setup_dir_ext'<br>
>>> from install.rb:1532:in `traverse'<br>
>>> from install.rb:1549:in `dive_into'<br>
>>> from install.rb:1530:in `traverse'<br>
>>> from install.rb:1534:in `traverse'<br>
>>> from install.rb:1533:in `traverse'<br>
>>> from install.rb:1549:in `dive_into'<br>
>>> from install.rb:1530:in `traverse'<br>
>>> from install.rb:1524:in `exec_task_traverse'<br>
>>> from install.rb:1519:in `exec_task_traverse'<br>
>>> from install.rb:1246:in `exec_setup'<br>
>>> from install.rb:996:in `exec_setup'<br>
>>> from install.rb:826:in `invoke'<br>
>>> from install.rb:773:in `invoke'<br>
>>> from install.rb:1578<br>
>>><br>
>>> So, I was unable to install FXRuby (version 1.6.13) from its<br>
>>> sources.<br>
>>><br>
>>> Can you give me any clue to fix this issue?<br>
>>><br>
>>> I am running Slackware 11.0 with fox-1.6.35<br>
>>><br>
>>><br>
>>> Regards,<br>
>>><br>
>>><br>
>>><br>
>>> GatoLinux<br>
>>> _______________________________________________<br>
>>> fxruby-users mailing list<br>
>>> <a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a><br>
>>> <a href="http://rubyforge.org/mailman/listinfo/fxruby-users" target="_blank">http://rubyforge.org/mailman/listinfo/fxruby-users</a><br>
>> _______________________________________________<br>
>> fxruby-users mailing list<br>
>> <a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a><br>
>> <a href="http://rubyforge.org/mailman/listinfo/fxruby-users" target="_blank">http://rubyforge.org/mailman/listinfo/fxruby-users</a><br>
><br>
> _______________________________________________<br>
> fxruby-users mailing list<br>
> <a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a><br>
> <a href="http://rubyforge.org/mailman/listinfo/fxruby-users" target="_blank">http://rubyforge.org/mailman/listinfo/fxruby-users</a><br>
<br>
<br>
</blockquote></div><br><br>