Date: Wed, 23 Mar 2011 23:34:47 -0400 From: Steve Wills <swills@FreeBSD.org> To: Eric <freebsdlists-ruby@chillibear.com> Cc: knu@FreeBSD.org, freebsd-ruby@FreeBSD.org Subject: Re: making Ruby 1.9 default Message-ID: <4D8ABBD7.8050706@FreeBSD.org> In-Reply-To: <C9ABE971.1E180%freebsdlists-ruby@chillibear.com> References: <C9ABE971.1E180%freebsdlists-ruby@chillibear.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------090303060805040800070208 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Please see the attached patch. This should get us past ruby-bdb and allow portupgrade to work with Ruby 1.9. Steve On 03/20/11 13:27, Eric wrote: > [SNIP] > >>> Portupgrade is a bit of a problem. Perhaps it's due to my patches, but >>> at the moment I can't get databases/ruby-bdb to build with RUBY_VER == >>> 1.9. If I could get past that, I could test the above PR. I wonder if >>> anyone else has the same issue. >>> >> >> It does not work with 1.9. I submitted some pacthes to fix it, but it's >> not enough to get it build. IIRC, there were some other problems knu@ >> mentioned. > > I've been having a bit of a play myself for the last couple of hours, but > without any real luck. It does appear that getting the bdb bindings working > with Ruby 1.9 is the first major blocker to pass to get portupgrade working. > > The existing /usr/ports/databases/ruby-bdb fails (at least at first) because > it can't find a 'features' library that is required in src/extconf.rb. > There is actually a 'features.rb' in the src directory, which might be what > it's after. Hardcoding (perhaps require is getting muddled) to this file > does gets extconf.rb generating the following: > > jail# ruby extconf.rb > checking for db_version() in -ldb-4.7... yes > checking for rb_frame_this_func() in ruby.h... yes > checking for rb_block_proc() in ruby.h... yes > checking for rb_io_stdio_file() in ruby.h... yes > checking for rb_block_call() in ruby.h... yes > checking for Array#insert... yes > checking for Array#values_at... yes > checking for rb_io_t in ruby.h,rubyio.h... yes > checking for DB_AFTER in db.h...no > checking for DB_AGGRESSIVE in db.h...no > checking for DB_APPEND in db.h...no > checking for DB_ARCH_ABS in db.h...no > checking for DB_ARCH_DATA in db.h...no > checking for DB_ARCH_LOG in db.h...no > checking for DB_AUTO_COMMIT in db.h...no > ---etc--- > > Lots more "NOs", then the Makefile within 'src' is created. Returning back > up to the top directory and trying a 'make install' (or doing it from the > work dir) still fails. > > I've also been trying the gem from here: https://github.com/espace/bdb which > explicitly mentions working with Ruby 1.9.1 (fork off the original code). > Worth noting for others that this gem only looks for db-4.7, db-4.6 db-4.5, > db-4.4, db-4.3 and db-4.2. I believe the default USE_BDB is 4.1. The other > thing is the path to db.h is hardcoded in the ext/extconf.rb to db_header = > "/usr/local/include/db.h", so you may need to tweak that. > > I've not managed to get that gem to build via the ports system or more > manually via the 'gem19 install' command. Although with the above tweaks > taken into account 'cd'ing into > /usr/local/lib/ruby/gems/1.9/gems/bdb-0.0.2/ext and running the extconf.rb > and resultant Makefile doesn't error: > > jail# make install > cc -shared -o bdb.so bdb.o -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L. > -rdynamic -Wl,-soname,bdb.so -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib > -lruby19 -ldb-4.7 -lcrypt -lm -L/usr/local/lib > -rpath=/usr/lib:/usr/local/lib -pthread -lc > /usr/bin/install -c -o root -g wheel -m 0755 bdb.so > /usr/local/lib/ruby/gems/1.9/gems/bdb-0.0.2/lib > > I'm afraid I'm getting to the slightly randomly prodding stuff stage - I'm > not a big C person (*the shame* - I know) > > Sorry not much of use I know, anyone a bit more knowledgeable got some > ideas? > > Regards > > Eric > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBAgAGBQJNirvWAAoJEPXPYrMgexuhqNsH/0eIdnIntzoKYM2lFF1L6Kuk /21LdaweYgPYhd7mTiC8BFy4pulEyHVxk5AV/sYcaecvDYqHgnpQVX4lzL96uRRH vHy3H4PwdGvcumFlyKBfdVtjqzHgJ5EVOey/yPIrs1t+8DbhpAmYI5y29btv3jRq dQi1c84pkxVQSah0DPXEusO1NYP+34pPRhUjEbi2MCKEPW4wB5MAgkgY6EPwIMTM EpMA6Pv8dQROc4bn5Lh+iDaKiaEr+q7riAD5DiuGgyPwakxZUL4chv6xp+x2hs43 GAZf5RvItOkCadJT1pznY9wLA00MFO49lgCucai+QruAXbu1icyi7tkMpb9N9e4= =3117 -----END PGP SIGNATURE----- --------------090303060805040800070208 Content-Type: text/plain; name="ruby-bdb-patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ruby-bdb-patch.txt" Index: Makefile =================================================================== RCS file: /home/ncvs/ports/databases/ruby-bdb/Makefile,v retrieving revision 1.61 diff -u -r1.61 Makefile --- Makefile 7 Jun 2010 20:48:38 -0000 1.61 +++ Makefile 24 Mar 2011 03:23:27 -0000 @@ -7,12 +7,12 @@ PORTNAME= bdb PORTVERSION= 0.6.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= databases ruby -MASTER_SITES= RF +MASTER_SITES= https://download.github.com/ PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX} PKGNAMESUFFIX= ${WITH_BDB_VER} -DIST_SUBDIR= ruby +DISTNAME= knu-ruby-bdb-v0.6.5-8-g6feba54 MAINTAINER= knu@FreeBSD.org COMMENT= Ruby interface to Sleepycat's Berkeley DB revision 2 or later @@ -30,11 +30,11 @@ --with-db-version=${BDB_LIB_NAME:S/^db//} INSTALL_TARGET= site-install +WRKSRC= ${WRKDIR}/knu-ruby-bdb-6feba54 + DOCS= Changes \ README.en \ - bdb.html \ bdb.rd \ - docs/*.html \ docs/*.rd .include <bsd.port.pre.mk> Index: distinfo =================================================================== RCS file: /home/ncvs/ports/databases/ruby-bdb/distinfo,v retrieving revision 1.44 diff -u -r1.44 distinfo --- distinfo 20 Mar 2011 12:47:58 -0000 1.44 +++ distinfo 24 Mar 2011 03:08:00 -0000 @@ -1,2 +1,2 @@ -SHA256 (ruby/bdb-0.6.5.tar.gz) = edba29bb720fa32a93a80b2746667d52a30d63e418e89958b17896ef0f25889d -SIZE (ruby/bdb-0.6.5.tar.gz) = 321865 +SHA256 (knu-ruby-bdb-v0.6.5-8-g6feba54.tar.gz) = 88582a29003fa0fb61c9136187db9cca575f5d11d64d5f5eec6e0c49f5416067 +SIZE (knu-ruby-bdb-v0.6.5-8-g6feba54.tar.gz) = 286058 Index: files/patch-src_common.c =================================================================== RCS file: files/patch-src_common.c diff -N files/patch-src_common.c --- files/patch-src_common.c 7 May 2009 16:12:59 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,20 +0,0 @@ ---- src/common.c.orig 2009-05-02 19:19:39.000000000 +0400 -+++ src/common.c 2009-05-02 19:20:04.000000000 +0400 -@@ -941,7 +941,7 @@ - } - } - if (!(dbst->options & BDB_NOT_OPEN)) { -- bdb_test_error(dbst->dbp->close(dbst->dbp, flags)); -+ dbst->dbp->close(dbst->dbp, flags); - } - } - else { -@@ -950,7 +950,7 @@ - bdb_ary_delete(&envst->db_ary, dbst->ori_val); - } - if (!(dbst->options & BDB_NOT_OPEN)) { -- bdb_test_error(dbst->dbp->close(dbst->dbp, flags)); -+ dbst->dbp->close(dbst->dbp, flags); - } - } - } --------------090303060805040800070208 Content-Type: application/octet-stream; name="ruby-bdb-patch.txt.sig" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ruby-bdb-patch.txt.sig" iQEcBAABAgAGBQJNirvXAAoJEPXPYrMgexuhCkkH/2kVdxyprTwbgq6lSb6aG9HDRDHnXWEg cSTFbcxmWWFZ1aB1sSnzNAciMPS9WLAdREn16cj9H3zmsIzq1XsiBEp4GNT1M+dh3r3HPaZE iHis3qt/NzWNHsvCG/7puScDzsMnFGBuKoeZjCp7P0h4OcEzrmE3GvQ1VW/ok28qSV3Q5X11 WHMYWQQjLxrj3lnTdBc7/B/rMMPkX7bv47q0juXEpNHeI9GN4dlHl4LEfPMZw4D1H93SIxDF hW0F0oZW2QawWEn8MxhGSUUM2dWVVr2GyopOKu6UWGiak3DH8jYq5Nq+WlB3LEjIJz1ZzzV/ s/CLOxn82UJsHhYjA2nKu7w= --------------090303060805040800070208--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D8ABBD7.8050706>