From: Luis Lavena on 11 Nov 2009 22:05 On Nov 11, 5:36 pm, david <davidho...(a)gmail.com> wrote: > On Nov 11, 11:19 am, Luis Lavena <luislav...(a)gmail.com> wrote: > > > > > > > On Nov 11, 12:54 am, david <davidho...(a)gmail.com> wrote: > > > > [...] > > > > I have now installed the correct Ruby installation and plugged in the > > > development kit. Ruby is now... > > > > ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32] > > > > I have also downgradedBerkeleyDBto 4.6.21 which is compatible with > > > bdb-0.6.5. > > > > During the extconf.rb execution it takes a lot longer now (about 10 > > > minutes), as it seems to be searching for certain library files. Even > > > with different combinations of the --with* parameters I have not been > > > able to get the install to find theBerkeleyDBfiles. TheBerkeleyDB > > > files are as such... > > > Can you tell us the content of "lib"? > > > It seems is looking fordb-4.7, which should be "libdb-4.7.a" or > > "db-4.7.lib" > > (and similar for other versions) > > > I'm not familiarized with the packaging of BDB so cannot say from > > here. > > > Seems it offers too many combinations for BDB. > > > Please include the pages/URLs where you got all the packages (bdb > > extension and bdb binaries) so I can replicate the same environment > > here. > > > -- > > Luis Lavena > > Thanks Luis, > > bdb-0.6.5http://rubyforge.org/projects/bdb/ > > Berkeley DB 4.6.21.msi Windows installerhttp://www.oracle.com/technology/software/products/berkeley-db/db/ind... > > The BerkeleyDB/lib is as follows. > > C:\db-4.6.21\lib>dir > Volume in drive C has no label. > Volume Serial Number is CCDF-9304 > > Directory of C:\db-4.6.21\lib > > 11/09/2009 03:56 PM <DIR> . > 11/09/2009 03:56 PM <DIR> .. > 10/03/2007 04:20 PM 172,934 libdb46.lib > 10/03/2007 04:17 PM 173,720 libdb46d.lib > 11/09/2009 03:56 PM <DIR> perl > 2 File(s) 346,654 bytes > 3 Dir(s) 17,745,936,384 bytes free > > C:\db-4.6.21\lib> > > Yes, it seems the file match is not correct. > All the following was with Ruby 1.8.6, see the bottom of this email for explanation... Ok, tried installing BDB 4.6.21 MSI package, also making it available using --with-db-include and --with-db-lib, no luck Tried renaming libdb46.lib to libdb46.a (which is the convention expected by GCC), no luck there neither. Next try was mattbauer's bdb, no luck. This time, renamed to libdb-4.6.a, since this bdb extension is looking for "db-4.6"... No luck still... After peeking in the mkmf.log, found this: have_library: checking for db_version() in -ldb-4.6... -------------------- no "gcc -o conftest -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386- mingw32/lib/ruby/1.8/i386-mingw32 -I. -IC:/bdb-4.6.21/include -g - O2 conftest.c -L. -LC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386- mingw32/lib -LC:/bdb-4.6.21/lib -L. -lmsvcrt-ruby18-static - ldb-4.6 -lshell32 -lws2_32 " In file included from conftest.c:3: C:/bdb-4.6.21/include/db.h:131: error: conflicting types for 'ssize_t' C:/Users/Luis/Tools/MinGW/gcc/bin/../lib/gcc/mingw32/3.4.5/../../../../ include/sys/types.h:104: error: previous declaration of 'ssize_t' was here checked program was: /* begin */ 1: #include <windows.h> 2: #include <winsock.h> 3: #include <db.h> 4: 5: /*top*/ 6: int main() { return 0; } 7: int t() { void ((*volatile p)()); p = (void ((*)()))db_version; return 0; } /* end */ ------------- Which lead me to think the issue is inside bdb itself... commented out line 131, since MinGW already defines ssize_t properly... the output was this: C:\Users\Luis\Projects\oss\bdb\ext>ruby extconf.rb --with-db-dir=C:/ bdb-4.6.21 checking for db_version() in -ldb-4.7... no checking for db_version() in -ldb-4.6... yes Writing bdb_aux._c (defines), this takes a while don't know how to handle DB_COMPACT_FLAGS \, guessing UINT wrote 409 defines creating Makefile -------------- Now, let's try to make it: C:\Users\Luis\Projects\oss\bdb\ext>make gcc -I. -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/ lib/ruby/1.8/i386-mingw32 -I. -IC:/bdb-4.6.21/include -g -O2 -c bdb.c bdb.c: In function `db_open': bdb.c:241: error: too many arguments to function `raise' Stall there, since I'm not familiar with the code or what is trying to achieve. So: looks like both extensions needs some love to work properly under GCC and Windows. I would suggest poke the authors, point them to RubyInstaller Google Group [1] to get some assistance in the process and use tools like rake-compiler [2] to compile the extension. Definitely that will not solve your situation right away but will help everybody in the future. Apologizes couldn't get this working for you. NOTE about version used: Used Ruby 1.8.6 since most likely, and after try and error, none of the extensions seems to like Ruby 1.9.1 (mattbauer used a deprecated constant and failed with 'raise' issues described above). [1] http://groups.google.com/group/rubyinstaller [2] http://github.com/luislavena/rake-compiler
From: david on 12 Nov 2009 08:50 On Nov 11, 10:05 pm, Luis Lavena <luislav...(a)gmail.com> wrote: > On Nov 11, 5:36 pm, david <davidho...(a)gmail.com> wrote: > > > > > On Nov 11, 11:19 am, Luis Lavena <luislav...(a)gmail.com> wrote: > > > > On Nov 11, 12:54 am, david <davidho...(a)gmail.com> wrote: > > > > > [...] > > > > > I have now installed the correct Ruby installation and plugged in the > > > > development kit. Ruby is now... > > > > > ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32] > > > > > I have also downgradedBerkeleyDBto 4.6.21 which is compatible with > > > > bdb-0.6.5. > > > > > During the extconf.rb execution it takes a lot longer now (about 10 > > > > minutes), as it seems to be searching for certain library files. Even > > > > with different combinations of the --with* parameters I have not been > > > > able to get the install to find theBerkeleyDBfiles. TheBerkeleyDB > > > > files are as such... > > > > Can you tell us the content of "lib"? > > > > It seems is looking fordb-4.7, which should be "libdb-4.7.a" or > > > "db-4.7.lib" > > > (and similar for other versions) > > > > I'm not familiarized with the packaging of BDB so cannot say from > > > here. > > > > Seems it offers too many combinations for BDB. > > > > Please include the pages/URLs where you got all the packages (bdb > > > extension and bdb binaries) so I can replicate the same environment > > > here. > > > > -- > > > Luis Lavena > > > Thanks Luis, > > > bdb-0.6.5http://rubyforge.org/projects/bdb/ > > >BerkeleyDB4.6.21.msi Windows installerhttp://www.oracle.com/technology/software/products/berkeley-db/db/ind... > > > The BerkeleyDB/lib is as follows. > > > C:\db-4.6.21\lib>dir > > Volume in drive C has no label. > > Volume Serial Number is CCDF-9304 > > > Directory of C:\db-4.6.21\lib > > > 11/09/2009 03:56 PM <DIR> . > > 11/09/2009 03:56 PM <DIR> .. > > 10/03/2007 04:20 PM 172,934 libdb46.lib > > 10/03/2007 04:17 PM 173,720 libdb46d.lib > > 11/09/2009 03:56 PM <DIR> perl > > 2 File(s) 346,654 bytes > > 3 Dir(s) 17,745,936,384 bytes free > > > C:\db-4.6.21\lib> > > > Yes, it seems the file match is not correct. > > All the following was with Ruby 1.8.6, see the bottom of this email > for explanation... > > Ok, tried installing BDB 4.6.21 MSI package, also making it available > using --with-db-include and --with-db-lib, no luck > > Tried renaming libdb46.lib to libdb46.a (which is the convention > expected by GCC), no luck there neither. > > Next try was mattbauer's bdb, no luck. > > This time, renamed to libdb-4.6.a, since this bdb extension is looking > for "db-4.6"... > > No luck still... > > After peeking in the mkmf.log, found this: > > have_library: checking for db_version() in -ldb-4.6... > -------------------- no > > "gcc -o conftest -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386- > mingw32/lib/ruby/1.8/i386-mingw32 -I. -IC:/bdb-4.6.21/include -g - > O2 conftest.c -L. -LC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386- > mingw32/lib -LC:/bdb-4.6.21/lib -L. -lmsvcrt-ruby18-static - > ldb-4.6 -lshell32 -lws2_32 " > In file included from conftest.c:3: > C:/bdb-4.6.21/include/db.h:131: error: conflicting types for 'ssize_t' > C:/Users/Luis/Tools/MinGW/gcc/bin/../lib/gcc/mingw32/3.4.5/../../../../ > include/sys/types.h:104: error: previous declaration of 'ssize_t' was > here > checked program was: > /* begin */ > 1: #include <windows.h> > 2: #include <winsock.h> > 3: #include <db.h> > 4: > 5: /*top*/ > 6: int main() { return 0; } > 7: int t() { void ((*volatile p)()); p = (void ((*)()))db_version; > return 0; } > /* end */ > > ------------- > > Which lead me to think the issue is inside bdb itself... > > commented out line 131, since MinGW already defines ssize_t > properly... the output was this: > > C:\Users\Luis\Projects\oss\bdb\ext>ruby extconf.rb --with-db-dir=C:/ > bdb-4.6.21 > checking for db_version() in -ldb-4.7... no > checking for db_version() in -ldb-4.6... yes > Writing bdb_aux._c (defines), this takes a while > don't know how to handle DB_COMPACT_FLAGS \, guessing UINT > > wrote 409 defines > creating Makefile > > -------------- > > Now, let's try to make it: > > C:\Users\Luis\Projects\oss\bdb\ext>make > gcc -I. -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/ > lib/ruby/1.8/i386-mingw32 -I. -IC:/bdb-4.6.21/include -g -O2 -c > bdb.c > bdb.c: In function `db_open': > bdb.c:241: error: too many arguments to function `raise' > > Stall there, since I'm not familiar with the code or what is trying to > achieve. > > So: looks like both extensions needs some love to work properly under > GCC and Windows. > > I would suggest poke the authors, point them to RubyInstaller Google > Group [1] to get some assistance in the process and use tools like > rake-compiler [2] to compile the extension. > > Definitely that will not solve your situation right away but will help > everybody in the future. > > Apologizes couldn't get this working for you. > > NOTE about version used: Used Ruby 1.8.6 since most likely, and after > try and error, none of the extensions seems to like Ruby 1.9.1 > (mattbauer used a deprecated constant and failed with 'raise' issues > described above). > > [1]http://groups.google.com/group/rubyinstaller > [2]http://github.com/luislavena/rake-compiler Thanks for all your effort Luis! I will reach out to the authors. Dave
First
|
Prev
|
Pages: 1 2 3 Prev: Regexp: getting the first found Next: errors when using sqlite3's query and prepare methods |