I created an application that uses DBD::MySQL.  I add the MySQL client
library to the PAR with '-l
/opt/mysql/lib/mysql/libmysqlclient.so.15'.  When I do the 'pp' on my
Solaris 8 system the executable runs and completes without issue,
however, when I do the same command line on Linux, things get
interesting.  The first time I run it on Linux, it complains about not
being able to find the library file and exits, if I rerun the
executable it runs just fine and completes.  I can also change my
shell's LD_LIBRARY_PATH after the initial run and it will work.

If I look in the '/tmp/par-root/cache-*' file I see the
libmysqlclient.so file in the root of the cache both before and after
the initial run.  In a test script I can see that LD_LIBRARY_PATH and
others are being set correctly.  It's almost like DBD::MySQL is called
before the LD_LIBRARY_PATH is set.  If call it without the '-l' and
the libmysqlclient.so.15 file is in '/ot/mysql/lib/mysql' then the PAR
file runs without issue from the start.

I have done like the FAQ stated and removed the link and copied the
file to the real name.

Initial Run:

[EMAIL PROTECTED] ./test_prog
Can't load 
'/tmp/par-root/cache-3bb398dbc6f8440b27f0e710c6cdba3e286c7562/726cee52.so'
for module DBD::mysql: libmysqlclient.so.15: cannot open shared object
file: No such file or directory at
/opt/perl/lib/5.8.4/i686-linux/DynaLoader.pm line 230.
at ../blib/lib/PAR/Heavy.pm line 107
Compilation failed in require at (eval 11) line 157.
BEGIN failed--compilation aborted at (eval 11) line 157.
[EMAIL PROTECTED]

[EMAIL PROTECTED] ./test_prog
[EMAIL PROTECTED]

I've not seen this issue in the mailing list archives, so I believe
this to be new.

PAR Version: 0.957
Perl Version: 5.8.4
MySQL 5.0.24

Eric Brinkley

Reply via email to