0.0.5 sure gets the Mac build a lot further. There''s a bug in the wxMac-2.4.2 distribution that I''m running into: wx-config wants to invoke a program in the source directory at link time. That''s ugly in itself, but it tries to use a variable ${top_srcdir} to accomplish this, and it''s apparently empty. It tries to invoke "/distrib/mac/shared-ld-sh", which of course ain''t there. So I have to hand-edit the wx-config shell script to point to my source directory. Ugh. But then the command still fails because I''m missing "macstart.o". Warnings that appeared during the compile: g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/DC.o src/DC.cpp src/DC.cpp: In function `VALUE _wrap_wxDC_DrawArc(int, VALUE*, long unsigned int)'': src/DC.cpp:1014: warning: passing `double'' for argument 5 of `void wxDCBase::DrawArc(int, int, int, int, int, int)'' src/DC.cpp:1014: warning: passing `double'' for argument 6 of `void wxDCBase::DrawArc(int, int, int, int, int, int)'' ... g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/Icon.o src/Icon.cpp src/Icon.cpp: In function `VALUE _wrap_wxIcon_LoadFile(int, VALUE*, long unsigned int)'': src/Icon.cpp:817: warning: invalid conversion from `long int'' to `wxBitmapType'' src/Icon.cpp:817: warning: initializing argument 2 of `virtual bool wxIcon::LoadFile(const wxString&, wxBitmapType)'' src/Icon.cpp: In function `VALUE _wrap_wxIcon_SaveFile(int, VALUE*, long unsigned int)'': src/Icon.cpp:859: warning: invalid conversion from `int'' to `wxBitmapType'' src/Icon.cpp:859: warning: initializing argument 2 of `virtual bool wxBitmap::SaveFile(const wxString&, wxBitmapType, const wxPalette*) const'' ... g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/MenuBar.o src/MenuBar.cpp src/MenuBar.cpp: In function `VALUE _wrap_wxMenuBar_FindMenu(int, VALUE*, long unsigned int)'': src/MenuBar.cpp:883: warning: passing `const wxMenuBar'' as `this'' argument of ` int wxMenuBar::FindMenu(const wxString&)'' discards qualifiers ... Then boom: /Users/ryan/Desktop/Configuration/wxMac-2.4.2/distrib/mac/shared-ld-sh -undefined suppress -flat_namespace -o -shared -framework Carbon macstart.o obj/wx.o obj/RubyConstants.o obj/App.o obj/Bitmap.o obj/DC.o obj/Event.o obj/EvtHandler.o obj/Frame.o obj/GDIObject.o obj/Icon.o obj/Menu.o obj/MenuBar.o obj/Object.o obj/PaintDC.o obj/Point.o obj/Size.o obj/Window.o obj/WindowDC.o -L/usr/local/lib -framework Carbon -framework System -lwx_mac-2.4 -ldl -lobjc -o lib/wx.bundle c++: macstart.o: No such file or directory rake aborted! -- Ryan "John" Platte Custom services, NIKA Consulting http://nikaconsulting.com/
John Platte wrote:> 0.0.5 sure gets the Mac build a lot further.Cool. I have pushed 0.0.6 with the changes mentioned below.> There''s a bug in the wxMac-2.4.2 distribution that I''m running into: > wx-config wants to invoke a program in the source directory at link > time. That''s ugly in itself, but it tries to use a variable > ${top_srcdir} to accomplish this, and it''s apparently empty. It tries to > invoke "/distrib/mac/shared-ld-sh", which of course ain''t there. So I > have to hand-edit the wx-config shell script to point to my source > directory. Ugh.Hm. I''ve changed the mac rakefile to always use g++ as the compiler and linker, regardless of what wx-config tells us. That''s what the existing wxRuby make system does, so hopefully it will work. If you have a better suggestion, please let me know.> Warnings that appeared during the compile:Thanks. I fixed the ones that I can right now. The others are due to a weakness in the SWIG code generation.> But then the command still fails because I''m missing "macstart.o"....> Then boom: > > /Users/ryan/Desktop/Configuration/wxMac-2.4.2/distrib/mac/shared-ld-sh > -undefined suppress -flat_namespace -o -shared -framework Carbon > macstart.o obj/wx.o obj/RubyConstants.o obj/App.o obj/Bitmap.o obj/DC.o > obj/Event.o obj/EvtHandler.o obj/Frame.o obj/GDIObject.o obj/Icon.o > obj/Menu.o obj/MenuBar.o obj/Object.o obj/PaintDC.o obj/Point.o > obj/Size.o obj/Window.o obj/WindowDC.o -L/usr/local/lib -framework > Carbon -framework System -lwx_mac-2.4 -ldl -lobjc -o lib/wx.bundle > c++: macstart.o: No such file or directory > rake aborted! >Hm. I got that one directly from the existing wxRuby make. Hopefully Nick can fill us in on why it''s not working. Nick? Kevin
(was away configuring my parents wifi setup - didn''t expect such activity on the list!) macstart.cpp is a file from the wxruby that wasn''t moved into the source tree. The easiest thing to do is to remove it from the extra_objs line in rubyosx.rb, as I don''t think it''s currenly called. I think I got 0.0.6 built on OS X, but wasn''t brave enough to test it. Has anyone tried installing rake for the default ruby (1.6.7) for OS X? I had to battle with the install script to get it working, and ended up using my ruby 1.8 install instead. Nick Kevin Smith wrote:> John Platte wrote: > >> 0.0.5 sure gets the Mac build a lot further. > > > Cool. I have pushed 0.0.6 with the changes mentioned below. > >> There''s a bug in the wxMac-2.4.2 distribution that I''m running into: >> wx-config wants to invoke a program in the source directory at link >> time. That''s ugly in itself, but it tries to use a variable >> ${top_srcdir} to accomplish this, and it''s apparently empty. It tries >> to invoke "/distrib/mac/shared-ld-sh", which of course ain''t there. >> So I have to hand-edit the wx-config shell script to point to my >> source directory. Ugh. > > > Hm. I''ve changed the mac rakefile to always use g++ as the compiler > and linker, regardless of what wx-config tells us. That''s what the > existing wxRuby make system does, so hopefully it will work. If you > have a better suggestion, please let me know. > >> Warnings that appeared during the compile: > > > Thanks. I fixed the ones that I can right now. The others are due to a > weakness in the SWIG code generation. > >> But then the command still fails because I''m missing "macstart.o". > > ... > >> Then boom: >> >> /Users/ryan/Desktop/Configuration/wxMac-2.4.2/distrib/mac/shared-ld-sh >> -undefined suppress -flat_namespace -o -shared -framework Carbon >> macstart.o obj/wx.o obj/RubyConstants.o obj/App.o obj/Bitmap.o >> obj/DC.o obj/Event.o obj/EvtHandler.o obj/Frame.o obj/GDIObject.o >> obj/Icon.o obj/Menu.o obj/MenuBar.o obj/Object.o obj/PaintDC.o >> obj/Point.o obj/Size.o obj/Window.o obj/WindowDC.o -L/usr/local/lib >> -framework Carbon -framework System -lwx_mac-2.4 -ldl -lobjc -o >> lib/wx.bundle >> c++: macstart.o: No such file or directory >> rake aborted! >> > > Hm. I got that one directly from the existing wxRuby make. Hopefully > Nick can fill us in on why it''s not working. Nick? > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > >
On 2004 Apr 23, at 22:38, Kevin Smith wrote:> John Platte wrote: >> 0.0.5 sure gets the Mac build a lot further. > > Cool. I have pushed 0.0.6 with the changes mentioned below.Warnings and failure when building 0.0.6 (no hacking required first, yay!): ... src/Icon.cpp: In function `VALUE _wrap_wxIcon_SaveFile(int, VALUE*, long unsigned int)'': src/Icon.cpp:864: warning: invalid conversion from `int'' to `wxBitmapType'' src/Icon.cpp:864: warning: initializing argument 2 of `virtual bool wxBitmap::SaveFile(const wxString&, wxBitmapType, const wxPalette*) const'' ... src/MenuBar.cpp: In function `VALUE _wrap_wxMenuBar_FindMenu(int, VALUE*, long unsigned int)'': src/MenuBar.cpp:883: warning: passing `const wxMenuBar'' as `this'' argument of ` int wxMenuBar::FindMenu(const wxString&)'' discards qualifiers ... g++ -shared -framework Carbon macstart.o obj/wx.o obj/RubyConstants.o obj/App.o obj/Bitmap.o obj/DC.o obj/Event.o obj/EvtHandler.o obj/Frame.o obj/GDIObject.o obj/Icon.o obj/Menu.o obj/MenuBar.o obj/Object.o obj/PaintDC.o obj/Point.o obj/Size.o obj/Window.o obj/WindowDC.o -L/usr/local/lib -framework Carbon -framework System -lwx_mac-2.4 -ldl -lobjc -o lib/wx.bundle g++: macstart.o: No such file or directory g++: unrecognized option `-shared'' rake aborted! (maybe the -shared needs to come later in the args? a guess...) ==== 0.0.9 tries to require "nqxml/treeparser", which I don''t have. Missing pre-generated SWIG stuff? I''m not using my own SWIG. Sorry, but I don''t have time right now to see which intermediary versions do and don''t work... [ryan@kursk 09:15:56 ~/Desktop/wxruby-swig-0.0.9]$ rake (in /Users/ryan/Desktop/wxruby-swig-0.0.9) ruby swig/extractxml.rb swig/wxclasses-2.4.2.xml swig/extractxml.rb:5:in `require'': No such file to load -- nqxml/treeparser (LoadError) from swig/extractxml.rb:5 rake aborted! Command Failed: [ruby swig/extractxml.rb swig/wxclasses-2.4.2.xml] -- Ryan "John" Platte Custom services, NIKA Consulting http://nikaconsulting.com/
On 2004 Apr 26, at 9:18, Nick wrote:> macstart.cpp is a file from the wxruby that wasn''t moved into the > source tree. The easiest thing to do is to remove it from the > extra_objs line in rubyosx.rb, as I don''t think it''s currenly called.OK, that brings us: [ryan@kursk 09:28:18 ~/Desktop/wxruby-swig-0.0.6]$ rake (in /Users/ryan/Desktop/wxruby-swig-0.0.6) g++ -shared -framework Carbon obj/wx.o obj/RubyConstants.o obj/App.o obj/Bitmap.o obj/DC.o obj/Event.o obj/EvtHandler.o obj/Frame.o obj/GDIObject.o obj/Icon.o obj/Menu.o obj/MenuBar.o obj/Object.o obj/PaintDC.o obj/Point.o obj/Size.o obj/Window.o obj/WindowDC.o -L/usr/local/lib -framework Carbon -framework System -lwx_mac-2.4 -ldl -lobjc -o lib/wx.bundle g++: unrecognized option `-shared'' ld: Undefined symbols: _main _rb_cFalseClass _rb_cFixnum ...(a ton of Ruby symbols)... _rb_yield rake aborted! -- Ryan "John" Platte Custom services, NIKA Consulting http://nikaconsulting.com/
The rakeosx.rb file is missing a lot (well, most) of the options necessary to build and extension on OS X. I don''t have them now, but I will in a couple of hours if you can wait. Nick John Platte wrote:> On 2004 Apr 23, at 22:38, Kevin Smith wrote: > >> John Platte wrote: >> >>> 0.0.5 sure gets the Mac build a lot further. >> >> >> Cool. I have pushed 0.0.6 with the changes mentioned below. > > > Warnings and failure when building 0.0.6 (no hacking required first, > yay!): > > ... > src/Icon.cpp: In function `VALUE _wrap_wxIcon_SaveFile(int, VALUE*, long > unsigned int)'': > src/Icon.cpp:864: warning: invalid conversion from `int'' to > `wxBitmapType'' > src/Icon.cpp:864: warning: initializing argument 2 of `virtual bool > wxBitmap::SaveFile(const wxString&, wxBitmapType, const wxPalette*) > const'' > ... > src/MenuBar.cpp: In function `VALUE _wrap_wxMenuBar_FindMenu(int, > VALUE*, long > unsigned int)'': > src/MenuBar.cpp:883: warning: passing `const wxMenuBar'' as `this'' > argument of ` > int wxMenuBar::FindMenu(const wxString&)'' discards qualifiers > ... > g++ -shared -framework Carbon macstart.o obj/wx.o obj/RubyConstants.o > obj/App.o obj/Bitmap.o obj/DC.o obj/Event.o obj/EvtHandler.o > obj/Frame.o obj/GDIObject.o obj/Icon.o obj/Menu.o obj/MenuBar.o > obj/Object.o obj/PaintDC.o obj/Point.o obj/Size.o obj/Window.o > obj/WindowDC.o -L/usr/local/lib -framework Carbon -framework System > -lwx_mac-2.4 -ldl -lobjc -o lib/wx.bundle > g++: macstart.o: No such file or directory > g++: unrecognized option `-shared'' > rake aborted! > > (maybe the -shared needs to come later in the args? a guess...) > > ====> > 0.0.9 tries to require "nqxml/treeparser", which I don''t have. Missing > pre-generated SWIG stuff? I''m not using my own SWIG. Sorry, but I > don''t have time right now to see which intermediary versions do and > don''t work... > > [ryan@kursk 09:15:56 ~/Desktop/wxruby-swig-0.0.9]$ rake > (in /Users/ryan/Desktop/wxruby-swig-0.0.9) > ruby swig/extractxml.rb swig/wxclasses-2.4.2.xml > swig/extractxml.rb:5:in `require'': No such file to load -- > nqxml/treeparser (LoadError) > from swig/extractxml.rb:5 > rake aborted! > Command Failed: [ruby swig/extractxml.rb swig/wxclasses-2.4.2.xml] >
Kevin Smith
2004-Apr-26 11:47 UTC
[Wxruby-users] wxruby-swig and nqxml (Building wxruby-swig for Mac)
John Platte wrote:> 0.0.9 tries to require "nqxml/treeparser", which I don''t have. Missing > pre-generated SWIG stuff? I''m not using my own SWIG. Sorry, but I don''t > have time right now to see which intermediary versions do and don''t work...Urg. I was afraid of that. [As an aside, while wxruby-swig is still in these early stages, it''s perfectly ok to just say "it does X", without further research. Often, that is enough for me to fix it, and will save you time. I''m very grateful for people willing to try the bleeding edge, so I want to be as efficient as possible with your time.] I recently revamped the rakefile to detect dependencies all the way back to square one, which is using nqxml to extract all the class descriptions out of the xml file. This is much better for me, but is inappropriate for most people. Normally, the re-swig step won''t be required because the .i (SWIG) files will be newer than the xml file, and the .cpp files will be newer than the .i files. You should be able to avoid the problem for now by doing a touch src/* Did you pull the repo using darcs? I just found out this weekend that darcs does not currently preserve timestamps. That could cause the problem. Otherwise, I''m not sure what would. Fortunately, rake is flexible enough that I should be able to set it up to look at a command-line variable to decide whether or not to ever follow the dependency tree back past the compile step. Thanks, Kevin
Nick wrote:> > The rakeosx.rb file is missing a lot (well, most) of the options > necessary to build and extension on OS X. I don''t have them now, but I > will in a couple of hours if you can wait.Thanks, Nick. I''ll happily fold any changes into the main tree. I tried to include all the options from extconf.rb. I''m curious: Did I miss some, or are there other Mac options that are hidden somewhere else? Kevin
Kevin Smith
2004-Apr-26 11:55 UTC
[Wxruby-users] wxruby-swig and Ruby 1.8 (was: Building wxruby-swig for Mac)
Nick wrote:> > (was away configuring my parents wifi setup - didn''t expect such > activity on the list!)No problem!> Has anyone tried installing rake for the default ruby (1.6.7) for OS X? > I had to battle with the install script to get it working, and ended up > using my ruby 1.8 install instead.Hmmm. The rake README says it requires Ruby 1.8. Is it reasonable at this point for wxRuby to require 1.8? Or do we need to back-port rake to 1.6.7? Kevin
Kevin Smith
2004-Apr-26 12:27 UTC
[Wxruby-users] wxruby-swig and nqxml (Building wxruby-swig for Mac)
John Platte wrote:> On 2004 Apr 26, at 10:18, Kevin Smith wrote: > >> You should be able to avoid the problem for now by doing a touch src/* > > No, got the same result. > > [ryan@kursk 10:41:06 ~/Desktop/wxruby-swig-0.0.9]$ rake > (in /Users/ryan/Desktop/wxruby-swig-0.0.9) > ruby swig/extractxml.rb swig/wxclasses-2.4.2.xml > swig/extractxml.rb:5:in `require'': No such file to load -- > nqxml/treeparser (LoadError) > from swig/extractxml.rb:5 > rake aborted!Darn. It looks like everyone should stick with 0.0.6 for now, unless you have nqxml and the right version of swig available. I''ll fix this rakefile dependency problem later today. Sorry! Kevin
Nick wrote:> > The extconf system hides the options for generic extensions. On that > note, on version 0.0.6 you have ''-shared'' as a constant option for all > builds, which if it hasn''t been removed really should be moved to the > Linux version (os x does not have a "-shared" g++ option).I have fixed this in 0.0.10. I''m not clear whether there were other Mac rakefile changes required or not.> My only concern is that I build the wxruby binary installer for 1.6.7, > because I always know the install directory. Since 1.8 isn''t installed > by default on Mac OS X, it can really be anywhere (I put it in /sw since > thats where fink likes things).Ah. It sounds like we should get rake working under 1.6.7 then.> I''d like to volunteer for working on the memory management problem, > since I need to get it working for my employer anyhow.Excellent! I''ll send you details off-list. Kevin
On 2004 Apr 26, at 23:50, Kevin Smith wrote:> 0.0.10[ryan@kursk 08:51:46 ~/Desktop/wxruby-swig-0.0.10]$ rake (in /Users/ryan/Desktop/wxruby-swig-0.0.10) mkdir obj g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/wx.o src/wx.cpp ...success, success, success... src/Icon.cpp: In function `VALUE _wrap_wxIcon_SaveFile(int, VALUE*, long unsigned int)'': src/Icon.cpp:893: warning: invalid conversion from `int'' to `wxBitmapType'' src/Icon.cpp:893: warning: initializing argument 2 of `virtual bool wxBitmap::SaveFile(const wxString&, wxBitmapType, const wxPalette*) const'' ... src/MenuBar.cpp: In function `VALUE _wrap_wxMenuBar_FindMenu(int, VALUE*, long unsigned int)'': src/MenuBar.cpp:912: warning: passing `const wxMenuBar'' as `this'' argument of ` int wxMenuBar::FindMenu(const wxString&)'' discards qualifiers ... g++ -framework Carbon macstart.o obj/wx.o obj/RubyConstants.o obj/Functions.o obj/App.o obj/Bitmap.o obj/BitmapButton.o obj/BoxSizer.o obj/Brush.o obj/Button.o obj/CalendarCtrl.o obj/CalendarDateAttr.o obj/CalendarEvent.o obj/Caret.o obj/CheckBox.o obj/Choice.o obj/CloseEvent.o obj/CommandEvent.o obj/Control.o obj/ControlWithItems.o obj/DC.o obj/Dialog.o obj/Event.o obj/EvtHandler.o obj/Frame.o obj/GDIObject.o obj/Icon.o obj/Menu.o obj/MenuBar.o obj/Object.o obj/PaintDC.o obj/PaintEvent.o obj/Panel.o obj/Point.o obj/Size.o obj/Sizer.o obj/StaticText.o obj/UpdateUIEvent.o obj/Window.o obj/WindowDC.o -L/usr/local/lib -framework Carbon -framework System -lwx_mac-2.4 -ldl -lobjc -o lib/wx.bundle g++: macstart.o: No such file or directory rake aborted! [ryan@kursk 09:00:22 ~/Desktop/wxruby-swig-0.0.10]$ gvim rake/rakemacosx.rb ...edit out macstart.o from rake/rakemacosx.rb... [ryan@kursk 09:01:30 ~/Desktop/wxruby-swig-0.0.10]$ rake (in /Users/ryan/Desktop/wxruby-swig-0.0.10) g++ -framework Carbon obj/wx.o obj/RubyConstants.o obj/Functions.o obj/App.o obj/Bitmap.o obj/BitmapButton.o obj/BoxSizer.o obj/Brush.o obj/Button.o obj/CalendarCtrl.o obj/CalendarDateAttr.o obj/CalendarEvent.o obj/Caret.o obj/CheckBox.o obj/Choice.o obj/CloseEvent.o obj/CommandEvent.o obj/Control.o obj/ControlWithItems.o obj/DC.o obj/Dialog.o obj/Event.o obj/EvtHandler.o obj/Frame.o obj/GDIObject.o obj/Icon.o obj/Menu.o obj/MenuBar.o obj/Object.o obj/PaintDC.o obj/PaintEvent.o obj/Panel.o obj/Point.o obj/Size.o obj/Sizer.o obj/StaticText.o obj/UpdateUIEvent.o obj/Window.o obj/WindowDC.o -L/usr/local/lib -framework Carbon -framework System -lwx_mac-2.4 -ldl -lobjc -o lib/wx.bundle ld: Undefined symbols: _main _rb_cFalseClass _rb_cFixnum _rb_cNilClass _rb_cObject _rb_cSymbol _rb_cTrueClass _rb_check_type _rb_const_get _rb_data_object_alloc _rb_define_class_under _rb_define_const _rb_define_module _rb_define_module_function _rb_eArgError _rb_eRuntimeError _rb_eTypeError _rb_int2inum _rb_intern _rb_iv_get _rb_iv_set _rb_num2long _rb_obj_is_kind_of _rb_raise _rb_str2cstr _rb_str_new2 _rb_string_value_ptr _rb_undef_method _rb_define_method wxEntry(int, char**) _rb_define_alloc_func _rb_exc_new3 _rb_funcall _rb_str_concat _rb_define_singleton_method _rb_ary_entry _rb_undef_alloc_func _rb_num2dbl _rb_cProc _rb_global_variable _rb_block_given_p _rb_ivar_get _rb_yield rake aborted! Command Failed... -- Ryan "John" Platte Custom services, NIKA Consulting http://nikaconsulting.com/