Hi Monks

I am trying to pack with pp on my macOS a script containing the module DBD::mySQL. The script may be as simple as:

use DBI; use DBD::mysql; print "Hello!\n"

I compile it with the following:

pp -o script script.pl

Running it on a second machine, it fires the following error:

Can't load '/var/folders/qn/ww36n76n3kldrwp2_zxxw6k40000gn/T/par-66637 +5/cache-2406952ca14394e9ceb0dfd842a9672270fd4d99/fcfedebf.bundle' for + module DBD::mysql: dlopen(/var/folders/qn/ww36n76n3kldrwp2_zxxw6k400 +00gn/T/par-666375/cache-2406952ca14394e9ceb0dfd842a9672270fd4d99/fcfe +debf.bundle, 1): Library not loaded: /usr/local/opt/mysql/lib/libmysq +lclient.21.dylib Referenced from: /var/folders/qn/ww36n76n3kldrwp2_zxxw6k40000gn/T//p +ar-666375/cache-2406952ca14394e9ceb0dfd842a9672270fd4d99/fcfedebf.bun +dle Reason: image not found at /Users/de/perl5/perlbrew/perls/perl-5.26. +1/lib/5.26.1/darwin-2level/DynaLoader.pm line 197. at /Users/de/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/PA +R/Heavy.pm line 123. Compilation failed in require at script/SQL.pl line 3. BEGIN failed--compilation aborted at script/SQL.pl line 3.

The obvious problem is that libmysqlclient.21.dylib is missing. Less obvious to me is hot to solve the problem, as the following is not working too

pp -o script --lib=/usr/local/opt/mysql/lib/libmysqlclient.21.dylib s +cript.pl

Any suggestions


In reply to Par pp DBD::mySQL macOS by Anonymous Monk

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.