Rb-gnome and gtkglext

I ran the darwinports install instructions on rb-gnome
http://rb-gnome.darwinports.com/
I would like to run an example which uses gtkglext:
http://www.bigbold.com/snippets/posts/show/1874

I got an error: /opt/local/lib/ruby/vendor_ruby/1.8/gtk2.rb:5:in
`require’: no such file to load
– gdk_pixbuf2 (LoadError)
from /opt/local/lib/ruby/vendor_ruby/1.8/gtk2.rb:5
from /opt/local/lib/ruby/vendor_ruby/1.8/gtkglext.rb:1

what does rb-gnome do? It looked like it installed a bunch of files. Is
it not enough by itself? – obviously not, I can’t find anything with
pixbuf2 on my computer. How do I figure out what is missing and where
to get it for mac OX 10.4?

thanks for your help

Hi,

In [email protected]
“rb-gnome and gtkglext” on Mon, 24 Jul 2006 08:30:11 +0900,
“anne001” [email protected] wrote:

I ran the darwinports install instructions on rb-gnome
http://rb-gnome.darwinports.com/

What about the Darwin Ports:
http://www.cozmixng.org/repos/dports/trunk/

Thanks,

Thanks for the link. what is it I should install?
If I try to install gettext:

sudo port install gettext
—> Unpacking tgz archive for gettext 0.14.5_0
—> Installing gettext 0.14.5_0
Error: Target com.apple.install returned: Registry error: gettext
0.14.5_0 already registered as installed. Please uninstall it first.
Error: /private/opt/local/bin/port: Status 1 encountered during
processing.

I believe gettext is installed as part of gnome, but for some reason,
gdk-pixbuf-0.22.0 is not,
and I can’t install that one. Right now, it does not find glib, even
though glib.h or glib folder even though they are on /private/opt path
/private/opt/local/include/glib-2.0/glib
$PATH
-bash:
/private/opt/local/bin:/private/opt/local/lib:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin/:
No such file or directory

running
export DISPLAY=localhost:0.0
in xterm before running the program does not help. Any other ideas?

After two days of installs, gnome then gnome2, I don’t have gtk, and
gtk2 does not work. And that is with darwinport.
I sure need some pointers.

irb(main):001:0> require “gtk2”
RuntimeError: cannot open display: (null)
from /opt/local/lib/ruby/site_ruby/1.8/gtk2.rb:13:in `init’
from /opt/local/lib/ruby/site_ruby/1.8/gtk2.rb:13
from (irb):1

irb(main):002:0> require “gtk”
LoadError: no such file to load – gtk
from (irb):2:in `require’
from (irb):2

apparently, one of the problem was that what I needed was rb-gnome2
//sourceforge.net/project/showfiles.php?group_id=53614

I downloaded gnome2 all and gtk2 installed both. But I still got error
messages suggesting
problems with the installation, so I went into ruby-gtk2-0.15.0 and
hand installed gdkpixbuf, glib, gtk (and atk for good measure).

Now I get a new error,
/opt/local/lib/ruby/site_ruby/1.8/gtk2.rb:13:in `init’: cannot open
display: (null) (RuntimeError)
from /opt/local/lib/ruby/site_ruby/1.8/gtk2.rb:13
from /opt/local/lib/ruby/vendor_ruby/1.8/gtkglext.rb:1
from openglgtk.rb:2

http://www.ratiatum.com/forum/index.php?showtopic=22038&mode=linear
seem to suggest it might have to do with root privilege and opening an
X11 window
can’t do it as a user or some such. Can anyone explain what I need to
do?
the suggestions seem to work for linux and I am on tiger.

Hi,

Can you execute other X application such as xterm ?

If not, it’s not a problem of Ruby-GNOME2.
I recommand to find how to run X application on MacOS X first.

I suspect you don’t run X server or don’t set xhost,

I’ve not try it on MacOS X, though.

On Tue, 25 Jul 2006 09:15:11 +0900

