Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147333 - emerge ruby with use-flag +cjk silently fails to install oniguruma Regexp-Engine
Summary: emerge ruby with use-flag +cjk silently fails to install oniguruma Regexp-Engine
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: 2006-09-12 08:18 UTC by Hannes Wyss
Modified: 2006-12-14 06:42 UTC (History)
1 user (show)

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


Attachments
Proposed Patch (ruby-1.8.5.ebuild.patch,686 bytes, patch)
2006-09-12 08:29 UTC, Hannes Wyss
Details | Diff
Patch against ruby-1.8.5_p2 with hardcoded value for oniguruma (explanation follows) (ruby-1.8.5_p2.ebuild.hardcoded.patch,501 bytes, patch)
2006-12-14 04:36 UTC, Hannes Wyss
Details | Diff
Patch against ruby-1.8.5_p2 with extrapolated value for oniguruma (ruby-1.8.5_p2.ebuild.patch,507 bytes, patch)
2006-12-14 04:36 UTC, Hannes Wyss
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hannes Wyss 2006-09-12 08:18:59 UTC
Patch is attached.

The relevant output:

 * Applying onigd2_5_4
/var/tmp/portage/ruby-1.8.5/work/oniguruma /var/tmp/portage/ruby-1.8.5/work
 * econf: updating ruby-1.8.5/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating ruby-1.8.5/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=powerpc-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-rubydir=/var/tmp/portage/ruby-1.8.5/work/ruby-1.8.5 --build=powerpc-unknown-linux-gnu
[...] snipped uninteresting ./configure - output
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
make: *** No rule to make target `18.5'.  Stop.
/var/tmp/portage/ruby-1.8.5/work
 * Using GNU config files from /usr/share/libtool

... so make fails with an error, but installation continues.


hwyss@lapdog ~ $ emerge --info
Portage 2.1.1_rc1-r7 (default-linux/ppc/ppc32/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17 ppc)
=================================================================
System uname: 2.6.17 ppc 7447A, altivec supported
Gentoo Base System version 1.12.4
Last Sync: Tue, 12 Sep 2006 03:50:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
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.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r4
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec -fno-strict-aliasing"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec -fno-strict-aliasing"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ ftp://ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.ISO8859-1"
LC_ALL="en_US.ISO8859-1"
LINGUAS="en de fr it"
MAKEOPTS="-j2"
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/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="ppc X a52 aac aim alsa altivec apache2 apm arts asf async avahi berkdb bindist bitmap-fonts bluetooth bonobo bzip2 cairo caps cdda cddb cdparanoia cdr chroot cjk cle266 cli cpudetection crypt cups curl curlwrappers custom-cflags daap dba dbus dga directfb dlloader dmx dri dts dv dvb dvd dvdread edl eds elibc_glibc emboss encode esd evo exif expat fame fastcgi fbcon fbdev ffmpeg firefox flac font-server fortran ftp gcj gd gdbm ggi gif gimpprint gmp gnome gnutls gpm graphviz gstreamer gtk gtkhtml hal httpd ibam ieee1394 image imagemagick imlib2 input_devices_keyboard input_devices_mouse ipod ipv6 isdnlog jack-tmpfs java javacomm jpeg kde kdeenablefinal kdexdeltas kernel_linux lcms ldap libg++ libwww linguas_de linguas_en linguas_fr linguas_it live lzo lzw mad maildir mailwrapper matroska mhash mikmod ming mjpeg mng mod mono mozdevelop mozilla moznocompose moznoirc moznomail mozsvg mozxmlterm mp3 mpeg mpm-threadpool munin-apache munin-dhcp munin-irc musepack mysql ncurses nls nodrm nptl nptlonly nsplugin offensive ogg ole opengl pam pbbuttonsd pci pcre pda pdf pdflib perl png postgres povray ppcsha1 pppd python qt3 qt4 quicktime readline reflection rplay rtc rtsp ruby sasl screen sdl session sheep shout skins speex spell spl sqlite ssl stream stroke svg tcpd tga theora threads tiff timidity truetype truetype-fonts type1 type1-fonts udev unicode usb userland_GNU v4l v4l2 video_cards_ati video_cards_fbdev video_cards_radeon vidix vim vlm vnc vorbis vorbis-psy wv xanim xfs xine xinerama xml xorg xosd xpm xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Hannes Wyss 2006-09-12 08:29:36 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.
Comment 2 Hannes Wyss 2006-11-24 01:11:45 UTC
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
Comment 3 Hannes Wyss 2006-12-13 04:43:23 UTC
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
Comment 4 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-13 13:14:19 UTC
Don't know.. ruby-1.8.5_p2 seems to work fine. I'll recheck the bug tomorrow
Comment 5 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-13 13:23:04 UTC
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?
Comment 6 Hannes Wyss 2006-12-14 01:36:29 UTC
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
Comment 7 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-14 04:06:07 UTC
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}?
Comment 8 Hannes Wyss 2006-12-14 04:36:09 UTC
Created attachment 104032 [details, diff]
Patch against ruby-1.8.5_p2 with hardcoded value for oniguruma (explanation follows)
Comment 9 Hannes Wyss 2006-12-14 04:36:51 UTC
Created attachment 104033 [details, diff]
Patch against ruby-1.8.5_p2 with extrapolated value for oniguruma
Comment 10 Hannes Wyss 2006-12-14 04:43:57 UTC
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 :)
Comment 11 Hannes Wyss 2006-12-14 04:45:49 UTC
Ok, patch uploaded.

tia
Hannes
Comment 12 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-14 06:21:39 UTC
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)
Comment 13 Hannes Wyss 2006-12-14 06:42:44 UTC
(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