[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

still compiling opengl on OSX

altern

6/2/2005 3:48:00 PM

hi

i am still trying to compile opengl on OSX 10.3.9

My last attempt was with rbogl-0.32f.tar.gz
as before i was getting an error as it couldnt find glu.h
I created a folder called 'glu' and included there glu.h, glut.h and glext.h
then the installation was ok but now i get this error

irb(main):001:0> require "opengl"
dyld: ruby Undefined symbols:
_gluBeginCurve
_gluBeginPolygon
_gluBeginSurface
_gluBeginTrim
_gluBuild2DMipmaps
_gluCylinder
_gluDeleteNurbsRenderer
_gluDeleteQuadric
_gluDeleteTess
_gluDisk
_gluEndCurve
_gluEndPolygon
_gluEndSurface
_gluEndTrim
_gluErrorString
_gluGetNurbsProperty
_gluGetString
_gluGetTessProperty
_gluLookAt
_gluNewNurbsRenderer
_gluNewQuadric
_gluNewTess
_gluNextContour
_gluNurbsCurve
_gluNurbsProperty
_gluNurbsSurface
_gluOrtho2D
_gluPartialDisk
_gluPerspective
_gluPickMatrix
_gluProject
_gluPwlCurve
_gluQuadricDrawStyle
_gluQuadricNormals
_gluQuadricOrientation
_gluQuadricTexture
_gluScaleImage
_gluSphere
_gluTessBeginContour
_gluTessBeginPolygon
_gluTessCallback
_gluTessEndContour
_gluTessEndPolygon
_gluTessNormal
_gluTessProperty
_gluTessVertex
_gluUnProject
Trace/BPT trap
#################

I tried several timer with the opengl-0.32f.tar.gz unsuccesfully,
getting always the same error

in line 35 of extconf.rb
$CFLAGS += " -I. -I/System/Library/Frameworks/OpenGL.framework/Headers
it doesnt like the +=
this was the error

Ordenador-de-r2d2:/Volumes/data/software/ruby/opengl-0.32f r2d2$ ruby
extconf.rb
extconf.rb:36: undefined method `+' for nil (NameError)

I find this point weird as far as i understand (just two weeks doing
ruby) if i do
$Whatever += 'anything'
without a previous decalration of $Whatever = ""
would give me an error. Then i assume that the extconf.rb script is
wrong, it should either be = or $CFLAGS should have some string value
before it gets to the +=
So I modified the script to be = instead of += like in the other
platforms lines above and
the extconf.rb script goers ok, then i do make and again is ok. I do
sudo make install and again there is no problem so far.

again i try to require 'opengl' getting same error i especify on the top
of the mail:

dyld: ruby Undefined symbols:
blah blah ..
etc...

Now i am trying to uninstall the version i have installed but 'make
uninstall' doesnt work. any hints about how to uninstall it? I am not
very good at unix compiling and stuff like this as you can see :)

It would be very helpful i think, if some OSX opengl ruby user could
describe the process of compiling it or point to some link where this is
described.

thanks

--
enrike


1 Answer

Michal Suchanek

6/3/2005 1:56:00 PM

0

On Fri, Jun 03, 2005 at 12:47:32AM +0900, altern wrote:
> So I modified the script to be = instead of += like in the other
> platforms lines above and
> the extconf.rb script goers ok, then i do make and again is ok. I do
> sudo make install and again there is no problem so far.
>
> again i try to require 'opengl' getting same error i especify on the top
> of the mail:
>
> dyld: ruby Undefined symbols:
> blah blah ..
> etc...

You got into problems because ruby extensions are compiled with
-undefined suppress. This happily builds and installs broken extensions
(ones with undefined symbols).

I have no idea why it is so. I modified the configure script of the ruby
I built to remove this flag. It works well for me and refuses to link
extensions with undefined symbols, forcing me to fix them before
installation.

>
> Now i am trying to uninstall the version i have installed but 'make
> uninstall' doesnt work. any hints about how to uninstall it? I am not
> very good at unix compiling and stuff like this as you can see :)

Removing the broken bundle should be sufficient. You could try to
install again to see which files are installed and remove them manually.

>
> It would be very helpful i think, if some OSX opengl ruby user could
> describe the process of compiling it or point to some link where this is
> described.

Thanks

Michal Suchanek