Summary: | emerge ruby with use-flag +cjk silently fails to install oniguruma Regexp-Engine | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Hannes Wyss <hwyss> |
Component: | New packages | Assignee: | Gentoo Ruby Team <ruby> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hwyss |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Proposed Patch
Patch against ruby-1.8.5_p2 with hardcoded value for oniguruma (explanation follows) Patch against ruby-1.8.5_p2 with extrapolated value for oniguruma |
Description
Hannes Wyss
2006-09-12 08:18:59 UTC
Created attachment 96794 [details, diff]
Proposed Patch
The patch includes only two changes:
* the newest stable Oniguruma-Patchset is used
* instead of assembling the make command as ${PV/./}, I decided to hardcode it as 18.
This needs a little explanation: there are two reasons why make ${PV/./} does not work. First; the actual result of the substitution (at least on my system) is not "185" as intended, but "18.5", which is not a valid make target according to the oniguruma Makefile. Second; due to the upstream-patch lagging behind, the latest valid target is "184" and not "185". The hardcoded "18" is usually (at least atm.) aliased to the most recent patch, therefore there should be no need to change that value for subsequent 1.8.x releases. From release 1.9.0 on, a completely different patchset is needed anyway and from 2.0 on, oniguruma will be included in vanilla ruby.
Although the most recent oniguruma-patchset is taken against 1.8.4, it applies cleanly to 1.8.5.
This still happens on all my machines, most recently on: hwyss@doubledog /usr/portage/dev-lang/ruby $ emerge --info Portage 2.1.1-r2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18.1 x86_64) ================================================================= System uname: 2.6.18.1 x86_64 Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz Gentoo Base System version 1.12.6 Last Sync: Wed, 22 Nov 2006 13:50:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.60 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r4 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=nocona -mno-tls-direct-seg-refs" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -pipe -march=nocona -mno-tls-direct-seg-refs" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo " LC_ALL="en_IE.UTF8" LINGUAS="en en_GB de it fr ga_IE ja" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/xeffects" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="amd64 X Xaw3d acpi aiglx alsa apache2 bash-completion berkdb bitmap-fonts bzip2 cjk cli cracklib crypt cups curl dbus dga directfb dlloader dri dvd elibc_glibc fbcon fortran gdbm ggi gif glitz gpm gtk iconv input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog java javascript jikes jpeg kernel_linux libg++ linguas_de linguas_en linguas_en_GB linguas_fr linguas_ga_IE linguas_it linguas_ja mp3 mpeg multiuser ncurses nethack nls nptl nptlonly offensive ogg opengl pam paste64 pcre pdf perl png postgres ppds pppd python readline reflection sasl sdl session spl sqlite ssl svg sysfs tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_radeon vim vorbis xorg zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS Hi What's the status on this bug? So far nothing has moved afaics - is there anything I can do to help speed up fixing this issue? TIA Hannes Don't know.. ruby-1.8.5_p2 seems to work fine. I'll recheck the bug tomorrow Confirmed the bug on dev-lang/ruby-1.8.5. However 1.8.5_p2 is stable on ppc already. Maybe you should upgrade and check if 1.8.5_p2 works for you? ruby-1.8.5_p2 does not work for me (TM) In src_unpack (line 46) we have: make ${MY_PV/./} MY_PV is not defined on my system -> the executed command is simply make. The default make-target for oniguruma does not patch ruby, but simply compiles libonig.a: doubledog ruby # ebuild ruby-1.8.5_p2.ebuild unpack [snip everything but the last few lines ...] ar rc libonig.a regerror.o regparse.o regcomp.o regexec.o reggnu.o regenc.o regsyntax.o regversion.o regposix.o regposerr.o enc/ascii.o enc/utf8.o enc/euc_jp.o enc/euc_tw.o enc/euc_kr.o enc/sjis.o enc/iso8859_1.o enc/iso8859_2.o enc/iso8859_3.o enc/iso8859_4.o enc/iso8859_5.o enc/iso8859_6.o enc/iso8859_7.o enc/iso8859_8.o enc/iso8859_9.o enc/iso8859_10.o enc/iso8859_11.o enc/iso8859_13.o enc/iso8859_14.o enc/iso8859_15.o enc/iso8859_16.o enc/koi8.o enc/koi8_r.o enc/big5.o x86_64-pc-linux-gnu-ranlib libonig.a /var/tmp/portage/ruby-1.8.5_p2/work * Running eautoreconf in '/var/tmp/portage/ruby-1.8.5_p2/work/ruby-1.8.5-p2' ... * Requested autoconf 2.5 * Using autoconf (GNU Autoconf) 2.60 * Using autoheader (GNU Autoconf) 2.60 * Requested automake latest: 1.10 * Using automake (GNU automake) 1.10 * Using aclocal (GNU automake) 1.10 * Running aclocal ... [ ok ] * Running autoconf ... [ ok ] >>> Source unpacked. As a result, Oniguruma does not work: hwyss@doubledog ~ $ uname -a Linux doubledog 2.6.18.1 #23 SMP PREEMPT Sat Dec 9 17:26:36 CET 2006 x86_64 Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz GenuineIntel GNU/Linuxhwyss@doubledog ~ $ ruby --version ruby 1.8.5 (2006-12-04 patchlevel 2) [x86_64-linux] hwyss@doubledog ~ $ irb irb(main):001:0> /(?<quote>['"])/ SyntaxError: compile error (irb):1: undefined (?...) sequence: /(?<quote>['"])/ from (irb):1 irb(main):002:0> Regexp::ENGINE NameError: uninitialized constant Regexp::ENGINE from (irb):2 irb(main):003:0> instead, with "make 18" on line 46 (and ONIGURUMA="onigd2_5_7", but that's optional): doubledog ruby # ebuild ruby-1.8.5_p2.ebuild unpack [snip everything but the last few lines ...] patch -d /var/tmp/portage/ruby-1.8.5_p2/work/ruby-1.8.5-p2 -p0 < ./ruby184.patch patching file gc.c Hunk #1 succeeded at 968 (offset 14 lines). patching file re.h patching file re.c [snip more fuzzy Hunks ...] patching file string.c [snip more fuzzy Hunks ...] /var/tmp/portage/ruby-1.8.5_p2/work * Running eautoreconf in '/var/tmp/portage/ruby-1.8.5_p2/work/ruby-1.8.5-p2' ... * Requested autoconf 2.5 * Using autoconf (GNU Autoconf) 2.60 * Using autoheader (GNU Autoconf) 2.60 * Requested automake latest: 1.10 * Using automake (GNU automake) 1.10 * Using aclocal (GNU automake) 1.10 * Running aclocal ... [ ok ] * Running autoconf ... [ ok ] >>> Source unpacked. And Oniguruma works: hwyss@doubledog ~ $ uname -a Linux doubledog 2.6.18.1 #23 SMP PREEMPT Sat Dec 9 17:26:36 CET 2006 x86_64 Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz GenuineIntel GNU/Linuxhwyss@doubledog ~ $ ruby --version ruby 1.8.5 (2006-12-04 patchlevel 2) [x86_64-linux] hwyss@doubledog ~ $ irb irb(main):001:0> /(?<quote>['"])/ => /(?<quote>['"])/ irb(main):002:0> Regexp::ENGINE => "Oniguruma" irb(main):003:0> I hope that explains better what I'm trying to achieve - thanks in advance Hannes Ok. I kept wondering how that MY_PV magic happened while it was undefined too. I didn't see error messages while compiling so I supposed it worked (which is obviously wrong, thanks for your irb test). However I'm reluctant to hardcode "18" inside src_unpack. Could you please rework the patch to extract "18" from ${PV}? Created attachment 104032 [details, diff]
Patch against ruby-1.8.5_p2 with hardcoded value for oniguruma (explanation follows)
Created attachment 104033 [details, diff]
Patch against ruby-1.8.5_p2 with extrapolated value for oniguruma
Comment on attachment 104032 [details, diff]
Patch against ruby-1.8.5_p2 with hardcoded value for oniguruma (explanation follows)
I've seen the light :)
Ok, patch uploaded. tia Hannes Umm.. your new patch will break once 2.10 is released (admittedly it will take years for that to happen). I slightly modified your patch to use get_version_component_range from versionator.eclass, which is less error-prone. Thank you for your very active support (and sorry for ruby herd being slow on response - we're currently understaffed) (In reply to comment #12) > Umm.. your new patch will break once 2.10 is released (admittedly it will take > years for that to happen). As far as I understand, Ruby 2.0 will include oniguruma by default, so that should not be an issue. > Thank you for your very active support (and sorry for ruby herd being slow on > response - we're currently understaffed) I'll be more than happy to help in any way I can. Thanks for your time Hannes |