Click here to get back home

Bogus error messages re Perl/lib/CORE/ includes

 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
Bogus error messages re Perl/lib/CORE/ includes Sisyphus 09-30-2005
Posted by Sisyphus on September 30, 2005, 9:36 pm
Please log in for more thread options


Hi,

Every now and then I get errors like the following when trying to compile a
perl extension (perl 5.8, Win32):

f:\perlvc7.8.7\lib\CORE\win32.h(312) : error C2143: syntax error : missing
')' before '*'
f:\perlvc7.8.7\lib\CORE\win32.h(312) : error C2081: 'Stat_t' : name in
formal parameter list illegal
f:\perlvc7.8.7\lib\CORE\win32.h(312) : error C2143: syntax error : missing
'{' before '*'
f:\perlvc7.8.7\lib\CORE\win32.h(312) : error C2059: syntax error : ')'
f:\perlvc7.8.7\lib\CORE\win32.h(411) : error C2143: syntax error : missing
')' before '*'
f:\perlvc7.8.7\lib\CORE\win32.h(411) : error C2143: syntax error : missing
'{' before '*'
.
..

and lots more similar (in relation to perlio.h and win32iop.h as well).

Now I know there's nothing wrong with those particular files because they
get included every time I build an extension - and mostly the extensions
build fine.

Can someone tell me how these bogus error messages arise, and how to deal
with them ?

I recall seeing a post somewhere suggesting it was caused by #including a
header file more than once - though I don't understand how that can lead to
syntax errors. In this particular instance tonight I've tried to ensure that
multiple inclusion does not occur - but to no avail. Perhaps I've failed to
avoid multiple inclusion .... or perhaps the problem is caused by something
altogether different ?

Any help appreciated.

Cheers,
Rob

--
To reply by email send to optusnet.com.au instead of nomail.afraid.org




Posted by Ilya Zakharevich on October 1, 2005, 8:45 am
Please log in for more thread options


[A complimentary Cc of this posting was sent to
Sisyphus

> f:\perlvc7.8.7\lib\CORE\win32.h(312) : error C2143: syntax error : missing
> ')' before '*'
> f:\perlvc7.8.7\lib\CORE\win32.h(312) : error C2081: 'Stat_t' : name in
> formal parameter list illegal
> f:\perlvc7.8.7\lib\CORE\win32.h(312) : error C2143: syntax error : missing
> '{' before '*'

Probably an include inserted before them redefined something. With
gcc, you would give

-dD -E

switches, and inspect the resulting listing. Other compilers should
have similar switches...

Hope this helps,
Ilya


Posted by Sisyphus on October 1, 2005, 9:30 pm
Please log in for more thread options


----- Original Message -----
Newsgroups: comp.lang.perl.modules
Sent: Saturday, October 01, 2005 6:45 PM
Subject: Re: Bogus error messages re Perl/lib/CORE/ includes


> [A complimentary Cc of this posting was sent to
> Sisyphus
>
> > f:\perlvc7.8.7\lib\CORE\win32.h(312) : error C2143: syntax error :
missing
> > ')' before '*'
> > f:\perlvc7.8.7\lib\CORE\win32.h(312) : error C2081: 'Stat_t' : name in
> > formal parameter list illegal
> > f:\perlvc7.8.7\lib\CORE\win32.h(312) : error C2143: syntax error :
missing
> > '{' before '*'
>
> Probably an include inserted before them redefined something.

Now *that* makes sense ..... so I've spent an hour or so trying to find out
what could have been re-defined, but failed to find anything. Then I noticed
in the output of nmake:

cl : Command line warning D4002 : ignoring unknown option '-g'

That was caused by the following in the (Writemakefile section of the)
Makefile.PL:

'CCFLAGS' => "$define_bool -g",

When I commented out that line in the Makefile.PL the problem disappeared.
Apparently, in this instance, it was the corruption of CCFLAGS that was
screwing things up.

Thanks, Ilya, for heading me in the right direction.

Cheers,
Rob




Similar ThreadsPosted
MSSQL::DBlib error messages November 14, 2005, 12:58 pm
hiding Win32::SerialPort->start( ... ) error messages April 19, 2005, 2:27 am
Using C::Scan : How to ignore #includes ? September 23, 2004, 7:54 pm
How to print just numbers includes in Subject using POP3Client Module. April 9, 2007, 9:18 pm
Composing MIME-compliant mail messages July 8, 2004, 4:08 pm
Net::SFTP / Net::SSH::W32Perl strange debug messages? August 13, 2006, 11:06 am
Annoying 'Variable ... will not stay shared' messages January 20, 2008, 5:32 am
Receiving Jabber messages with Net::Jabber October 8, 2004, 12:44 am
Error: RCPT TO: error (550 relay not permitted) February 11, 2006, 1:39 pm
GD.c: 533: error: syntax error before "void" March 24, 2006, 10:15 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap