I am trying to build wxruby from source, but I have encounter an error.
For some reason the ‘rake’ command fail when it tries to link
lib/wxruby2.so
because it is missing missing -lruby18
resulting in errors like
wx.cpp:(.text+0x1618): undefined reference to rb_intern' wx.cpp:(.text+0x165c): undefined reference to
rb_eNotImpError’
wx.cpp:(.text+0x1666): undefined reference to rb_raise' wx.cpp:(.text+0x167d): undefined reference to
rb_const_defined’
wx.cpp:(.text+0x1698): undefined reference to `rb_const_get’
could it be a bad expansion of values in the Config::CONFIG hash ?
And if it is, how do I verify that it is the problem?
How does the Config hash get filled with values?
How do I check that Config::CONFIG[“LDFLAGS”] and
Config::CONFIG[“LIBS”] contains the right values?
Here is a grep of the config hash –
shs@cybert /store/download/wxruby-2.0.1 $ grep -r ‘CONFIG[’ *
rake/rakemswin.rb:lib_ruby = File.join(Config::CONFIG[‘libdir’],
Config::CONFIG[‘LIBRUBY’])
rake/rakemswin.rb: mv ‘msvcp80.dll’, Config::CONFIG[‘bindir’]
rake/rakemswin.rb: mv ‘msvcr80.dll’, Config::CONFIG[‘bindir’]
rake/rakemswin.rb: ruby_manifest = File.join(Config::CONFIG[‘bindir’],
‘ruby.exe.manifest’)
rake/rakemswin.rb: rubyw_manifest = File.join(Config::CONFIG[‘bindir’],
‘rubyw.exe.manifest’)
rake/rakemingw.rb: File.join(Config::CONFIG[‘libdir’],
Config::CONFIG[‘LIBRUBY’])
rake/rakeconfigure.rb:$ruby_cppflags = Config::CONFIG[“CFLAGS”]
rake/rakeconfigure.rb: includes = [ Config::CONFIG[“rubyhdrdir”],
rake/rakeconfigure.rb: Config::CONFIG[“sitehdrdir”],
rake/rakeconfigure.rb: Config::CONFIG[“vendorhdrdir”],
rake/rakeconfigure.rb:
File.join(Config::CONFIG[“rubyhdrdir”],
rake/rakeconfigure.rb: Config::CONFIG[‘arch’]) ]
rake/rakeconfigure.rb: $ruby_includes = " -I. -I " +
Config::CONFIG[“archdir”]
rake/rakeconfigure.rb:$ruby_ldflags = Config::CONFIG[“LDFLAGS”]
rake/rakeconfigure.rb:$ruby_libs = Config::CONFIG[“LIBS”]
rake/rakeconfigure.rb:OBJ_EXT = Config::CONFIG[“OBJEXT”]
rake/rakewx.rb:$ruby_exe = Config::CONFIG[“ruby_install_name”]
rake/rakewx.rb: dest_dir = Config::CONFIG[‘sitelibdir’]
rake/rakewx.rb: cp TARGET_LIB, Config::CONFIG[‘sitearchdir’]
rake/rakewx.rb: rm_rf
File.join(Config::CONFIG[‘sitearchdir’],File.basename(TARGET_LIB))
rake/rakewx.rb: rm_rf File.join(Config::CONFIG[‘sitelibdir’], ‘wx.rb’)
rake/rakewx.rb: rm_rf File.join(Config::CONFIG[‘sitelibdir’], ‘wx’)
rakefile:DLL_LIB = “wxruby2.#{Config::CONFIG[“DLEXT”]}”
PS. I am working on a linux system.
uname -a
Linux cybert 2.6.31-gentoo-r6 #1 SMP Wed Aug 24 17:09:01 CEST 2011 i686
Intel® Core™2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux