adaml2 at seznam.cz
2009-Mar-05 11:42 UTC
[fxruby-users] ruby1.9.1 fox1.7.19 fxrubygithub -> Init_core
ruby 1.9.1 #compiled # also fails with prepacked 1.8.7 ubuntu fox 1.7.19 #compiled swig 1.3.35 # apt-get fxruby from github # compiled and ?? The story goes over many errors.... and fails. After git clone fxruby. I tried doc/build advice: ( BTW there are texts 1.6.13 and 1.6.32, are you planning something as @@FXRUBYVERSION@@ ) ruby install.rb config fails with: /usr/local/bin/ruby: No such file or directory -- /x/my/fox/1/fxruby/ext/fox16/extconf.rb (LoadError) That''s because there is only extconf.rb.in. So I tried: rake build it failed with: scripts/iface.rb:387:in `ensure in main'': undefined method `close'' for nil:NilClass (NoMethodError) from scripts/iface.rb:388:in `main'' from scripts/iface.rb:391:in `<main>'' rake aborted! Command failed with status (1): [/usr/local/bin/ruby scripts/iface.rb -i ~/...] /x/my/fox/1/fxruby/Rakefile:240:in `block in <top (required)>'' looks like input = File.open(arg, File::RDONLY) raises exception, so input is still nil changed that to: input.close if input output.close if output rake build # again scripts/iface.rb:373:in `initialize'': No such file or directory - /home/v/src/fxscintilla/scintilla/include/Scintilla.iface (Errno::ENOENT) ok. I have no scintilla, fxscintilla and so I blocked whole Rakefile line # ruby "scripts/iface.rb -i ~/src/fxscintilla/scintilla/include/Scintilla.iface -o lib/fox16/scintilla.rb" rake build # again rake aborted! No such file or directory - FXRuby.spec.in /x/my/fox/1/fxruby/Rakefile:252:in `initialize'' Yeah. This file is really missing. I found some old version ( size 2011 ). rake build #again lot of text ...... part of that was: /usr/local/bin/ruby /x/my/fox/1/fxruby/ext/fox16/extconf.rb --with-fox-include=/usr/local/include/fox-1.7 --with-fox-lib=/usr/local/lib --without-fxscintilla finally with --without-fxscintilla ...... :-) but late and fails with: FXRbApp.cpp:27:25: error: swigrubyrun.h: No such file or directory rake swig # i did a change SWIG=/opt/.../swig hardcoded paths are very frequent in fxruby.... I did just: SWIG=swig rake swig # ok now rake build #again lot of compilation and finally: g++ ....................... -o FXRuby.o -c FXRuby.cpp FXRuby.cpp: In function ?VALUE FXRbMakeColorArray(const FX::FXColor*, FX::FXint, FX::FXint)?: FXRuby.cpp:457: warning: comparison between signed and unsigned integer expressions FXRuby.cpp: In function ?void* FXRbGetExpectedData(VALUE, FX::FXSelector, VALUE)?: FXRuby.cpp:1179: error: ?SWIG_Ruby_ConvertPtr? was not declared in this scope FXRuby.cpp:1186: error: ?SWIG_Ruby_ConvertPtr? was not declared in this scope I changed both these lines: ext/fox16/FXRuby.cpp:1179: SWIG_Ruby_ConvertPtr(value,&ptr,FXRbTypeQuery("FXPoint *"),1); ext/fox16/FXRuby.cpp:1186: SWIG_Ruby_ConvertPtr(value,&ptr,FXRbTypeQuery("FXEvent *"),1); to this text: SWIG_ConvertPtr rake build # ok rake test fails immediately with: /x/my/fox/1/fxruby/lib/fox16/timeout.rb:6:in `<class:FXApp>'': undefined method `addDeadline'' for class `Fox::FXApp'' (NameError) Hmm. this shouldn''t as addDeadline is there. I did install as root into /usr/local/lib ... It rewrote my normal fox16 !!!! rake test # again /usr/local/bin/ruby: symbol lookup error: /usr/local/lib/ruby/site_ruby/1.9.1/i686-linux/fox16.so: undefined symbol: Init_core This is end of story. I installed back fxruby 1.6.18 and quite disappointed .... notes 1) failure with addDeadline may be caused by loading fox16 from 1.6.35 which i have installed. That is: ''rake test'' should work with local uninstalled version ?? Or installed one ? 2) mixing Rakefiles Makefiles and install.rb was not fun for me at all. I don''t understand that process enough to try to correct that. So that all I can do is criticize. sorry. ada.
Lyle Johnson
2009-Mar-05 13:20 UTC
[fxruby-users] ruby1.9.1 fox1.7.19 fxrubygithub -> Init_core
On Mar 5, 2009, at 5:42 AM, adaml2 at seznam.cz wrote:> ruby 1.9.1 #compiled # also fails with prepacked 1.8.7 ubuntu > fox 1.7.19 #compiledFXRuby 1.6.x is only compatible with FOX 1.6. There is no release of FXRuby that is compatible with the (unstable) FOX 1.7 series.> swig 1.3.35 # apt-getYou don''t need SWIG to build FXRuby. It''s something I use in the development of FXRuby, but you don''t need it.> fxruby from github # compiled and ??Not sure what this sentence fragment means...> The story goes over many errors.... and fails. > After git clone fxruby. I tried doc/build advice:<snip> Did you try installing the gem that''s actually released? Or the source tarball that''s actually released? Official releases are here: http://rubyforge.org/projects/fxruby/> ( BTW there are texts 1.6.13 and 1.6.32, are you planning > something as @@FXRUBYVERSION@@ )I have no idea what you''re asking here. You know, I''m just going to stop here because your email is just all over the place. You say you''re running Ubuntu, right? Why not just install the packages for fox, i.e. sudo apt-get install libfox-1.6-dev And then install FXRuby from the gem: sudo gem install fxruby Hope this helps, Lyle P.S. If you run into trouble with this approach, please post back to the list, but try to be more specific about what''s going on.
adaml2 at seznam.cz
2009-Mar-06 07:45 UTC
[fxruby-users] ruby1.9.1 fox1.7.19 fxrubygithub -> Init_core
OK. It was story about compiling fxruby from github. I was really impressed by the amount of errors and your reaction just proves it. ( of course it also proves I''m bad writer. sorry for that ) BTW. ''sudo gem install fxruby'' doesn''t work on linux. Because File.move--> FileUtils.move bug. You''ve had several complains about that. ( you can install fxruby from a gem on windows, because its precompiled ) -----------------> You don''t need SWIG to build FXRuby. It''s something I use in the development > of FXRuby, but you don''t need it.I understand you are a swig developer and you feel high about yourself. Yeah you deserve a lot credit. But with this approach you''re going to do all alone. In doc/* section you have swig 1.3.22 as only alternative and in another place you have swig from cvs. So I wrote I have 1.3.35 installed from ubuntu, because that last Init_core error might be somehow caused by bad version of swig. I have no problem to install any other version - or you expect me trying all variants. If it depends on fixed swig version - check for it. And update doc/* ----------------- To end this. I was curious if there exist a simple way to wrap other non-official fox classes to be used from ruby. If someone writes some C++ Fox Widget and I will want to use it from ruby. Or with bigger fxruby project one can easily run into speed problems... So It would be great to reimplement some widgets back in C++ and do then do fxruby-binding for them. As first step I tried to compile developers version from github. That''s all. ada.
Lyle Johnson
2009-Mar-06 16:24 UTC
[fxruby-users] ruby1.9.1 fox1.7.19 fxrubygithub -> Init_core
On Mar 6, 2009, at 1:45 AM, adaml2 at seznam.cz wrote:> ''sudo gem install fxruby'' doesn''t work on linux. Because File.move--> > FileUtils.move > bug. You''ve had several complains about that. ( you can install fxruby > from a gem on windows, because its precompiled )Yes, this is a known problem for building FXRuby against Ruby 1.9.1. I have just released FXRuby 1.6.19, which should take care of this problem.> In doc/* section you have swig 1.3.22 as only alternative and in > another place > you have swig from cvs. So I wrote I have 1.3.35 installed from > ubuntu, because > that last Init_core error might be somehow caused by bad version of > swig. > I have no problem to install any other version - or you expect me > trying all variants. If it depends on fixed swig version - check for > it. And update doc/*OK. I''ve just updated the docs and have made a note that the build script should check which version of SWIG is being used, to confirm that it''s the right version. I have actually made some fixes on the trunk (for what will eventually be FXRuby 1.8) to support the latest versions of SWIG, but I''m waiting on the release of FOX 1.8 for those. That would lift this restriction on using such an old version of SWIG.> I was curious if there exist a simple way to wrap other non-official > fox classes > to be used from ruby. If someone writes some C++ Fox Widget and I will > want to use it from ruby. Or with bigger fxruby project one can easily > run into speed problems... So It would be great to reimplement some > widgets back in C++ and do then do fxruby-binding for them.That''s very difficult to do, and I''m not sure how to work around it at this point. But you''d want to look at how the FXScintilla widget is supported in FXRuby as a guide.> As first step I tried to compile developers version from github. > That''s all.OK. We really need some sort of hacker''s guide to FXRuby. There has just never been much interest from anyone for that, so it has taken low priority.