On Fri, Oct 23, 2009 at 12:53:05PM -0400, Chris Marshall wrote:
> This indicates that the OpenGL build did not find the correct FreeGLUT
> combination.  Since runtime error was from FreeGLUT, my guess is that
> you have both glut.h and freeglut.h on your system.

I looked a bit closer now at the problem. The problem is: opengl's
Makefile.PL doesn't look at all for the header files, but for the library
itself.
the debian packaged freeglut is actually called libglut.so, so any check not
looking for the header does not work in these cases. actually, the
Makefile.PL contains already a header check in case glx contained in
libgl.so. The attached patch for the freeglut detection is based on that.

> For what its worth, TriD uses the glutMainLoopEvent() to pump the GUI
> events.  GLUT does not have that function which is why nothing is
> being pumped and no mouse/resize response.

thanks for the hint; my patch for Makefile.PL checks now for this symbol in
the header.


> The good news: this is a known problem with OpenGL configuration but
> it will not be fixed before PDL-2.4.5 is released.  It was all I could
> do to get the HAVE_FREEGLUT_H ifdef in the code...

most probably, the problem is solved by the patch. hope I don't break
anything on platforms I don't have access to.

-- 
c u
henning
Index: libopengl-perl-0.60+dfsg/Makefile.PL
===================================================================
--- libopengl-perl-0.60+dfsg.orig/Makefile.PL   2009-10-24 16:26:09.225969098 
+0000
+++ libopengl-perl-0.60+dfsg/Makefile.PL        2009-10-24 16:26:21.414415675 
+0000
@@ -476,6 +476,20 @@
     print "GLX not found (neither library, nor headers).";
   }
 
+  # Test for obfuscated Freeglut
+  # quite often Freeglut is in -lglut...  Test for GL/freeglut.h instead...
+  my $out = cfile_text('GL/freeglut.h');
+
+  # The cpp would not let this macro through. Check for something else
+  # that still exists after the cpp pass. a typedef, or type would work
+  my $has_freeglut = ($out =~ m|glutMainLoopEvent|);
+
+  if ($has_freeglut)
+  {
+    #delete($found_libs->{GLX});
+    $DEFS .= " -DHAVE_FREEGLUT";
+    $found_libs->{FREEGLUT}="glut";
+  }
 
   # Marshall libs
   my $libs = ' -l'.join(' -l',values(%$found_libs));
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to