You are not logged in.

#1 2015-07-07 08:54:21

starfry
Member
From: Surrey, UK
Registered: 2010-08-18
Posts: 232

[SOLVED] Perl header file "sys/ioctl.ph"

I have a snippet of Perl code that includes the line:

require "sys/ioctl.ph

This doesn't appear to be recognised by perl on Arch. Is this an omission, is the snippet wrong, or is there a package that I need to install ?

I've googled and seen other mentions of this header and it being missing. I've don't think I've missed an Arch package.

Perl isn't everyday for me - perpaps someone for whom it is would know the answer to this?

Many thanks.

Last edited by starfry (2015-07-08 09:53:30)

Offline

#2 2015-07-07 15:54:07

teckk
Member
Registered: 2013-02-21
Posts: 524

Re: [SOLVED] Perl header file "sys/ioctl.ph"

/usr/include/linux/ioctl.h
http://stackoverflow.com/questions/1203 … rl-headers

Post the code. I'm sure that someone can answer.

Offline

#3 2015-07-08 09:53:15

starfry
Member
From: Surrey, UK
Registered: 2010-08-18
Posts: 232

Re: [SOLVED] Perl header file "sys/ioctl.ph"

The code I was playing with is this:

perl -e 'require "sys/ioctl.ph"; ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV' echo test

I get this

Can't locate sys/ioctl.ph in @INC (did you run h2ph?) (@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at -e line 1.

It works if I work around the issue

perl -e 'ioctl(STDIN, 0x5412, $_) for split "", join " ", @ARGV' echo test

Since posting the question, I looked into it a bit more and found "h2ph" (thanks to the prompt in the error message wink). I read this and went ahead and did this:

(cd /usr/include; sudo h2ph -r -l .)

After that, my original command worked. However, I think "h2ph" run like that may generate a load of unwanted perl header files. It probably doesn't matter but a little more thought might be appropriate.

Offline

#4 2020-02-15 20:54:38

Involture
Member
Registered: 2020-02-15
Posts: 2

Re: [SOLVED] Perl header file "sys/ioctl.ph"

This is my first message on this forum and I don't know if it is accepted to reply to solved threads.
For future reference, using the -a option of h2ph convert the header files provided as well as any header they include.
Extracting needed header from a perl script and passing them to h2ph -a allow to convert only needed headers.

Offline

#5 2020-02-15 21:43:56

a821
Member
Registered: 2012-10-31
Posts: 381

Re: [SOLVED] Perl header file "sys/ioctl.ph"

Involture wrote:

This is my first message on this forum and I don't know if it is accepted to reply to solved threads.

sometimes it's OK... but what is definetely not OK is to necropost a five year old thread.

Offline

#6 2020-02-15 23:00:18

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,402
Website

Re: [SOLVED] Perl header file "sys/ioctl.ph"

Especially what the topic marked as solved. Thank you for trying to help, but please be aware of the last post time.

https://wiki.archlinux.org/index.php/Co … bumping%22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB