Metphoto has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow brothers, forgive me for I am novice.
I have only just started to learn Perl. I wanted to write a small app to read data from a serial device attached to my Mac.
So I wrote this:
When I run this app I get this error:#!/usr/bin/perl use warnings; use diagnostics; use strict; #use 5.010; Only v5.8.8 on a Mac. use lib '/opt/local/lib/perl5/site_perl/5.8.8/darwin-2level'; use Device::SerialPort qw( :PARAM :STAT 0.07 );
Can't load '/opt/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/De +vice/SerialPort/SerialPort.bundle' for module Device::SerialPort: dlo +pen(/opt/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Device/Se +rialPort/SerialPort.bundle, 1): Symbol not found: _PL_stack_base Referenced from: /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level/ +auto/Device/SerialPort/SerialPort.bundle Expected in: dynamic lookup at /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level/Device/SerialPo +rt.pm line 62 Compilation failed in require at ./water.pl line 9.
The key part of the message seems to be "Symbol not found: _PL_stack_base"
I have reinstalled Device::SerialPort from CPAN. That appeared to work.
I downloaded the package directly from CPAN and tried to re-make the module, using something like (I cant seem to find the exact instructions I used): perl Makefile.PL make make test sudo make install
As far as I can tell I have only one copy of SerialPort.pm installed.
I am running this on a Apple Mac using OS X 10.5.8, with a Core Duo CPU, i.e. 32bit. Perl is v5.8.8.
I did read somewhere that SerialPort.pm was Linux only. Is that true?
Any ideas?
TIA
Mark
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Unable to use Device::SerialPort on Mac OS X
by broomduster (Priest) on Aug 16, 2009 at 19:47 UTC | |
by Metphoto (Initiate) on Aug 16, 2009 at 22:47 UTC | |
Re: Unable to use Device::SerialPort on Mac OS X
by Anonymous Monk on Aug 16, 2009 at 10:13 UTC | |
by Metphoto (Initiate) on Aug 16, 2009 at 19:38 UTC |