chromatic <[EMAIL PROTECTED]> wrote:
:On Thu, 2004-07-15 at 09:33, [EMAIL PROTECTED] wrote:
:
:> 1. because the library is installed to a nonstandard place, none of
:> the autodetect paths mentioned in SDL::Build::Linux->fetch_includes
:> matched, so $links->{$subsystem}{libs} was undefined for several
:> subsystems giving the previously reported problem "can't use undefined
:> value as an ARRAY reference" in SDL::Build->set_flags.
:
:Makes sense.  I've added guards against this now, so it should at least
:warn.  If you run the installer with:
:
:       perl Build.PL --with-sdl=/opt/libSDL-1.2.7
:
:it should try a better autodetection scheme.  The heuristic isn't great,
:but it's a passable idea.

It appears to use the /--with-(\w+)/ to determine the subdirectory in
which to find the include files, so I think this needs to be '--with-SDL'
rather than '--with-sdl'. (But see also the next problem below.)

:
:> 2. on my system, `sdl-config --cflags` returns two arguments:
:>   -I/opt/libSDL-1.2.7/include/SDL -D_REENTRANT
:> Now, because the extra_compiler_flags are constructed as:
:>   extra_compiler_flags => 
:>   [
:>     @{ $includes->{$subsystem} },
:>     $sdl_compile,
:>     @{ $defines->{$subsystem} },
:>     ( defined $Config{usethreads} ? ('-DUSE_THREADS', '-fPIC') : '-fPIC' ),
:>   ],
:> .. Module::Build sees a list, so doesn't split the individual arguments,
:> and eventually "-I/opt/libSDL-1.2.7/include/SDL -D_REENTRANT" gets passed
:> to gcc as a single argument, and the wrong things happen.
:
:I'd rather join them and let M::B figure out the right thing.  It's a
:good catch though.

That fix seems to have worked.

Continuing from there, the next problem occurs during the build:
  OpenGL.xs:13:21: SDL/SDL.h: No such file or directory

That could be fixed either by telling OpenGL.xs to '#include "SDL.h"'
(which I believe is the recommended approach) or by letting --with-SDL
add both $path/include/SDL and $path/include. I guess doing both is
probably a good idea.

Continuing from there, it fails trying to build OpenGL.xs with lots of
  OpenGL.c:3876: `GLUtesselator' undeclared (first use in this function)
errors. This took me a while to track down, but it turns out that GL/glu.h
defines GLUtesselator only if version is 1.2, and this is version 1.1.
(This file actually derives from the Mesa-devel-3.4-13 rpm, which I'm
guessing is part of my original RedHat 7.3 installation.) I'm not sure
why I didn't have this problem the previous time around - maybe the config
changes mean it's trying to build this where it didn't before?

I'm not sure how to get beyond that, clues welcome.

Hugo

Reply via email to