Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 191203 - dev-ruby/ruby-mmap build patch
Summary: dev-ruby/ruby-mmap build patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-04 00:38 UTC by Brenden Matthews
Modified: 2007-09-18 17:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ruby-mmap-0.2.6-r1.patch (ruby-mmap-0.2.6-r1.patch,638 bytes, patch)
2007-09-04 00:40 UTC, Brenden Matthews
Details | Diff
ruby-mmap-0.2.6-r1.ebuild.diff (ruby-mmap-0.2.6-r1.ebuild.diff,484 bytes, patch)
2007-09-04 00:41 UTC, Brenden Matthews
Details | Diff
extra-patch-oniguruma.patch (extra-patch-oniguruma.patch,555 bytes, patch)
2007-09-18 13:43 UTC, Richard Brown (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brenden Matthews 2007-09-04 00:38:58 UTC
I've written a small patch to fix ruby-mmap so it actually builds.  Works great on amd64.
Comment 1 Brenden Matthews 2007-09-04 00:40:53 UTC
Created attachment 129962 [details, diff]
ruby-mmap-0.2.6-r1.patch

Patch for ruby-mmap
Comment 2 Brenden Matthews 2007-09-04 00:41:40 UTC
Created attachment 129963 [details, diff]
ruby-mmap-0.2.6-r1.ebuild.diff

Patch for ebuild
Comment 3 Hans de Graaff gentoo-dev Security 2007-09-04 19:59:29 UTC
So I've first tried the 0.2.6 version currently in portage, and it compiles just fine for me on AMD64. Could you give a bit more info as to why you need this patch?  At least the ruby version would be useful, as would the error messages you were getting.
Comment 4 Brenden Matthews 2007-09-05 03:32:44 UTC
Here you go:


mail ~ # paludis -ip dev-lang/ruby
Building target list... 
Building dependency list...

These packages will be installed:

* dev-lang/ruby-1.8.6_p36-r4 {:1.8} [R] cjk -debug -doc -examples -ipv6 -rubytests -socks5 threads -tk

Total: 1 package (1 rebuild)

mail ~ # paludis -i =dev-ruby/ruby-mmap-0.2.6
Building target list... 
Building dependency list...

These packages will be installed:

* dev-ruby/ruby-mmap-0.2.6 {:0} [D 0.2.6-r1] 

Total: 1 package (1 downgrade)

(1 of 1) Installing dev-ruby/ruby-mmap-0.2.6::gentoo

paludis@1188963082: [WARNING] In program paludis -i =dev-ruby/ruby-mmap-0.2.6:
  ... When performing install action from command line:
  ... When executing install task:
  ... When installing 'dev-ruby/ruby-mmap-0.2.6':
  ... When checking permissions on '/usr/portage/distfiles' for userpriv:
  ... Directory '/usr/portage/distfiles' owned by group 'portage', not 'paludisbuild', so cannot enable userpriv
>>> Running ebuild phase fetch as root:root...
>>> Starting builtin_fetch
>>> Already have mmap-0.2.6.tar.gz
 * Checking MD5 for mmap-0.2.6.tar.gz ...                                [ ok ]
 * Checking RMD160 for mmap-0.2.6.tar.gz ...                             [ ok ]
 * Checking SHA256 for mmap-0.2.6.tar.gz ...                             [ ok ]
>>> Done builtin_fetch
>>> Completed ebuild phase fetch
paludis@1188963083: [WARNING] In program paludis -i =dev-ruby/ruby-mmap-0.2.6:
  ... When performing install action from command line:
  ... When executing install task:
  ... When installing 'dev-ruby/ruby-mmap-0.2.6':
  ... When checking permissions on '/var/tmp/paludis' for userpriv:
  ... Directory '/var/tmp/paludis' owned by group 'root', not 'paludisbuild', cannot enable userpriv
>>> Running ebuild phase prepare as root:root...
>>> Starting builtin_prepare
>>> Done builtin_prepare
>>> Completed ebuild phase prepare
>>> Running ebuild phases init saveenv as root:root...
>>> Starting builtin_init
>>> Done builtin_init
>>> Starting builtin_saveenv
>>> Done builtin_saveenv
>>> Completed ebuild phases init saveenv
>>> Running ebuild phases loadenv setup saveenv as root:root...
>>> Starting builtin_loadenv
>>> Done builtin_loadenv
>>> Starting pkg_setup
>>> Done pkg_setup
>>> Starting builtin_saveenv
>>> Done builtin_saveenv
>>> Completed ebuild phases loadenv setup saveenv
>>> Running ebuild phases loadenv unpack compile test saveenv as root:root...
>>> Starting builtin_loadenv
>>> Done builtin_loadenv
>>> Starting src_unpack
>>> Unpacking mmap-0.2.6.tar.gz to /var/tmp/paludis/dev-ruby/ruby-mmap-0.2.6/work
tar zxf /usr/portage/distfiles/mmap-0.2.6.tar.gz --no-same-owner
>>> Done src_unpack
>>> Starting src_compile
creating Makefile
/usr/lib/ccache/bin/gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I.  -fPIC -march=athlon64 -O2 -ftracer -pipe -fno-strict-aliasing  -fPIC -DHAVE_RB_STR_LSTRIP -DHAVE_RB_STR_MATCH -DHAVE_RB_STR_INSERT -DHAVE_RB_STR_CASECMP -DRUBYLIBDIR='"/usr/lib64/ruby/1.8"'  -c mmap.c

                            mmap.rb: cc.............................................................
Generating HTML...

Files:   1
Classes: 2
Modules: 0
Methods: 61
Elapsed: 0.643s
mmap.c: In function `mm_sub_bang_int':
mmap.c:1116: error: too few arguments to function `rb_reg_regsub'
mmap.c: In function `mm_gsub_bang_int':
mmap.c:1214: error: too few arguments to function `rb_reg_regsub'
make: *** [mmap.o] Error 1

!!! ERROR in dev-ruby/ruby-mmap-0.2.6:
!!! In ruby_emake at line 3118
!!! emake for ruby failed

!!! Call stack:
!!!    * ruby_emake (/var/tmp/paludis/dev-ruby/ruby-mmap-0.2.6/temp/loadsaveenv:3118)
!!!    * ruby_src_compile (/var/tmp/paludis/dev-ruby/ruby-mmap-0.2.6/temp/loadsaveenv:3139)
!!!    * src_compile (/var/tmp/paludis/dev-ruby/ruby-mmap-0.2.6/temp/loadsaveenv:3224)
!!!    * ebuild_f_compile (/usr/libexec/paludis/src_compile.bash:51)
!!!    * ebuild_main (/usr/libexec/paludis/ebuild.bash:354)
!!!    * main (/usr/libexec/paludis/ebuild.bash:372)

die trap: exiting with error.

Install error:
  * In program paludis -i =dev-ruby/ruby-mmap-0.2.6:
  * When performing install action from command line:
  * When executing install task:
  * When installing 'dev-ruby/ruby-mmap-0.2.6':
  * Install error: Install failed for 'dev-ruby/ruby-mmap-0.2.6::gentoo'


Resume command: paludis --log-level warning --dl-deps-default discard --install '=dev-ruby/ruby-mmap-0.2.6::gentoo' --add-to-world-spec '( =dev-ruby/ruby-mmap-0.2.6 )'
Comment 5 Hans de Graaff gentoo-dev Security 2007-09-09 06:41:01 UTC
I've checked the definition of rb_reg_regsub for ruby 1.8.4, 1.8.5, and 1.8.6, and all of them look like this, matching the unpatched use in ruby-mmap:

VALUE rb_reg_regsub _((VALUE, VALUE, struct re_registers *));

So something weird is going on. Can you check 
/usr/lib64/ruby/1.8/x86_64-linux/re.h to see what its definition of rb_reg_regsub is, and run "equery belongs /usr/lib64/ruby/1.8/x86_64-linux/re.h" to check which package claims this file?
Comment 6 Hans de Graaff gentoo-dev Security 2007-09-15 08:02:20 UTC
Can't be worked on until more info is available.
Comment 7 Brenden Matthews 2007-09-16 00:21:24 UTC
I forgot about this, been busy.  Heres the stuff you asked for:

mail ~ # grep rb_reg_regsub /usr/lib64/ruby/1.8/x86_64-linux/re.h
VALUE rb_reg_regsub _((VALUE, VALUE, struct re_registers *, VALUE));
mail ~ # equery belongs /usr/lib64/ruby/1.8/x86_64-linux/re.h
[ Searching for file(s) /usr/lib64/ruby/1.8/x86_64-linux/re.h in *... ]
dev-lang/ruby-1.8.6_p36-r4 (/usr/lib64/ruby/1.8/x86_64-linux/re.h)
Comment 8 Richard Brown (RETIRED) gentoo-dev 2007-09-18 13:38:33 UTC
Installing ruby with USE="cjk" has altered the prototype for that function.
Comment 9 Richard Brown (RETIRED) gentoo-dev 2007-09-18 13:43:27 UTC
Created attachment 131213 [details, diff]
extra-patch-oniguruma.patch

Slightly different patch from ports 

http://www.freebsd.cz/cgi/cvsweb.cgi/ports/devel/ruby-mmap/files/extra-patch-oniguruma
Comment 10 Richard Brown (RETIRED) gentoo-dev 2007-09-18 17:19:54 UTC
Fixed in CVS