Click here to get back home

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

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    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
How to find ioctl.ph - is my version of perl busted? Mark Seger 07-29-2008
Get Chitika Premium
Posted by Mark Seger on July 29, 2008, 7:35 am
Please log in for more thread options
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

Posted by smallpond on July 29, 2008, 11:00 am
Please log in for more thread options
> 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,"/sys/\n"'

--S

Posted by Ben Morrow on July 30, 2008, 12:03 pm
Please log in for more thread options

> 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.me.uk

Similar ThreadsPosted
Time::Local busted? April 24, 2008, 9:00 am
$! is set to "Inappropriate ioctl..." on Linux January 12, 2005, 3:00 pm
ioctl TIOCSCTTY errno -1 August 21, 2006, 3:33 pm
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? March 5, 2005, 6:03 am
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? June 9, 2005, 5:03 pm
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? September 27, 2005, 10:03 pm
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? February 2, 2006, 12:03 am
"Inappropriate ioctl for device" while upload()ing using CGI.pm July 1, 2006, 1:09 pm
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? September 18, 2006, 3:03 pm
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? November 24, 2006, 9:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap