Bug 216367 - ruby-glib2 mistakenly tries to compile for ruby 1.9
Bug#: 216367 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: ruby@gentoo.org Reported By: tarmo@itech.ee
Component: Library
URL: 
Summary: ruby-glib2 mistakenly tries to compile for ruby 1.9
Keywords:  
Status Whiteboard: 
Opened: 2008-04-05 18:10 0000
Description:   Opened: 2008-04-05 18:10 0000
ruby-glib2 fails to compile if the system has both ruby 1.8 and ruby 1.9
installed.

The exact error is a clear indication of using ruby 1.9 while expecting 1.8
api:
cc -I. -I/usr/include/ruby-1.9.0/x86_64-linux -I/usr/include/ruby-1.9.0
-I/var/tmp/portage/dev-ruby/ruby-glib2-0.16.0-r3/work/ruby-gnome2-all-0.16.0/glib/src
-DHAVE_RB_DEFINE_ALLOC_FUNC -DHAVE_RB_BLOCK_PROC -DHAVE_OBJECT_ALLOCATE
-DHAVE_G_THREAD_INIT -DHAVE_G_MAIN_DEPTH -DHAVE_G_LISTENV
-DHAVE_RB_CHECK_ARRAY_TYPE -DHAVE_RB_EXEC_RECURSIVE -DRUBY_GLIB2_COMPILATION   
-I/usr/lib/ruby/site_ruby/1.9.0/x86_64-linux  -fPIC -O2 -march=nocona -pipe 
-fPIC  -Wall -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include    -o rbglib_iochannel.o
-c rbglib_iochannel.c
rbglib_iochannel.c: In function ‘ioc_read_line’:
rbglib_iochannel.c:250: error: ‘struct RString’ has no member named
‘len’
rbglib_iochannel.c: In function ‘ioc_gets’:
rbglib_iochannel.c:288: error: ‘struct RString’ has no member named
‘len’
rbglib_iochannel.c: In function ‘ioc_set_line_term’:
...

A simple fix is to make the ebuild set USE_RUBY="ruby18"

Reproducible: Always

Steps to Reproduce:

------- Comment #1 From Hans de Graaff 2008-04-06 08:55:12 0000 -------
Thanks, fixed in CVS.