Click here to get back home

-Wdeclaration-after-statement

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
-Wdeclaration-after-statement Peter Billam 03-16-2006
Posted by Peter Billam on March 16, 2006, 9:13 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

--
AUS/TAS/DPIWE/CIT/Servers hbt/lnd/l8 6233 3061 http://www.pjb.com.au
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

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



Posted by Peter Billam on March 17, 2006, 12:06 am
Please log in for more thread options


>
>> sybil:/usr/local/src/Term-Size-0.2# perl Makefile.PL
>> ...
>> 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
>
> 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 ?

Yes, it does; I've just tried to install Math::WalshTransform and
get the same 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 ?

There is something strange here: gcc -v says version 3.3.6
but aptitude thinks gcc 4.4.0 was installed :-(
Looks like a debian quirk. I'll try to upgrade everything...

Aha. After upgrading the kernel you have to re-enter aptitude and
update all the other packages which are now supported by the new kernel,
by pressing u and then U. So sorry, it was a debian thing.

Thanks for your help...

>> 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.
>
Yes, great ! My other favourite is Womankind, but we won't quarrel
about little things like that. And then there's the 2nd album...

> Are you an ageing diehard hippie, too ?
Maturing, perhaps - yes, maturing. I was studying Theoretical
Physics at Imperial College London 1966-1969...

Regards, Peter

--
AUS/TAS/DPIWE/CIT/Servers hbt/lnd/l8 6233 3061 http://www.pjb.com.au
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

Posted by Sisyphus on March 16, 2006, 11:58 pm
Please log in for more thread options



.
.
> Maturing, perhaps - yes, maturing. I was studying Theoretical
> Physics at Imperial College London 1966-1969...
>

Geez ... I wish *I* had been in London during that period. Dunno - maybe it
wasn't that great - all I do know is that you don't hear people saying "Geez
... I wish *I* had been in Deniliquin during the mid to late 60's " (which
is where I was :-)

Cheers,
Rob



Posted by Ron Savage on March 17, 2006, 6:43 pm
Please log in for more thread options


On Fri, 17 Mar 2006 15:58:37 +1100, Sisyphus wrote:

Hi Rob

> Geez ... I wish *I* had been in London during that period. Dunno -
> maybe it wasn't that great - all I do know is that you don't hear
> people saying "Geez .... I wish *I* had been in Deniliquin during
> the mid to late 60's " (which is where I was :-)

Double geez. I was in Mooroopna and even Deniliquin sounded like The Big=
Smoke!





Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap