From: Luis Lavena Date: 2010-09-24T02:49:47+09:00 Subject: [ruby-core:32523] Re: [RubyInstaller] undefined reference to 'rb_encdb_declare'; ruby-1.9.2-preview3 64-bit on Windows On Sun, Jun 27, 2010 at 5:03 PM, Chuck Remes wrote: > > Luis, thank you for the hint. None of the symbols were being exported into the dll. > > I am currently looking at the win32/mkexports.rb file. It is trying to open the libmsvcrt-ruby191-static.a file and read the symbols from it. When I run "strings" against that library it lists all of the rb_* names plus a few more. > > Working through the mkexports.rb file, the #objdump method doesn't output anything. > > �def each_export(objs) > � �objdump(objs) do |l| > � � �next if /@.*@/ =~ l > � � �yield $2, !$1 if /\s(?:(T)|[[:upper:]])\s_((?!Init_|.*_threadptr_|DllMain@).*)$/ =~ l > � �end > �end > > I am printing out "l" in this case and see that it is a triplet of data separated by spaces. > > Example: > > 0000000000004860 T rb_ascii8bit_encindex\n > > That regex is not matching that data at all, so all of the lines are rejected and nothing gets exported. > > Luis, if you have that static library on your machine can you give me a sample of the input it is providing to this method? I can then work on crafting a new regex to filter out the unnecessary symbols. > Hello Chuck, Trying to cross-compile trunk to x86_64 with latest changes from wanabe and others, I was able to reproduce this encoding issue. The following patch, based on trunk, solve the encoding compile issue: http://pastie.org/1177278 Which is basically unify Mingw32 and Mingw64 (which was incorrect architecture, but that is subject of another conversation). See if this patch works for you and let me know -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup�ry