-Wdeclaration-after-statement
-Wdeclaration-after-statement
am 17.03.2006 03:13:07 von Peter Billam
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
Re: -Wdeclaration-after-statement
am 17.03.2006 03:40:52 von Sisyphus
"Peter Billam" wrote in message
news:slrne1k393.2gp.peter@pjb.dpiwe.tas.gov.au...
> 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
Re: -Wdeclaration-after-statement
am 17.03.2006 03:45:04 von 1usa
Peter Billam wrote in
news:slrne1k393.2gp.peter@pjb.dpiwe.tas.gov.au:
> 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
From gcc docs:
`-Wdeclaration-after-statement (C only)'
Warn when a declaration is found after a statement in a block.
This construct, known from C++, was introduced with ISO C99 and is
by default allowed in GCC. It is not supported by ISO C90 and was
not supported by GCC versions before GCC 3.0. *Note Mixed
Declarations::.
It looks like your version of gcc is old (assuming cc is a symlink to
gcc)
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines .html
Re: -Wdeclaration-after-statement
am 17.03.2006 05:58:37 von Sisyphus
"Peter Billam" wrote in message
..
..
> 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
Re: -Wdeclaration-after-statement
am 17.03.2006 06:06:36 von Peter Billam
In <441a226c$0$7604$afc38c87@news.optusnet.com.au>, Sisyphus wrote:
>
> "Peter Billam" wrote in message
> news:slrne1k393.2gp.peter@pjb.dpiwe.tas.gov.au...
>> 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
Re: -Wdeclaration-after-statement
am 17.03.2006 07:53:23 von tassilo.von.parseval
Also sprach Peter Billam:
> 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
I had the very same problem a couple of days ago when during some
package-installation perl was upgraded to 5.8.8. I am also using Debian.
The solution here was to additionally upgrade gcc and g++. I think your
Debian is still using some gcc3 as default compiler. After upgrading
mine, gcc4 became the default and the above problem went away.
Tassilo
--
use bigint;
$n=714233503437702801613970263303373711390544118542200534375 65440;
$m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+=8)<=200);
Re: -Wdeclaration-after-statement
am 18.03.2006 00:43:00 von Ron Savage
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!
Re: -Wdeclaration-after-statement
am 18.03.2006 01:48:53 von Sisyphus
"Ron Savage" wrote in message
news:200631810430.703496@ron...
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!
--------------------------------
Small world, Ron .... I married a Mooroopna girl (born and raised in
Mooroopna). Her parents still live there - in the same house in Fairway
Drive.
Cheers,
Rob