|
List Info
Thread: Support for Ruby 1.9?
|
|
| Support for Ruby 1.9? |

|
2007-04-17 17:47:08 |
I'm trying to compile FXRuby under Ruby 1.9.0. After
applying the below
patch, I get the error:
FXRbApp.cpp: In member function 'long int
FXRbApp::onChoreThreads(FX::FXObject*, FX::FXSelector,
void*)':
FXRbApp.cpp:98: error: 'CHECK_INTS' was not declared in this
scope
I would fix this, but I'm not familiar with what this code
is doing.
Any estimate on support for 1.9 in FXRuby? I only ask
because I'm
trying to add support for 1.9 to my extensions, and I end up
building
FXRuby in the process.
Thanks,
Kevin
Index: pre-config.rb
============================================================
=======
--- pre-config.rb (revision 921)
+++ pre-config.rb (working copy)
 -20,7
+20,7 
def fox_include_files_found?
search_directories.each do |path|
filename = File.join(path, "fxver.h")
- return true if FileTest.exists?(filename)
+ return true if FileTest.exist?(filename)
end
false
end
 -44,7
+44,7 
def installed_fox_version
search_directories.each do |path|
filename = File.join(path, "fxver.h")
- if FileTest.exists?(filename)
+ if FileTest.exist?(filename)
foxMajor, foxMinor, foxLevel =
read_fox_version(filename)
return [foxMajor, foxMinor, foxLevel].join('.')
end
Index: ext/fox16/extconf.rb
============================================================
=======
--- ext/fox16/extconf.rb (revision 921)
+++ ext/fox16/extconf.rb (working copy)
 -20,7
+20,7 
incdirs.each do |incdir|
filename = File.join(incdir, "fxver.h")
- if FileTest.exists?(filename)
+ if FileTest.exist?(filename)
idircflag = "-I" + incdir
$CPPFLAGS += " " + idircflag unless
$CPPFLAGS.split.include?(idircflag)
return
 -50,7
+50,7 
incdirs.each do |incdir|
filename = File.join(incdir,
"FXScintilla.h")
- if FileTest.exists?(filename)
+ if FileTest.exist?(filename)
$autodetected_fxscintilla = true
idircflag = "-I" + incdir
$CPPFLAGS += " " + idircflag unless
$CPPFLAGS.split.include?(idircflag)
 -87,11
+87,11 
$libs = append_library($libs, "FOX-1.6")
$CFLAGS = $CFLAGS + " -fpermissive -DWIN32
-Iinclude"
if is_fxscintilla_build?
- File.move('scintilla_wrap.cpp.bak',
'scintilla_wrap.cpp') if
FileTest.exists?('scintilla_wrap.cpp.bak')
+ File.move('scintilla_wrap.cpp.bak',
'scintilla_wrap.cpp') if
FileTest.exist?('scintilla_wrap.cpp.bak')
$CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA
-DHAVE_FOX_1_6"
$libs = append_library($libs, "fxscintilla")
else
- File.move('scintilla_wrap.cpp',
'scintilla_wrap.cpp.bak') if
FileTest.exists?('scintilla_wrap.cpp')
+ File.move('scintilla_wrap.cpp',
'scintilla_wrap.cpp.bak') if
FileTest.exist?('scintilla_wrap.cpp')
end
end
 -113,11
+113,11 
$CFLAGS = $CFLAGS + " /DWIN32 /DUNICODE /GR /GX
/Iinclude"
$LOCAL_LIBS = $LOCAL_LIBS + "FOX-1.6.lib"
if is_fxscintilla_build?
- File.move('scintilla_wrap.cpp.bak',
'scintilla_wrap.cpp') if
FileTest.exists?('scintilla_wrap.cpp.bak')
+ File.move('scintilla_wrap.cpp.bak',
'scintilla_wrap.cpp') if
FileTest.exist?('scintilla_wrap.cpp.bak')
$CFLAGS = $CFLAGS + " /DWITH_FXSCINTILLA
/DHAVE_FOX_1_6"
$libs = append_library($libs, "fxscintilla")
else
- File.move('scintilla_wrap.cpp',
'scintilla_wrap.cpp.bak') if
FileTest.exists?('scintilla_wrap.cpp')
+ File.move('scintilla_wrap.cpp',
'scintilla_wrap.cpp.bak') if
FileTest.exist?('scintilla_wrap.cpp')
end
end
 -139,11
