Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Trying to use the system Perl on a new Mac Mojave I had some difficulty getting a XML::LibXML module installed from CPAN module but eventually got it working about a week ago. I remember using brew to install the LIBXML2 libs and fiddling with the paths in a few different ways as well as running a few xcode commands to ensure everything at that end was ok.

Step forward a couple of weeks and I come into the same error when trying to install URL::Encode::XS and figured that I should remember enough to get it build but a few hours later I'm still bumbling about.

I'm guessing that one solution is to use a perlbrew Perl build which should help get around the hard access limits to some of the restricted mac directories ( eg /usr/bin etc ) and I kicked things off down this path but I would still like to understand more about why XS modules are so problematic on MacOSX and have some idea of what is required to work around the system constraints.

Secondly, I'd like to be more confident about the best environment for Perl development on a Mac - do most people step away from the system Perl and use Perlbrew or is there an approach or bunch of knowledge that will allow me to work with system Perl and still be able to build modules with Library dependencies?

NB - Cross post in Stack Overflow Answer

To summarise my findings based on responses here etc the best practice would seem to be:

  • Don't use the System Perl on Mac OSX if you require any modules
  • do a brew install perl
  • then do brew install cpanminus
  • then install perlbrew to allow multiple perl setups

If I've missed anything in my findings update let me know so that I can refer ppl here with more confidence.


In reply to MAC Perl EXTERN.H Make Issues by localshop

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (7)
    As of 2024-09-15 06:21 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      The PerlMonks site front end has:





      Results (21 votes). Check out past polls.

      Notices?
      erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.