|
Posted by Sisyphus on March 16, 2006, 9:40 pm
Please log in for more thread options
> Greetings. First time this has happened to me; I was installing
> Term-Size-0.2 on a new debian, and "perl Makefile.PL" seems to have
> generated a bad Makefile...
>
> sybil:/usr/local/src/Term-Size-0.2# perl Makefile.PL
> Checking if your kit is complete...
> Looks good
> Writing Makefile for Term::Size
> sybil:/usr/local/src/Term-Size-0.2# make
> cp Size.pm blib/lib/Term/Size.pm
> AutoSplitting blib/lib/Term/Size.pm (blib/lib/auto/Term/Size)
> /usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap
> /usr/share/perl/5.8/ExtUtils/typemap Size.xs > Size.xsc
> && mv Size.xsc Size.c
> cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -O2 -DVERSION=\"0.2\" -DXS_VERSION=\"0.2\"
> -fPIC "-I/usr/lib/perl/5.8/CORE" Size.c
> cc1: error: unrecognized option `-Wdeclaration-after-statement'
> make: *** [Size.o] Error 1
>
> Who's problem is this ? Regards, Peter
>
Looks like it's something being picked up by ExtUtils::MakeMaker. (Afaict,
there's nothing in the module source that's causing this - so the module
author is off the hook.) How come this problem doesn't raise its head
*every* time you attempt to build a perl extension ? That switch should be
included every time you build an extension (ie perl module whose source
includes an .xs file) and should produce the same fatal error.
Could it be that there's some sort of compiler mismatch between the compiler
you're using and the compiler that was used to build your perl ? (The best
solution would be to build perl with the compiler you have, and use *that*
perl, rather than the perl that was apparently built with a different
compiler.)
Anyway, you could try to remove the flag. It will be in one of the %Config
keys. Find out which key, and then overwrite it in the Makefile.PL. (You can
overwrite the values of %Config keys by using ExtUtils::FakeConfig, or by
using the technique that EU::FF uses, in a BEGIN{} block *before* loading
EU::MM.)
Alternatively if you can you find a match for 'declaration-after-statement'
anywhere in Config.pm, just remove the "declaration-after-statement" bit
from Config.pm and try building again. (Start by running 'make clean' to
make sure you get rid of all the existing stuff that has been built.)
Or, if it's something that's hard-coded in the generated makefile, you could
just run 'perl Makfile.PL', then manually amend the makefile so that the
offending term is not there, and *then* run 'make test', etc.
There could be other errors waiting to bite you as well .... just try it and
see how you go.
> I met a man whose name was Time; he said "I must be going..."
> But just how long ago that was I have no way of knowing.
> - October Song, 1st LP, Incredible String Band
Hey .... I've still got that album (Smoke Shovelling Song is my favourite)
.... and all their others. Are you an ageing diehard hippie, too ?
Cheers,
Rob
|