How to find ioctl.ph - is my version of perl busted?

Discussion in 'Perl Misc' started by Mark Seger, Jul 29, 2008.

  1. Mark Seger

    Mark Seger Guest

    According to perlpaq8, I should be able to "require sys/ioctl.ph" but
    when I run my script I get:

    Can't locate features.ph in @INC (did you run h2ph?)...

    I sure hope I don't have to run h2ph because I'd rather simply know if
    ioctl.ph is loadable or not. I'm running on a fairly old system with
    perl 5.8.0 and am wondering is this is correct behavior or if my
    installation might have gotten corrupted over the years. I can't find
    'features' anywhere under the perl tree.

    In fact, if I comment out the "require 'features.ph'" in the ioctl.ph I
    then start getting errors that it can't find ioctls.ph which is clearly
    all wrong.

    If my distro is indeed correct, does anyone at least know which distro
    started shipping with the appropriate includes in place?

    -mark
    Mark Seger, Jul 29, 2008
    #1
    1. Advertising

  2. Mark Seger

    smallpond Guest

    On Jul 29, 7:35 am, Mark Seger <> wrote:
    > According to perlpaq8, I should be able to "require sys/ioctl.ph" but
    > when I run my script I get:
    >
    > Can't locate features.ph in @INC (did you run h2ph?)...
    >
    > I sure hope I don't have to run h2ph because I'd rather simply know if
    > ioctl.ph is loadable or not. I'm running on a fairly old system with
    > perl 5.8.0 and am wondering is this is correct behavior or if my
    > installation might have gotten corrupted over the years. I can't find
    > 'features' anywhere under the perl tree.
    >
    > In fact, if I comment out the "require 'features.ph'" in the ioctl.ph I
    > then start getting errors that it can't find ioctls.ph which is clearly
    > all wrong.
    >
    > If my distro is indeed correct, does anyone at least know which distro
    > started shipping with the appropriate includes in place?
    >
    > -mark



    ioctl.ph should be in the directory at:

    perl -e 'use Config; print $Config{archlib},"/sys/\n"'

    --S
    smallpond, Jul 29, 2008
    #2
    1. Advertising

  3. Mark Seger

    Ben Morrow Guest

    Quoth Mark Seger <>:
    > According to perlpaq8, I should be able to "require sys/ioctl.ph" but
    > when I run my script I get:
    >
    > Can't locate features.ph in @INC (did you run h2ph?)...
    >
    > I sure hope I don't have to run h2ph because I'd rather simply know if
    > ioctl.ph is loadable or not. I'm running on a fairly old system with
    > perl 5.8.0 and am wondering is this is correct behavior or if my
    > installation might have gotten corrupted over the years. I can't find
    > 'features' anywhere under the perl tree.


    h2ph is not much used any more; a lot of distributions of perl don't
    bother installing the .ph files. IIRC h2ph chokes on some of the weirder
    stuff in the glibc headers: maybe that's your problem here?

    As a rule it's better nowadays to create a proper XS module that uses
    the C compiler to #include the headers rather than trying to convert
    them into Perl. If this is just a quick-n-dirty job you may find
    Inline::C useful.

    Ben

    --
    Joy and Woe are woven fine,
    A Clothing for the Soul divine William Blake
    Under every grief and pine 'Auguries of Innocence'
    Runs a joy with silken twine.
    Ben Morrow, Jul 30, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neal

    One directory is busted

    Neal, Aug 19, 2004, in forum: HTML
    Replies:
    1
    Views:
    373
    Toby Inkster
    Aug 20, 2004
  2. Midex
    Replies:
    35
    Views:
    868
    James Beck
    May 9, 2007
  3. V Green
    Replies:
    0
    Views:
    809
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    911
    PA Bear [MS MVP]
    Feb 5, 2008
  5. Hal Vaughan
    Replies:
    1
    Views:
    209
    Hal Vaughan
    May 13, 2004
Loading...

Share This Page