On Dec 7, 2010, at 9:54 AM, Eric MSP Veith wrote: > Am Dienstag, 7. Dezember 2010, 04:43:10 schrieb Jeff Johnson: >> Talk to Per Oyvind if its the rpm-5_3 you want to change. rpm-5_4 is the >> same as HEAD, including your changes from this weekend. > > Per, do I have your permission? Or, more appropriately, do you want to merge > the corresponding changes from HEAD? Basically, it's about the following > patch: > > ---%<--- > RCS file: /v/rpm/cvs/rpm/configure.ac,v > retrieving revision 2.470 > diff -p -u -w -r2.470 configure.ac > --- configure.ac 2 Nov 2010 15:57:10 -0000 2.470 > +++ configure.ac 7 Dec 2010 14:52:36 -0000 > @@ -1517,8 +1517,17 @@ RPM_CHECK_LIB( > [Ruby], [ruby], > [ruby], [ruby_init], [ruby.h], > [no,external:none], [], > - [ AC_DEFINE(WITH_RUBYEMBED, 1, [Define to 1 if you want embedded Ruby]) > + [ > + AC_DEFINE(WITH_RUBYEMBED, 1, [Define to 1 if you want embedded Ruby]) > WITH_RUBY_SUBDIR=ruby > + > + WITH_RUBY_CPPFLAGS=["-I`ruby -rrbconfig -e \ > + 'puts RbConfig::expand(RbConfig::CONFIG[\"rubyhdrdir\"])'` \ > + -I`ruby -rrbconfig -e \ > + 'puts > RbConfig::expand(\"#{RbConfig::CONFIG[\"rubyhdrdir\"]}/$(arch)\")'`" > + ] > + WITH_RUBY_VENDORARCHDIR=[`ruby -rrbconfig -e \ > + 'puts RbConfig::expand(RbConfig::CONFIG["vendorarchdir"])'`] > ], []) > AC_SUBST(WITH_RUBY_CPPFLAGS) > AC_SUBST(WITH_RUBY_SUBDIR) >
The main problem here is self-hosting: one cannot build with ruby unless ruby is functional. That logic has some corner cases with cross-packaging when host != target,and forces an additional build dependency on /usr/bin/ruby that is not easily tracked with AutoFu. (aside) There is scripts/ruby-config, and it isn't that hard to cruft up either ruby.pc or libruby-X.Y.la ... all preferred to invoking ruby imho. There's the further issue of what happens if you have multiple versions of ruby installed, where ruby-X.Y or /opt/local/bin/ruby must be invoked. Its not clear (nor necessary) that /usr/bin/ruby determines the library to link against. A better approach is declartive, like adding ruby-config or ruby.pc or libruby.la, each of those hintings for build flags is more narrowly targeted, and easier to integrate in AutoFu. > --->%--- > >> Embedded, not bindings, is the issue. There's no way to do 1.9.x >> embedding without a thread co-routine still afaik. > > That's true, but the problem lies mainly in querying the correct > inlcude/libraries paths. I.e., on my system, simply including <ruby/ruby.h> > doesn't work. One needs /usr/include/ruby/$ARCH as an additional per- > architecture include path. So it's neccesssary for both bindings and embedded. > > Meh. > > The flaw that is hacksolved by the coroutine solution doesn't become apparent > until runtime AFAIK. And its IMHO currently the better alternative as it > allows multiple interpreter instances and proper memory pooling, doesn't it? > embedded is all about run-time yes. Meanwhile the problem I reported _IS_ with the configgery you are suggesting moving to rpm-5_3, I saw that flaw on rpm-5_4 (which also means on HEAD). WORKSFORME on rpm-5_3 (but I likely have ruby-config twisted into my machine somewhere). 73 de Jeff ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org