+139,11 
$libs = append_library($libs, "FOX-1.6")
$CFLAGS = $CFLAGS + " -O0 -Iinclude"
if is_fxscintilla_build?
- File.move('scintilla_wrap.cpp.bak',
'scintilla_wrap.cpp') if
FileTest.exists?('scintilla_wrap.cpp.bak')
+ File.move('scintilla_wrap.cpp.bak',
'scintilla_wrap.cpp') if
FileTest.exist?('scintilla_wrap.cpp.bak')
$CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA
-DHAVE_FOX_1_6"
$libs = append_library($libs, "fxscintilla")
else
- File.move('scintilla_wrap.cpp',
'scintilla_wrap.cpp.bak') if
FileTest.exists?('scintilla_wrap.cpp')
+ File.move('scintilla_wrap.cpp',
'scintilla_wrap.cpp.bak') if
FileTest.exist?('scintilla_wrap.cpp')
end
end
Index: install.rb
============================================================
=======
--- install.rb (revision 921)
+++ install.rb (working copy)
 -237,7
+237,6 
table[k] = default
end
end
- private :init
def save
File.open(SAVE_FILE, 'w') {|f|
http://www.systemware.com/
_______________________________________________
fxruby-users mailing list
fxruby-users rubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/fxruby-users
|
|
| Re: Support for Ruby 1.9? |

|
2007-04-17 18:30:44 |
On 4/17/07, Kevin Burge <kevin.burge systemware.com> wrote:
> Any estimate on support for 1.9 in FXRuby? I only ask
because I'm
> trying to add support for 1.9 to my extensions, and I
end up building
> FXRuby in the process.
Yikes, Ruby 1.9 wasn't even on my radar screen yet. Since
you've
actually done some stuff with it -- Is it stable enough to
even try
out yet? I know the official release won't be until the end
of the
year (or whatever), but is it kinda working at this point?
I will file a bug report about adding Ruby 1.9 support and
see what I can do.
_______________________________________________
fxruby-users mailing list
fxruby-users rubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/fxruby-users
|
|
| Re: Support for Ruby 1.9? |

|
2007-04-17 19:04:33 |
Lyle Johnson wrote:
> On 4/17/07, Kevin Burge <kevin.burge systemware.com> wrote:
>
>> Any estimate on support for 1.9 in FXRuby? I only
ask because I'm
>> trying to add support for 1.9 to my extensions, and
I end up building
>> FXRuby in the process.
>
> Yikes, Ruby 1.9 wasn't even on my radar screen yet.
Since you've
> actually done some stuff with it -- Is it stable enough
to even try
> out yet? I know the official release won't be until the
end of the
> year (or whatever), but is it kinda working at this
point?
As far as I can tell, ruby1.9 has always been functional.
It has
remained more or less stable since the YARV merge last
December.
There are relatively minor changes to the C api, but nothing
earth
shattering for .so writers.
The only big gotcha is that ruby1.9 does away with
continuations and
that yarv is a little bit more multithread aware (not quite,
really, but
you need to prepare for it), so some of the internal stuff
in eval.c is
quite different.
SWIG should already be 1.9 aware, as far as I can tell.
PS. Talking about SWIG. As a result of me wrapping FLTK
and the Maya
API library under it, I've submitted 4 patches to the latest
SWIG for
ruby. Two are for relatively serious bugs in it (that could
potentially
crash it on some rare ocassions). I'm not sure if Fox could
benefit
from those (Fox mainly uses its own classes and relatively
little of the
features swig).
--
Gonzalo Garramuņo
ggarra advancedsl.com.ar
AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy
_______________________________________________
fxruby-users mailing list
fxruby-users rubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/fxruby-users
|
|
| Re: Support for Ruby 1.9? |

|
2007-04-17 19:24:06 |
On 4/17/07, gga <ggarra advancedsl.com.ar>
wrote:
> As far as I can tell, ruby1.9 has always been
functional. It has
> remained more or less stable since the YARV merge last
December.
> There are relatively minor changes to the C api, but
nothing earth
> shattering for .so writers.
OK.
> PS. Talking about SWIG. As a result of me wrapping
FLTK and the Maya
> API library under it, I've submitted 4 patches to the
latest SWIG for
> ruby. Two are for relatively serious bugs in it (that
could potentially
> crash it on some rare ocassions). I'm not sure if Fox
could benefit
> from those (Fox mainly uses its own classes and
relatively little of the
> features swig).
Yes, the hard parts of FXRuby were completed before SWIG got
some of
its more recent useful features (like the director classes
support),
and there was some breakage for multiple modules for several
releases.
I will probably upgrade to a more recent SWIG at some point,
but right
now I'm using a modified version of SWIG 1.3.22.
_______________________________________________
fxruby-users mailing list
fxruby-users rubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/fxruby-users
|
|
| Re: Support for Ruby 1.9? |

|
2007-04-18 05:56:47 |
|
As an extension developer myself, I wanted to try to use 1.9 on a
day-to-day basis before it's released, to make sure that I don't write
any new incompatible code, and to possibly contribute by reporting bugs
to various projects that don't seem to be 1.9 compatible sooner rather
than later. IMO, it would be nice if, when 1.9 is finally released,
there are actually libraries that work with it beyond the standard
stuff. 
The main things that have affected me are:
in Ruby code:
String is not Enumerable (i.e. no each)
arity changes for blocks
send vs. funcall
Thread.critical not supported
using "case/when" with a colon, instead of "then" or ";", i.e. "when 7:
true"
in Extension code:
rb_cvar_set takes 1 less arg
RB_STRING doesn't allow direct access anymore (I've been converting to
RB_STRING_LEN and RB_STRING_PTR (not sure if this is the right thing
yet).
Also, YARV only supports native threads at this point, as far as I can
tell.
Lyle Johnson wrote:
mail.gmail.com"
type="cite">
On 4/17/07, Kevin Burge systemware.com"><kevin.burge systemware.com> wrote:
Any estimate on support for 1.9 in FXRuby? I only ask because I'm
trying to add support for 1.9 to my extensions, and I end up building
FXRuby in the process.
Yikes, Ruby 1.9 wasn't even on my radar screen yet. Since you've
actually done some stuff with it -- Is it stable enough to even try
out yet? I know the official release won't be until the end of the
year (or whatever), but is it kinda working at this point?
I will file a bug report about adding Ruby 1.9 support and see what I can do.
_______________________________________________
fxruby-users mailing list
rubyforge.org">fxruby-users rubyforge.org
http://rubyforge.org/mailman/listinfo/fxruby-users
http://www.systemware.com/ |
|
| Re: Support for Ruby 1.9? |

|
2007-04-18 07:05:25 |
|
On 4/18/07, Kevin Burge < kevin.burge systemware.com">kevin.burge systemware.com> wrote:
As an extension developer myself, I wanted to try to use 1.9 on a
day-to- day basis before it's released, to make sure that I don't write
any new incompatible code, and to possibly contribute by reporting bugs
to various projects that don't seem to be 1.9 compatible sooner rather
than later. IMO, it would be nice if, when 1.9 is finally released,
there are actually libraries that work with it beyond the standard
stuff.  Sure. ;)
Also, YARV only supports native threads at this point, as far as I can
tell.
Native threads, as in operating system threads? Or just the user-space threads that Ruby 1.8 provides?
Just an update: I checked out the trunk for Ruby 1.9 last night and built that, but I'm having trouble getting some critical stuff (namely, RubyGems) to even install. I'm sure this is just a temporary breakage, but it looks like it's going to be awhile before I can say that FXRuby "works" on Ruby
1.9. Nevertheless, I'll go ahead and apply the patches that you sent (for FileText.exists?) and so my best to get other things fixed in due time.
|
[1-6]
|
|