APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds RSS Feeds











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version
->
-> Device::SerialPort on Redhat 8


Device::SerialPort on Redhat 8




By Bruce Garlock

Email: [email protected]

The end of life for Redhat 6.2 security updates happened at the end of March. Because of this, I have been upgrading our remote buildings with Redhat 8. Since each building has a T1 router, I wrote a small program to log the routers messages to a text file. While performing these upgrades, I ran into some small trouble with my code, which relies on the perl module: "Device::SerialPort". While attempting to install this, I ran into this error:

[root@domain Device-SerialPort-0.13]# perl Makefile.PL
Finding ioctl methods ...
trying 'termios.ph'... nope
trying 'asm/termios.ph'... nope
trying 'sys/termiox.ph'... nope
trying 'sys/termios.ph'... nope
trying 'sys/ttycom.ph'... nope
trying 'sys/modem.ph'... nope
Device::Serial could not find ioctl definitions!
Perl did not find any .ph files to get at least the following ioctls:
        TIOCMBIS
        TIOCMBIC
        TIOCMGET
        CRTSCTS
Please check your Perl installation, or read 'man h2ph'.  As root, you may
need to run:
        cd /usr/include; h2ph -r -l .
before the Perl *.ph files will work.
 

So, I did what it told me to do: 'cd /usr/include; h2ph -r -l .' However, after trying to build Device::SerialPort again, it gave the same error. Time to google.

I came across a post: (Long url moved to end of page ) Which started me in the right direction. Although this post didn't fix *my* problem, at least I was headed in the right direction. After a trial and error with the post, this method finally worked for me:

cd /usr/include/
h2ph asm/*.h
h2ph -r -l termios.h
h2ph -r -l asm/termios.h
h2ph -r -l sys/termios.h
h2ph -r -l sys/ttychars.h
h2ph asm/termbits.h
h2ph asm/ioctls.h
h2ph asm/termios.h
 

I had setup a machine last weekend using this, and I am currently configuring another machine for this weekend. Good thing for .bash_history, because I had no idea on which combination of using 'h2ph' worked for me.

Long Url from text: http://groups.google.com/groups?q=Device::SerialPort-0.13&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=ca0a1e8d.0211051327.3c5e28ad%40posting.google.com&rnum=2

Publish your articles, comments, book reviews or opinions here!

© April 2003 Bruce Garlock All rights reserved




If this page was useful to you, please help others find it:  





Comments?




More Articles by



Click here to add your comments
- no registration needed!


Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar

Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

I am a Kerio reseller. Articles here related to Kerio products reflect my honest opinion, but I do have an obvious interest in selling those products also.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

g_face.jpg

This post tagged:

       - Administration
       - BGarlock
       - Linux
       - Modems
       - Perl
       - Serial
       - Terminals
       - Unix















My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide



Buy Kerio from a dealer
who knows tech:
I sell and support

Kerio Connect Mail server, Control, Workspace and Operator licenses and subscription renewals



Click and enter your name and phone number to call me about Kerio® products right now (Flash required)