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:

#!/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 );
When I run this app I get this error:
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

In reply to Unable to use Device::SerialPort on Mac OS X by Metphoto

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.