in reply to Par pp DBD::mySQL macOS

pp -o script script.pl

I get better results with pp using -x:

pp -x -o script script.pl

See -x,-execute for details. This issue sounds familiar, did you try a Super Search?

Replies are listed 'Best First'.
Re^2: Par pp DBD::mySQL macOS
by Anonymous Monk on Jul 04, 2018 at 08:16 UTC

    Hi Marto. Yes, I tried with -x too. But I get the same error. The mySQL is not found. Of course I searched for solutions before. There are a couple of posts dealing with it, but no really solution. One answer says it is necessary to manually include it in the bundle, but it does not specify how/where.

      In your last example you used --lib to add a library, that's not what it does -I,-lib=DIR:

      "Add the given directory to the perl module search path. May be specified multiple times."

      You're not trying to add a perl module, this is a mySQL library. use --link --link=FILE|LIBRARY:

      "Add the given shared library (a.k.a. shared object or DLL) into the packed file. Also accepts names under library paths; i.e. -l ncurses means the same thing as -l libncurses.so or -l /usr/local/lib/libncurses.so in most Unixes. May be specified multiple times."

        Good point, Marto! It seems to work. I had to add some other libraries since they are - I guess - expected by the mySQL library

        pp -x -o script --link=/usr/local/opt/mysql/lib/libmysqlclient.21.dyli +b --link=/usr/local/opt/openssl/lib/libssl.1.0.0.dylib --link=/usr/lo +cal/opt/openssl/lib/libcrypto.1.0.0.dylib script.pl

        The executable created this way doesn't complain on a second machine.