You are not logged in.
Pages: 1
Topic closed
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
/usr/include/linux/ioctl.h
http://stackoverflow.com/questions/1203 … rl-headers
Post the code. I'm sure that someone can answer.
Offline
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 ). 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
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
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
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
Pages: 1
Topic closed