glib2 doesn't compile under jruby 1.9.7 #467

vpereira opened this Issue Jan 1, 2013 · 3 comments


None yet

1 participant

vpereira commented Jan 1, 2013

C extensions are enabled


gem install glib2 (1.1.9)

rbglib_messages.c: In function ‘rbglib_log_handler’:
rbglib_messages.c:66:37: error: ‘ruby_sourcefile’ undeclared (first use in this function)
rbglib_messages.c:66:37: note: each undeclared identifier is reported only once for each function it appears in
rbglib_messages.c:66:54: error: ‘ruby_sourceline’ undeclared (first use in this function)
make: *** [rbglib_messages.o] Error 1

ghost commented Jan 1, 2013

Looks like the real problem is JRuby doesn't support rb_sourceline() and rb_sourcefile(), which glib2 uses for some of its logging. We can fake them fairly easily.

Unless you are installing a package that explicitly depends on the cext based glib2/gnome2 stack, I would recommend investigating - that uses FFI to do the bindings from glib/gtk2+, etc and will work on future versions of JRuby (and MRI of course).

@ghost Unknown added a commit that closed this issue Jan 1, 2013
Wayne Meissner Fake cext rb_sourcefile(), rb_sourceline(), ruby_sourcefile. Fixes #467. 4831883
@ghost ghost closed this in 4831883 Jan 1, 2013
vpereira commented Jan 1, 2013

hi, i'm installing some math gems. If I install the jruby-head from rvm do i get this last commit?

ghost commented Jan 2, 2013

I would assume so. Best way to find out is to try it.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment