[ruby-opengl-devel] Load Error on the initialization

guicho guicho2.71828 at gmail.com
Fri Jun 29 05:26:21 UTC 2012


Hi everyone.

I have a problem running a test script. Its just after the install.
Everytime I run the script the error code tells me like this:

/var/lib/gems/1.8/gems/ruby-opengl-0.60.1/lib/glut.so:
/var/lib/gems/1.8/gems/ruby-opengl-0.60.1/lib/glut.so: undefined symbol:
glutBitmap8By13 - /var/lib/gems/1.8/gems/ruby-opengl-0.60.1/lib/glut.so
(LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from /var/lib/gems/1.8/gems/ruby-opengl-0.60.1/lib/opengl.rb:25
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:59:in
`gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:59:in
`require'
from rubygl.rb:14

I tried some method to overcome this error but none of them worked.
I tried:

* re-install ruby-opengl (gem uninstall/install)
* tried 0.60.0 not 0.60.1 (gem "ruby-opengl", "0.60.0")
* sudo apt-get remove freeglut3 and compiled its latest version

I read the glut.h in /usr/local/include/GL/freeglut_std.h and found the
definition of glutBitmap8By13
I guess the author of the freeglut is using some tricky technique.

/*
* GLUT API macro definitions -- fonts definitions
*
* Steve Baker suggested to make it binary compatible with GLUT:
*/
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) ||
defined(__WATCOMC__)
# define GLUT_STROKE_ROMAN ((void *)0x0000)
# define GLUT_STROKE_MONO_ROMAN ((void *)0x0001)
# define GLUT_BITMAP_9_BY_15 ((void *)0x0002)
# define GLUT_BITMAP_8_BY_13 ((void *)0x0003)
# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *)0x0004)
# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *)0x0005)
# define GLUT_BITMAP_HELVETICA_10 ((void *)0x0006)
# define GLUT_BITMAP_HELVETICA_12 ((void *)0x0007)
# define GLUT_BITMAP_HELVETICA_18 ((void *)0x0008)
#else
/*
* I don't really know if it's a good idea... But here it goes:
*/
extern void* glutStrokeRoman;
extern void* glutStrokeMonoRoman;
extern void* glutBitmap9By15;
extern void* glutBitmap8By13; // << here
extern void* glutBitmapTimesRoman10;
extern void* glutBitmapTimesRoman24;
extern void* glutBitmapHelvetica10;
extern void* glutBitmapHelvetica12;
extern void* glutBitmapHelvetica18;

/*
* Those pointers will be used by following definitions:
*/
# define GLUT_STROKE_ROMAN ((void *) &glutStrokeRoman)
# define GLUT_STROKE_MONO_ROMAN ((void *) &glutStrokeMonoRoman)
# define GLUT_BITMAP_9_BY_15 ((void *) &glutBitmap9By15)
# define GLUT_BITMAP_8_BY_13 ((void *) &glutBitmap8By13)
# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *) &glutBitmapTimesRoman10)
# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *) &glutBitmapTimesRoman24)
# define GLUT_BITMAP_HELVETICA_10 ((void *) &glutBitmapHelvetica10)
# define GLUT_BITMAP_HELVETICA_12 ((void *) &glutBitmapHelvetica12)
# define GLUT_BITMAP_HELVETICA_18 ((void *) &glutBitmapHelvetica18)
#endif



GCC version is Ubuntu/Linaro 4.6.3-1ubuntu5
DELL Vostro 1510 laptop, Intel C2D T8100.
I appended a test script I ran.
However, `rmake test` on the ruby-opengl also ended up putting the same
error.


__

Masataro Asai
Univ. Tokyo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rubygl.rb
Type: application/x-ruby
Size: 2886 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/ruby-opengl-devel/attachments/20120629/f73a5d46/attachment.bin>


More information about the ruby-opengl-devel mailing list