1> echo "require 'mkmf'" | strace -e trace=file ruby 2>&1 | grep ruby.h stat("/var/tmp/portage/ruby-1.8.2/work/ruby-1.8.2/ruby.h", 0x7fbfff7a20) = -1 ENOENT (No such file or directory) Reproducible: Always Steps to Reproduce: 1. emerge ruby 2> echo "require 'mkmf'" | ruby can't find header files for ruby. Portage 2.0.51-r8 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-gentoo-ck1 x86_64) ================================================================= System uname: 2.6.10-gentoo-ck1 x86_64 AMD Athlon(tm) 64 Processor 4000+ Gentoo Base System version 1.6.8 Python: dev-lang/python-2.3.4,dev-lang/python-2.4 [2.4 (#1, Dec 21 2004, 21:22:23)] ccache version 2.3 [enabled] dev-lang/python: 2.3.4, 2.4 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.9.3, 1.5, 1.8.5-r2, 1.6.3, 1.4_p6, 1.7.9 sys-devel/binutils: 2.15.92.0.2-r1, 2.15.92.0.2-r2 sys-devel/libtool: 1.5.10-r2 virtual/os-headers: 2.6.8.1-r1 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon64 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /opt/openjms/config /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 /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=athlon64 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig buildpkg candy ccache distlocks moo sandbox" GENTOO_MIRRORS="http://gentoo.llarian.net/ ftp://cs.ubishops.ca/pub/gentoo http://mirror.tucdemonic.org/gentoo/ http://gentoo.binarycompass.org http://modzer0.cs.uaf.edu/public/gentoo/" LDFLAGS="" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="doc tcltk threads"
Found an errata in /usr/lib/ruby/1.8/x86_64-linux/rbconfig.rb. --- rbconfig.rb.old 2005-01-13 13:29:43.581254776 +0900 +++ rbconfig.rb 2005-01-13 13:29:47.055726576 +0900 @@ -29,7 +29,7 @@ CONFIG["sysconfdir"] = "$(DESTDIR)/etc" CONFIG["sharedstatedir"] = "$(prefix)/com" CONFIG["localstatedir"] = "$(DESTDIR)/var/lib" - CONFIG["libdir"] = "$(DESTDIR)//usr/lib" + CONFIG["libdir"] = "$(DESTDIR)/usr/lib" CONFIG["includedir"] = "$(prefix)/include" CONFIG["oldincludedir"] = "/usr/include" CONFIG["infodir"] = "$(DESTDIR)/usr/share/info"
Can you please attach your /usr/lib/ruby/1.8/x86_64-pc-linux-gnu/rbconfig.rb file?
Created attachment 49815 [details] /usr/lib/ruby/1.8/x86_64-linux/rbconfig.rb The only rbconfig.rb i have is /usr/lib/ruby/1.8/x86_64-linux/rbconfig.rb
The error disappears if you use CONFIG["srcdir"] = "/usr/include" in rbconfig.rb. But i doubt it is a valid solution...
>>> md5 src_uri ;-) sqlite-ruby-2.2.3.tar.bz2 >>> Unpacking source... >>> Unpacking sqlite-ruby-2.2.3.tar.bz2 to /var/tmp/portage/sqlite-ruby-2.2.3/work >>> Source unpacked. can't find header files for ruby. !!! ERROR: dev-ruby/sqlite-ruby-2.2.3 failed. !!! Function src_compile, Line 27, Exitcode 1 !!! ruby extconf.rb failed
I had same problem triying to emerge ruby-glib2: >>> Source unpacked. can't find header files for ruby. !!! ERROR: dev-ruby/ruby-glib2-0.12.0 failed. !!! Function ruby-gnome2_src_compile, Line 33, Exitcode 1 !!! extconf.rb failed Solved it editing the rbconfig.rb at line 32: /usr/lib/ruby/1.8/x86_64-linux/rbconfig.rb - CONFIG["libdir"] = "$(DESTDIR)/usr/lib64" + CONFIG["libdir"] = "$(DESTDIR)/usr/lib"
Created attachment 56516 [details, diff] ruby-1.8.2-r2.diff better solution :)
my amd64 has same problem. It is multilib problem. Please apply a patch.
*** Bug 89463 has been marked as a duplicate of this bug. ***
matsuu, please apply your patch and close the bug. (The patch seems ok but I cannot test it on 64bit arch)
Fixed (ruby-1.8.2-r1.ebuild): 20 Apr 2005; Herbie Hopkins <herbs@gentoo.org> ruby-1.8.2-r1.ebuild: Fix my sed statement... bug #89736. 19 Apr 2005; Herbie Hopkins <herbs@gentoo.org> ruby-1.8.2-r1.ebuild: Correct a hard-coded lib path in the configure script to close bug #76111 (for real this time)