this command should return dir for site extensions ruby -rmkmf -e "puts Config::CONFIG['sitearchdir']" since this dir is not existing, EFL (www.enlightenment.org) ruby bindings (http://code-monkey.de/projects/ruby-efl.html) fails at configure saying: checking for Ruby site library path... not found configure: error: Ruby site extension path not found after mkdir -p /usr/lib/ruby/site_ruby/1.8/i686-linux compilation finished succesfully Reproducible: Always Steps to Reproduce: 1. emerge ruby 2. download EFL ruby bindings 3. try to compile them Actual Results: configure fails Expected Results: bindings compiles # epm -qG ruby dev-lang/ruby-1.8.2-r1 # ruby -rmkmf -e "puts Config::CONFIG['sitearchdir']" /usr/lib/ruby/site_ruby/1.8/i686-linux # emerge info Portage 2.0.51.19 (default-linux/x86/2005.0/2.4, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.4.28-gentoo-r8 i686) ================================================================= System uname: 2.4.28-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 21 2005, 23:56:59)] distcc[29836] (dcc_mkdir) ERROR: mkdir /var/tmp/portage/.distcc/state failed: No such file or directory [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.5, 1.9.4, 1.6.3, 1.4_p6, 1.8.5-r3 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.4.22-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -mcpu=i686 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /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/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="" DISTDIR="/mnt/disk/bordel/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.linux.cz/pub/linux/gentoo/" LINGUAS="en cz cs" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 X aac aalib acl alsa apache2 apm arts audiofile avi berkdb bitmap-fonts cdparanoia cdr crypt cups curl dga directfb divx4linux doc dvd dvdr dvdread emboss encode escreen esd fam fbcon flac flash font-server foomaticdb fortran ftp gcj gd gdbm gif gpm gtk gtk2 i8x0 imagemagick imlib ipv6 java jpeg jpeg2k junit kde libcaca libg++ libwww mad mikmod mmx mono motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mpeg mpeg4 nas ncurses net netboot network nls nvidia offensive ogg oggvorbis opengl oss pam pdflib perl php png pnp postgres postgresql povray python qt quicktime readline real ruby samba sdl slang speex spell sqlite ssl svga tcltk tcpd tetex tga tidy tiff timidity truetype truetype-fonts type1-fonts unicode videos vorbis win32codecs wmf xine xml2 xmms xprint xscreensaver xv xvid zlib linguas_en linguas_cz linguas_cs" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Interesting - the ruby ebuild seems to make that directory for me locally.
My hunch is that we need to keepdir it in the ebuild, or an upgrade may remove the directory if its empty.
Created attachment 104190 [details, diff] ruby-1.8.5_p2-keep-sitedirs.patch
Created attachment 104191 [details, diff] ruby-1.8.5_p2.patch Let's kill this old bug. The patch will keep sitedir and sitearchdir (sitearchdir is enough imo although keeping both isn't bad). I need a ruby script because I'm not sure I can safely get those dirs from bash. I'll make 1.8.5_p2-r1 if no one has problems with it.
You can just use the same method used in ruby.eclass to find sitedir (doruby) with miniruby instead of ruby, and then keepdir (that's better than creating them outside of ebuild itself).
I thought about that. However configure.in shows me MINIRUBY setting is more complicated for cross-compiling. Can we determine cross-compiling from ebuild?
Created attachment 104827 [details, diff] ruby-1.8.5_p12-r1.patch This patch no longer patch ${S}
I say go for it.
in 1.8.5_p12