Downloaded fxruby-1.6.17.gem Switched to root gem install --local ./fxruby-1.6.17.gem Extracts from the error reports: In file included from include/FXRuby.h:825, from include/FXRbCommon.h:93, from FXRuby.cpp:31: include/inlinestubs.h: In function ?void FXApp_init(FX::FXApp*, VALUE, bool)?: include/inlinestubs.h:20: warning: deprecated conversion from string constant to ?char*? FXRuby.cpp: In function ?void FXRbRegisterRubyObj(VALUE, const void*)?: FXRuby.cpp:253: error: cast from ?const void*? to ?unsigned int? loses precision FXRuby.cpp: In function ?ID FXRbLookupHandler(FX::FXObject*, FX::FXSelector)?: FXRuby.cpp:1194: error: cast from ?FX::FXObject*? to ?unsigned int? loses precision FXRuby.cpp: In function ?long int FXRbHandleMessage(FX::FXObject*, ID, FX::FXObject*, FX::FXSelector, void*)?: FXRuby.cpp:1265: error: cast from ?FX::FXObject*? to ?unsigned int? loses precision FXRuby.cpp: At global scope: FXRuby.cpp:1852: warning: deprecated conversion from string constant to ?char*? and FXRuby.cpp:1852: warning: deprecated conversion from string constant to ?char*? FXRuby.cpp: In function ?void FXRbRegisterAppSensitiveObject(FX::FXObject*)?: FXRuby.cpp:1888: error: cast from ?FX::FXObject*? to ?unsigned int? loses precision FXRuby.cpp: In function ?void FXRbRegisterAppSensitiveObject(FX::FXDC*)?: FXRuby.cpp:1895: error: cast from ?FX::FXDC*? to ?unsigned int? loses precision FXRuby.cpp: In function ?void FXRbUnregisterAppSensitiveObject(FX::FXObject*)?: FXRuby.cpp:1902: error: cast from ?FX::FXObject*? to ?unsigned int? loses precision FXRuby.cpp: In function ?void FXRbUnregisterAppSensitiveObject(FX::FXDC*)?: FXRuby.cpp:1909: error: cast from ?FX::FXDC*? to ?unsigned int? loses precision make: *** [FXRuby.o] Error 1 Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/fxruby-1.6.17 for inspection. Results logged to /usr/lib64/ruby/gems/1.8/gems/fxruby-1.6.17/ext/fox16/gem_make.out Does this mean that there is something wrong with my environment or are these genuine errors? Len
On Dec 23, 2008, at 6:34 PM, Len Lawrence wrote:> Downloaded fxruby-1.6.17.gem > Switched to root > gem install --local ./fxruby-1.6.17.gem > > Extracts from the error reports:<snip>> FXRuby.cpp: In function ?void FXRbRegisterRubyObj(VALUE, const > void*)?: > FXRuby.cpp:253: error: cast from ?const void*? to ?unsigned int? > loses precision<snip>> Does this mean that there is something wrong with my environment or > are these genuine errors?Are you compiling with a 64-bit compiler? I mean, it looks that way. Ugh. I wish the compiler treated those as warnings and not errors, but oh well. What''s happening is that we''re trying to cast a void * (pointer-to- void) to an unsigned int. And on 32-bit platforms, those two types are the same size (32 bits), and so there''s no error. That''s why I didn''t see this error at compile time (and why most folks probably won''t). On a 64-bit OS, however, a pointer is 64 bits long, while an unsigned int is still just 32 bits long. (Aren''t you glad you program in Ruby and don''t have to worry about arcane stuff like this?). So we''re getting a compile error for those casts. Let me work-up a patch and post back here when I''ve got something (hopefully, soon). I don''t want to do a 1.6.18 release until we''re sure it''s compiling properly on your machine, so this make take an iteration or two. Thanks for the heads-up, Lyle
Len, On further inspection, I''m a little confused. Can you tell me what version of Ruby you''re compiling against? The reason I''m asking is that based on the Ruby source code that I''m looking at (for Ruby 1.8.6- p287) this ought not be an issue. Thanks, Lyle
Lyle Johnson wrote:> Len, > > On further inspection, I''m a little confused. Can you tell me what > version of Ruby you''re compiling against? The reason I''m asking is > that based on the Ruby source code that I''m looking at (for Ruby > 1.8.6-p287) this ought not be an issue. > >Thanks Lyle. ruby -v shows: ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux] I moved to 1.8.7 because I also use rubytk which appeared to be broken in 1.8.6 (caused core dumps all the time). Because I rely on rubytk so heavily moving back to 1.8.6 is not a viable option. Have a good Christmas and let''s hope you take some time off. Len
On Dec 24, 2008, at 4:05 PM, Len Lawrence wrote:> Thanks Lyle. > ruby -v shows: > ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux] > > I moved to 1.8.7 because I also use rubytk which appeared to be > broken in 1.8.6 (caused core dumps all the time). Because I rely on > rubytk so heavily moving back to 1.8.6 is not a viable option. > > Have a good Christmas and let''s hope you take some time off.Len, Could you download this updated gem (sort of a pre-release version) and see if it compiles OK on your 64-bit system? I don''t have any way to test here, so it may take another round or so to get it right. http://dl-client.getdropbox.com/u/60906/fxruby-1.6.18.gem Thanks, Lyle
Lyle Johnson wrote:> Len, > > Could you download this updated gem (sort of a pre-release version) > and see if it compiles OK on your 64-bit system? I don''t have any way > to test here, so it may take another round or so to get it right. > > http://dl-client.getdropbox.com/u/60906/fxruby-1.6.18.gem > > Thanks, > > Lyle >Done. Partially successful as you can see. Thanks for taking the trouble. #gem install -l ./fxruby-1.6.18.gem Building native extensions. This could take a while... Successfully installed fxruby-1.6.18 1 gem installed Installing ri documentation for fxruby-1.6.18... ERROR: While executing gem ... (TypeError) can''t convert Regexp into String #locate fox16.so | grep "1.6.18" /usr/lib64/ruby/gems/1.8/gems/fxruby-1.6.18/ext/fox16/fox16.so I tried an fxruby program but I see that the system is littered with older versions of fxruby so I hope that it is picking up the latest library; it runs anyway. All the best for 2009 Len
On Dec 29, 2008, at 2:56 PM, Len Lawrence wrote:> Done. Partially successful as you can see. Thanks for taking the > trouble. > > #gem install -l ./fxruby-1.6.18.gem > Building native extensions. This could take a while... > Successfully installed fxruby-1.6.18 > 1 gem installed > Installing ri documentation for fxruby-1.6.18... > ERROR: While executing gem ... (TypeError) > can''t convert Regexp into StringHmmm. I don''t know what to make of that (other than it''s coming from RubyGems during the installation process). Needless to say, it''s not happening here when I try to install.> I tried an fxruby program but I see that the system is littered with > older versions of fxruby > so I hope that it is picking up the latest library; it runs anyway.It''s probably getting the right version, but you can confirm by putting a print statement (or whatever) in your FXRuby program that prints the result of calling "Fox.fxrubyversion". This should return the string "1.6.18". Hope this helps, Lyle
Lyle Johnson wrote:> > On Dec 29, 2008, at 2:56 PM, Len Lawrence wrote: > >> Done. Partially successful as you can see. Thanks for taking the >> trouble. >> >> #gem install -l ./fxruby-1.6.18.gem >> Building native extensions. This could take a while... >> Successfully installed fxruby-1.6.18 >> 1 gem installed >> Installing ri documentation for fxruby-1.6.18... >> ERROR: While executing gem ... (TypeError) >> can''t convert Regexp into String > > Hmmm. I don''t know what to make of that (other than it''s coming from > RubyGems during the installation process). Needless to say, it''s not > happening here when I try to install. > >> I tried an fxruby program but I see that the system is littered with >> older versions of fxruby >> so I hope that it is picking up the latest library; it runs anyway. > > It''s probably getting the right version, but you can confirm by > putting a print statement (or whatever) in your FXRuby program that > prints the result of calling "Fox.fxrubyversion". This should return > the string "1.6.18". > > Hope this helps, > > Lyle > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users >Yep, it does, and 1.6.18 it is. Thanks again. Len
Len Lawrence wrote:> I moved to 1.8.7 because I also use rubytk which appeared to be broken > in 1.8.6 (caused core dumps all the time). Because I rely on rubytk so > heavily moving back to 1.8.6 is not a viable option.Did you make sure that your ruby and tk builds both enable (or disable) pthreads? A mismatch can cause problems (but you should also get warnings in configure, IIRC). -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
Joel VanderWerf wrote:> Len Lawrence wrote: >> I moved to 1.8.7 because I also use rubytk which appeared to be >> broken in 1.8.6 (caused core dumps all the time). Because I rely on >> rubytk so heavily moving back to 1.8.6 is not a viable option. > > Did you make sure that your ruby and tk builds both enable (or > disable) pthreads? A mismatch can cause problems (but you should also > get warnings in configure, IIRC). >I had wondered about that but was unable to determine if a mismatch was the cause or not. Cannot remember if the final 1.8.7 system depended on RPMs or tarballs. Mandriva 2009 Spring will soon be out with the latest edition of tcl/tk. That may bring its own problems so I shall shelve any recompilations/investigations until then. Happy New Year Len