From owner-freebsd-ruby@FreeBSD.ORG Sun Mar 20 17:58:36 2011 Return-Path: Delivered-To: freebsd-ruby@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C51D1065670 for ; Sun, 20 Mar 2011 17:58:36 +0000 (UTC) (envelope-from freebsdlists-ruby@chillibear.com) Received: from mail.sundive.org (mail.sundive.org [212.13.197.214]) by mx1.freebsd.org (Postfix) with ESMTP id D7ED78FC12 for ; Sun, 20 Mar 2011 17:58:35 +0000 (UTC) Received: from [87.114.249.137] (helo=[192.168.0.44]) by sundive.org with esmtpsa (TLSv1:DES-CBC3-SHA:168) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1Q1MQs-0002IJ-HP; Sun, 20 Mar 2011 17:28:52 +0000 User-Agent: Microsoft-Entourage/12.28.0.101117 Date: Sun, 20 Mar 2011 17:27:13 +0000 From: Eric To: Message-ID: Thread-Topic: making Ruby 1.9 default Thread-Index: AcvnJAzQ7yjC1qgM1U2Ov5ie/MKE9A== In-Reply-To: <20110317201715.3bbd1772.stas@FreeBSD.org> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam: No X-bounce-key: sundive.org-1; freebsdlists-ruby@chillibear.com; 1300644004; b36c3747; Cc: Steve Wills Subject: Re: making Ruby 1.9 default X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 17:58:36 -0000 [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