Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76359 - require 'mkmf' can't find header files for ruby
Summary: require 'mkmf' can't find header files for ruby
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: Highest blocker (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
: 89463 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-01 17:55 UTC by Joerg Plate
Modified: 2005-04-21 20:55 UTC (History)
3 users (show)

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


Attachments
/usr/lib/ruby/1.8/x86_64-linux/rbconfig.rb (rbconfig.rb,6.22 KB, text/plain)
2005-01-29 03:32 UTC, Joerg Plate
Details
ruby-1.8.2-r2.diff (ruby-1.8.2-r2.diff,1.29 KB, patch)
2005-04-17 07:53 UTC, MATSUU Takuto (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Plate 2005-01-01 17:55:06 UTC
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"
Comment 1 Joseph, Jang 2005-01-12 20:37:07 UTC
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"


Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2005-01-27 12:06:00 UTC
Can you please attach your /usr/lib/ruby/1.8/x86_64-pc-linux-gnu/rbconfig.rb file?
Comment 3 Joerg Plate 2005-01-29 03:32:59 UTC
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
Comment 4 Joerg Plate 2005-02-20 03:30:21 UTC
The error disappears if you use
    CONFIG["srcdir"] = "/usr/include"
in rbconfig.rb.
But i doubt it is a valid solution...
Comment 5 Joerg Plate 2005-03-03 02:17:35 UTC
>>> 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
Comment 6 Carles Escrig 2005-04-04 08:42:38 UTC
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"

Comment 7 MATSUU Takuto (RETIRED) gentoo-dev 2005-04-17 07:53:01 UTC
Created attachment 56516 [details, diff]
ruby-1.8.2-r2.diff

better solution :)
Comment 8 MATSUU Takuto (RETIRED) gentoo-dev 2005-04-17 07:57:48 UTC
my amd64 has same problem. It is multilib problem.
Please apply a patch.
Comment 9 Michael Kohl (RETIRED) gentoo-dev 2005-04-18 02:06:52 UTC
*** Bug 89463 has been marked as a duplicate of this bug. ***
Comment 10 Mamoru KOMACHI (RETIRED) gentoo-dev 2005-04-20 20:58:01 UTC
matsuu, please apply your patch and close the bug. 
(The patch seems ok but I cannot test it on 64bit arch)
Comment 11 MATSUU Takuto (RETIRED) gentoo-dev 2005-04-21 20:55:52 UTC
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)