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

M

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.

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
 
S

smallpond

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
 
B

Ben Morrow

Quoth Mark Seger said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top