Project

General

Profile

Actions

Bug #2317

closed

ruby/config.h header file not found

Bug #2317: ruby/config.h header file not found

Added by Redwind (Red Wind) over 16 years ago. Updated almost 15 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
Backport:
[ruby-core:26449]

Description

=begin
In several Linux distributions I see that the header files ruby/ruby.h and
ruby/st.h installed in /usr/include/ruby-1.9.1 contain '#include "ruby/config.h"'.
But the file ruby/config.h does not exist. Instead it is installed
in /usr/incude/ruby-1.9.1/{architecture}-linux/ruby/config.h.

I saw some applications had to fix their builds by creating a link like this:
ln -s /usr/include/ruby-1.9.1/{architecture}-linux/ruby/config.h /usr/include/ruby-1.9.1/ruby/config.h

The origin of the problem is in the ruby release not any patches from distros.
Is this a simple bug in the ruby makefiles or is ruby really expecting all applications
to change their makefiles? Or is there some other solution?
=end

Updated by rogerdpack (Roger Pack) over 16 years ago Actions #1

=begin

ruby/st.h installed in /usr/include/ruby-1.9.1 contain '#include "ruby/config.h"'.
But the file ruby/config.h does not exist. Instead it is installed
in /usr/incude/ruby-1.9.1/{architecture}-linux/ruby/config.h.

I think this is expected. Maybe?

=end

Updated by Redwind (Red Wind) over 16 years ago Actions #2

=begin
The locations may be the intended ones (or not, you tell me) but I am saying that
the include files are broken because if you try to compile a C program with

gcc -I/usr/include/ruby-1.9.1 ...

it fails because /usr/include/ruby-1.9.1/ruby/config.h does not exist.
Only /usr/include/ruby-1.9.1/{architecture}-linux/ruby/config.h exists.

To make it work you either need to add a link as I said above, or you need to
compile with a second option -I/usr/include/ruby-1.9.1/{architecture}-linux,
which means changing existing applications' makefiles.

Should the ruby 'make install' be changed so that it creates the link? Or did
the ruby developers have something else in mind?
=end

Updated by naruse (Yui NARUSE) over 16 years ago Actions #3

  • Status changed from Open to Rejected

=begin
As Red Wind said it is intended.
You should add -I /usr/incude/ruby-1.9.1/{architecture}-linux/ruby/config.h or something to Makefile.

You can use mkmf.rb for ease.
http://www.ruby-doc.org/stdlib/libdoc/mkmf/rdoc/index.html
=end

Actions

Also available in: PDF Atom