On Jul 25, 2006, at 7:15 AM, anne001 wrote:

After two days of installs, gnome then gnome2, I don’t have gtk, and
gtk2 does not work. And that is with darwinport.
I sure need some pointers.

irb(main):001:0> require “gtk2”
RuntimeError: cannot open display: (null)
from /opt/local/lib/ruby/site_ruby/1.8/gtk2.rb:13:in `init’
from /opt/local/lib/ruby/site_ruby/1.8/gtk2.rb:13
from (irb):1

Are you running this in an xterm started from /Applications/Utilities/
X11.app?

– Daniel

I can run irb, then require “gtk2” in either terminal or xterm (X11)
I got the same answer.

Now I ran xhost localhost
irb(main):001:0> require “gtk2”
=> true
apparently your xhost suggestion was strong medicine, thank you

unfortunately, I am seeing one of the errors which I thought had gone
away:
require “gtkglext”
dyld: NSLinkModule() error
dyld: Symbol not found: _pango_x_font_cache_unload
Referenced from: /opt/local/lib/libgdkglext-x11-1.0.0.dylib
Expected in: flat namespace

something about pango. somebody else seems to have had a problem
http://www.cozmixng.org/~w3ml/index.rb/rabbit-shockers/msg/191
don’t know what it says.

I tried terminal and I tried X11 (xterm) and got the same error in
both. I made sure both
had the same $PATH

Hi,

In [email protected]
“Re: rb-gnome and gtkglext” on Wed, 26 Jul 2006 09:40:05 +0900,
“anne001” [email protected] wrote:

don’t know what it says.
The thread says that GtkGLExt doesn’t support GTK+ compiled
with --with-gdktarget=quartz.

Thanks,

case $gdktarget in x11|linux-fb|win32|quartz|directfb

ok, that means gtkglext cannot run on MacOSX, only linus and window?

Hi,

In [email protected]
“Re: rb-gnome and gtkglext” on Wed, 26 Jul 2006 21:00:10 +0900,
“anne001” [email protected] wrote:

By using --with-gdktarget argument, one can select running platform at
configuring and compiling of gtk lib. default for gdktarget is X11.

Yes.

–with-gl-includedir=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/GL
It seems that you shouldn’t add /GL to --with-gl-includedir.

Thanks,

Quartz is the one of the graphics services in Mac OS X, the others are
OpenGL and QuickTime.

By using --with-gdktarget argument, one can select running platform at
configuring and compiling of gtk lib. default for gdktarget is X11.

So the default of X11 should be ok for the mac. So I might still be
able to get gtkglext to run on my mac. I tried to reinstalling
gtkglext-1.2.0
checking GL/glx.h usability… no
checking GL/glx.h presence… no
checking for GL/glx.h… no
configure: error: Cannot find GLX header

that was telling it where the GL include is:
~/Desktop/gtkglext-1.2.0 anne$ ./configure
–with-gl-includedir=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/GL

oups, there is OpenGL but it is not a directory.
lrwxr-xr-x 1 root wheel 23 Nov 21 2005 OpenGL ->
Versions/Current/OpenGL
maybe it is a relative link
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL

there are some libraries related to the framework.
Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Libraries
anne$ ls
libGL.dylib libGLSystem.dylib
libGLImage.dylib libGLU.dylib
libGLProgrammability.dylib

I tried that because
./configure
gives me that error.

on the nehe site for mac OSX, they don’t use GL/gl.h but OpendGL/gl.h
#include <OpenGL/gl.h> // Header File For The OpenGL32 Library
#include <OpenGL/glu.h> // Header File For The GLu32 Library
#include <GLUT/glut.h> // Header File For The GLut Library
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=Mac_OS_X
so I wonder if my problem is because on I on the mac and I should be
calling OpenGL but
I don’t know how to pass that information to the configure program.

./configure
–with-gl-includedir=/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL/GL
gives me the same error.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs