Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 35892
Status: resolved
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: SHERLOCK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 6.44
Fixed in: (no value)



Subject: -Wdeclaration-after-statement warnings
When doing make on the GO::TermFinder distribution, which includes some swig generated files, I get the following warning a few times: cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++ This is on: uname -a Darwin 9.2.2 Darwin Kernel Version 9.2.2: Tue Mar 4 21:17:34 PST 2008; root:xnu- 1228.4.31~1/RELEASE_I386 i386 perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=darwin, osvers=9.0, archname=darwin-thread-multi-2level uname='darwin b09.local 9.0 darwin kernel version 9.0.0: mon dec 3 11:44:11 pst 2007; root:xnu-1228.0.1~4release_ppc power macintosh ' config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags=-Dman3ext=3pm - Duseithreads -Duseshrplib' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no- cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include', optimize='-O3', cppflags='-no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN -no-cpp- precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include' ccversion='', gccversion='4.0.1 (Apple Inc. build 5465)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc -mmacosx-version-min=10.5', ldflags ='-arch i386 -arch ppc -L/usr/local/lib' libpth=/usr/local/lib /usr/lib libs=-ldbm -ldl -lm -lutil -lc perllibs=-ldl -lm -lutil -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-arch i386 -arch ppc -bundle -undefined dynamic_lookup - L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Locally applied patches: fix for regcomp CVE-2007-5116 security vulnerability Built under darwin Compiled at Dec 7 2007 09:37:29 %ENV: PERL5LIB="/sw/lib/perl5:/sw/lib/perl5/darwin" @INC: /sw/lib/perl5/5.8.8/darwin-thread-multi-2level /sw/lib/perl5/5.8.8 /sw/lib/perl5/darwin-thread-multi-2level /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1 . gcc -v Using built-in specs. Target: i686-apple-darwin9 Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable- werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ -- program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include- dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with- arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple- darwin9 Thread model: posix gcc version 4.0.1 (Apple Inc. build 5465) using ExtUtils::MakeMaker 6.44, and swig 1.3.35 to generate the swig wrappers
Subject: Re: [rt.cpan.org #35892] -Wdeclaration-after-statement warnings
Date: Sun, 18 May 2008 19:24:43 +0900
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
SHERLOCK via RT wrote: Show quoted text
> When doing make on the GO::TermFinder distribution, which includes some swig generated > files, I get the following warning a few times: > > cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC > but not for C++
The string "-Wdeclaration-after-statement" doesn't appear anywhere in the MakeMaker distribution. I'd suspect that it's a Swig thing, or perhaps something in your Config.pm? -- But there's no sense crying over every mistake. You just keep on trying till you run out of cake. -- Jonathan Coulton, "Still Alive"
Subject: Re: [rt.cpan.org #35892] -Wdeclaration-after-statement warnings
Date: Sun, 18 May 2008 17:24:09 -0700
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Gavin Sherlock <sherlock [...] genome.stanford.edu>
I'm stumped. It doesn't appear in the GO::TermFinder distribution either, until after doing a perl Makefile.PL, at which point it appears in the generated Makefiles: pliny 1006 % pwd /Users/sherlock/dev/GO-TermFinder pliny 1007 % find . | xargs grep Wdeclaration pliny 1008 % perl Makefile.PL Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lstdc++ Writing Makefile for GO::TermFinder::Native Writing Makefile for GO-TermFinder pliny 1009 % find . | xargs grep Wdeclaration ./Makefile:CCFLAGS = -arch i386 -arch ppc -g -pipe -fno-common - DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after- statement -I/usr/local/include ./native/Makefile:CCFLAGS = -arch i386 -arch ppc -g -pipe -fno-common - DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after- statement -I/usr/local/include presumably WriteMakefile is invoking something on my system that is putting -Wdeclaration-after-statement into the Makefiles, but I'm thus far unable to track it down. A spotlight search of my hard disk for Wdeclaration is uninformative, so I suspect the string is not present in that form. Cheers, Gavin On May 18, 2008, at 3:25 AM, Michael G Schwern via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=35892 > > > SHERLOCK via RT wrote:
>> When doing make on the GO::TermFinder distribution, which includes >> some swig generated >> files, I get the following warning a few times: >> >> cc1plus: warning: command line option "-Wdeclaration-after- >> statement" is valid for C/ObjC >> but not for C++
> > The string "-Wdeclaration-after-statement" doesn't appear anywhere > in the > MakeMaker distribution. I'd suspect that it's a Swig thing, or > perhaps > something in your Config.pm? > > > -- > But there's no sense crying over every mistake. > You just keep on trying till you run out of cake. > -- Jonathan Coulton, "Still Alive"
On Sun May 18 20:24:29 2008, sherlock@genome.stanford.edu wrote: Show quoted text
> pliny 1009 % find . | xargs grep Wdeclaration > ./Makefile:CCFLAGS = -arch i386 -arch ppc -g -pipe -fno-common - > DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after- > statement -I/usr/local/include
Sorry for taking so long to get back. I suspect its coming from your perl Configuration. Try running this program: perl -MConfig -wle 'print $Config{ccflags}' If it's the same as the CCFLAGS above then your Perl is misconfigured in some way. Its outside the realm of MakeMaker. Let me know.
You're right -it must be how the Perl installation is configured on my Mac (which I think is the installation that Apple supplied): Show quoted text
> perl -MConfig -wle 'print $Config{ccflags}'
-arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno- strict-aliasing -Wdeclaration-after-statement -I/usr/local/include Thanks for resolving it.
On Fri Apr 10 19:11:54 2009, SHERLOCK wrote: Show quoted text
> You're right -it must be how the Perl installation is configured on my > Mac (which I think is the > installation that Apple supplied): >
> > perl -MConfig -wle 'print $Config{ccflags}'
> -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN > -no-cpp-precomp -fno- > strict-aliasing -Wdeclaration-after-statement -I/usr/local/include > > Thanks for resolving it.
That's the config for the default Apple Perl. I can replicate your problem: g++ -c -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include -O3 -DVERSION=\"\" -DXS_VERSION=\"\" "-I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE" Distributions.cxx cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++ cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++ There's not a whole lot that can be done about it, except maybe removing it from your Config.pm or compiling your own Perl. It's just a warning flag. Perl has no separate flags for C++ and MakeMaker support for it has always been a bit shaky. I'll close this ticket up.