This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: GCC Error: /usr/local/include/filename.H


> > What can I do to fix this? 
> Read http://gcc.gnu.org/ml/gcc/2000-06/msg00712.html

Sorry about not being specific enough.

I am do not know what is causing the error, mainly because it happens with
several different applications including the compiler itself, perl 5.6, and
mod-perl 1.25 for Apache. There are probably others too. Here's the entire
message exactly taken from one of the applications (Authen-Smb-0.91, [Samba
to NT PDC Authentication for Apache]):

#make
make[1]: Entering directory '/Software/WebSite/Authen-Smb-0.91/smbval'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/Software/WebSite/Authen-Smb-0.91/smbval'
cc -c -Dbool=char -DHAS_BOOL -I/usr/local/include -g -DVERSION=\"0.91\"
-DXS_VERSION=\"0.91\" -fpic -I/usr/lib/perl5/5.00503/i386-linux/CORE Smb.c
In file included from /usr/local/include/dirent.h:27:
                 from  /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h:660,
                 from Smb.xs:5:
/usr/local/include/filename.H:74: warning: 'struct dirent' declared inside
parameter list
/usr/local/include/filename.H:74: warning: its scope is only this definition
or declaration,
/usr/local/include/filename.H:74: warning: which is probably not what you
want.
In file included from /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h:1269
                 from Smb.xs:5:
/usr/lib/perl5/5.00503/i386-linux/CORE/sv.h:299: parse error before 'DIR'
/usr/lib/perl5/5.00503/i386-linux/CORE/sv.h:299: warning: no semicolon at
end of struct or union
/usr/lib/perl5/5.00503/i386-linux/CORE/sv.h:313: parse error before '}'
make: *** [Smb.o] Error 1

I have checked the code and the dirent struct in the a trinary pointer, and
at line 299 of sv.h there is a semi-colon.

In everycase I get the errors associated with filename.H. The error after it
differs. For example, the error after it for mod_perl-1.24 is:

In file included from ../include/httpd.h:72,
                 from ap_cpystrn.c:58:
../include/alloc.h:357: parse error before '*'
../include/alloc.h:357: warning: data definition has no type or storage
class
../include/alloc.h:358: parse error before 'DIR'

For Perl 5.6 the error is...

In file included from perl.h:1826,
                 from miniperlmain.c:12:
sv.h:356: parse error before 'DIR'
sv.h:356: warning: no semicolon at end of struct or union
sv.h:370: parse error before '}'

For GCC 2.95.2...

./parse.y: In function 'read_import_dir':
./parse.y:5061: 'DIR' undeclared (first use in this function)
./parse.y:5061: (Each undeclared identifier is reported only once
./parse.y:5061: for each function it appears in.)
./parse.y:5061: 'dirp' undeclared (first use in this function)
./parse.y:5062: parse error before '*'
./parse.y:5074: 'filename' undeclared (first use in this function)
./parse.y:5077: 'entry' undeclared (first use in this function)
./parse.y:5094: 'k' undeclared (first use in this function)
./parse.y:5110: 'found' undeclared (first use in this function)
./parse.y:5136: warning: initialization makes pointer from integer without a
cast
./parse.y:5139: dereferencing pointer to incomplete type
./parse.y:5140: dereferencing pointer to incomplete type
./parse.y:5171: 'saved_jcf' undeclared (first use in this function)
make[2]: *** [parse.o] Error 1
make[2]: Leaving directory '/Software/GCC/gcc-2.95.2/gcc/java'

As you can see, the error is not necessarily related to one of the
applications. All of the application were downloaded in a tarball,
decompressed, configured, and compiled as required but will not produce the
executable because of the errors. If it were only one application then I
would check that apps code, but it isn't.

BTW, the name of filename.H is correct with a capitalized H at the end.

At first I figured it was probably a bug with perl5 as installed, so I
downloaded perl 5.6 and tried to compile it, but it failed. So I figured I
must have an outdated compiler and/or a problem with the compiler, so I
downloaded the full install of GCC 2.95.2 (the lastest stable that I am
aware of), and attempted to compile it but it gave errors.

Help would be greatly appreciated. From the sounds of it, now that you have
more information, does it sound like a bug with the compiler (egcs version
2.91.66)? FYI, the compiler was the default install for GCC of RedHat 6.2.

Thanks,

Benjamen R. Meyer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]