Bug #2317
closedruby/config.h header file not found
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
=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
=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
- 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