Re: Invalid use of 'static' in linkage specification
[email protected] (Alberto Simões)
| Newsgroups | perl.xs |
|---|---|
| Organization | Departamento de Informática - Universi dade do Minho |
| Message-ID | <[email protected]> |
On 1/2/12 19:12 , muppet wrote: > > On Jan 2, 2012, at 8:54 AM, Alberto Simões wrote: > >> Hello >> >> Although most architectures are compiling my module correctly, I am getting some complains for some random linuxes: >> >> http://www.cpantesters.org/cpan/report/294f5cfc-3507-11e1-9d6f-f6dbfa7543f5 >> >> http://www.cpantesters.org/cpan/report/c9dafc5a-34fb-11e1-9d6f-f6dbfa7543f5 >> >> http://www.cpantesters.org/cpan/report/1afb75b2-34c3-11e1-9bca-f0349aeef8c6 >> >> They complain about the use of 'static' on the file generated by ExtUtils::ParseXS. But my .xs file doesn't have any 'static' on it, so it is referring to some code generated automatically. >> >> Any hint on what it might be? > > It's hard to say without seeing the generated code. The error message: > > cc -Icld-src -I/home/cpan/pit/bare/perl-5.15.2/lib/5.15.2/x86_64-linux/CORE -fPIC -fPIC -I. -O2 -DCLD_WINDOWS -c -x c++ -O2 -o CLD.o CLD.cc > CLD.cc:178: error: invalid use of 'static' in linkage specification > CLD.cc:179: error: invalid use of 'static' in linkage specification > error building CLD.o from 'CLD.cc' at /home/cpan/pit/bare/perl-5.15.2/lib/5.15.2/ExtUtils/CBuilder/Base.pm line 177. > > shows that the XS code is being turned into C++ code rather than C code. > > It may be that one of the xsubpp macros that expects to expand into a C function is expanding in C++ class scope. I think this is a ExtUtils::XSParser problem. debugging it right now :)