Chris Marshall wrote:
> Derek Lamb writes:
>
>> Chris,
>>
>> I can't get this to build on my 64-bit Scientific
>> Linux (i.e., CentOS, i.e., RHEL5) box. I
>> installed Freeglut 2.6.0rc1 to ~/local. At first,
>> utils/glversion would not build, but did once
>> I prepended "-I/home/dlamb/local/include" to
>> the utils/Makefile's INC line, and prepended
>> "-L/home/dlamb/local/lib -L/usr/lib64" to the LIB
>> line.
>>
>
> Good.
>
>
>> In order to be sure that the correct GL library is
>> being linked in (since I also have Mesa on this
>> computer in /usr/lib/ or similar), I changed the
>> top-level Makefile.PL so that line 117 starts the
>> chunk:
>>
>> @our libdirs = qw { -L/home/dlamb/local/lib
>> @}; @our check_libs = qw { -lglut }; and
>> @line 454 starts: my includes = qw {
>> @-I/home/dlamb/local/include };
>>
>
> Oops, I think you should have prepended here rather
> than replace the entire set of directories. As is,
> unless all of the required libraries and include
> files are in ~/local, you'll be missing a lot: i.e.
> libGL, libGLU, ...
>
ok. I was confused about the relations between GL, GLU, GLUT, FreeGLUT,
etc... I thought they were all different implementations of the same
libraries, but apparently that's not the case.
>
>> Running $ perl Makefile.PL INSTALL_BASE=~/local
>> verbose produces the output in the attached
>> makefile.pl.out, which seems to be OK. Running
>> make produces the output in make.out.0, which
>> complains about GLUT_INIT_STATE in glut_const.h.
>> Commenting out that one line and making again lets
>> it get passed, but then it gets stuck on an error
>> in pogl_glu.c (in attached make.out.1.
>>
>
> Do you have freeglut_std.h in your include directories?
>
yes, it is in ~/local/include/GL/. Though I noticed that
GLUT_INIT_STATE was in freeglut_ext.h, not freeglut_std.h. I also found
the following interesting relationship among the header files in that
directory:
$ grep '#include' ~/local/include/GL/*
/home/dlamb/local/include/GL/freeglut.h:#include "freeglut_std.h"
/home/dlamb/local/include/GL/freeglut.h:#include "freeglut_ext.h"
/home/dlamb/local/include/GL/freeglut_std.h:#include <GL/gl.h>
/home/dlamb/local/include/GL/freeglut_std.h:#include <GL/glu.h>
/home/dlamb/local/include/GL/glut.h:#include "freeglut_std.h"
freeglut.h #includes _std & _ext, but glut.h only #includes
freeglut_std.h. So I changed line 4 of glut_util.h to
#include <GL/freeglut.h>
and that got rid of the GLUT_INIT_STATE warning, and allowed make to
complete seemingly without errors.
$ make test
fails with
t/00_require....1/1
# Failed test 'require OpenGL;'
# at t/00_require.t line 3.
# Tried to require 'OpenGL'.
# Error: Can't load
'/home/dlamb/.cpan/build/OpenGL-0.59-DAL/blib/arch/auto/OpenGL/OpenGL.so'
for module OpenGL:
/home/dlamb/.cpan/build/OpenGL-0.59-DAL/blib/arch/auto/OpenGL/OpenGL.so:
undefined symbol: glClampColorARB at
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.
and similarly for the 01_use test. Though when I run "$perl -Mblib
test.pl" I get a rotating cube with teapots that responds to the arrow
and 's' keys, at least (I don't remember the other commands from last
time). Lots of errors about "freeglut (test.pl): font 0xce281ec0 not
found"--I think I remember seeing something about that on the list before.
Derek
>
>> I could keep commenting things out, but I feel
>> like there's a deeper problem. Any advice?
>>
>
> You're actually pretty close. I think if you double
> check that the needed freeglut include files are
> found (so GLUT_INIT_STATE will be too) and re-add
> the rest of the system directories to the library
> and include searches in Makefile.PL, you'll get a
> lot farther.
>
> If anything comes up w.r.t. 64-bit linux libraries,
> please let me/us know so that I can fix. Thanks!
>
> --Chris
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl