[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Constant subroutine __USE_POSIX undefined (problem with p2ph?)



On Nov 14, Florian Hinzmann wrote:
> I do get lines like this when running a perl script:
> 
> > Constant subroutine __USE_POSIX undefined at /usr/lib/perl/5.8.0/features.ph line 6.
> > Constant subroutine __USE_POSIX2 undefined at /usr/lib/perl/5.8.0/features.ph line 7.
> > Constant subroutine __USE_POSIX199309 undefined at /usr/lib/perl/5.8.0/features.ph line 8.
> > Constant subroutine __USE_POSIX199506 undefined at /usr/lib/perl/5.8.0/features.ph line 9.
> > Constant subroutine __USE_XOPEN undefined at /usr/lib/perl/5.8.0/features.ph line 10.
> 
> 
> I am currently trying to find out what exactly triggers this and 
> how to reproduce it easily. I don't know that yet, but wanted
> to seek for some help here anyway. 
> 
> 
> The file features.ph mentioned in that error message starts 
> like this:
> 
> > require '_h2ph_pre.ph';
> > 
> > unless(defined(&_FEATURES_H)) {
> >     eval 'sub _FEATURES_H () {1;}' unless defined(&_FEATURES_H);
> >     undef(&__USE_ISOC99) if defined(&__USE_ISOC99);
> >     undef(&__USE_POSIX) if defined(&__USE_POSIX);
> >     undef(&__USE_POSIX2) if defined(&__USE_POSIX2);
> >     undef(&__USE_POSIX199309) if defined(&__USE_POSIX199309);
> >     undef(&__USE_POSIX199506) if defined(&__USE_POSIX199506);
> 
> I found some old mails saying a problem with "h2ph" which produces
> above lines while it should do something else. 
> 
> What I would like to know: 
> - Is there a way to work around these errors?
> - Is this a problem with the Debian packages or an upstream issue?
>    (possibly a combination?)
> - How could the errors be solved cleanly?
> 
> 
> I don't have experiences with perl upstream people. Any suggestions
> whom to ask about it or which mailing list to visit?

    I'm the upstream guy.  You're seeing all of those useless warnings
because you're executing features.ph with warnings turned on.  They can
be silenced thusly:

        {
            no warnings;
            require "features.ph";
        }

    .ph files shouldn't be doing dicey things that just serve to annoy
the conscientious coder.  I'll let you know when it's really fixed
upstream.

    - Kurt



Reply to: