Ok so if I remove the link or leave it, the output from otool -L is<br><br>/FOO/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level/auto/DBD/mysql/mysql.bundle:<br> libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)<br>
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)<br><br>Which I did, but I did not understand what to do with the info. Any help there?<br><br><br>I can also do the fix at the link by setting the path to the file in the environment variable <br>
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/"<br><br>I don't have an indexer or /usr/local/bin/search files so I don't know what to do with the install_name_tool exactly to set the paths. Won't this go away if the system gets updated link the symbolic link?<br>
<code class="plain"><br>sudo install_name_tool -change libmysqlclient.</code><code class="constants">18</code><code class="plain">.dylib /usr/local/mysql/lib/libmysqlclient.</code><code class="constants">18</code><code class="plain">.dylib /usr/local/bin/indexer</code><div class="line alt2">
<table><tbody><tr><td class="number"><code>2</code></td><td class="content"> </td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>3</code></td><td class="content"> </td></tr></tbody></table>
</div><div class="line alt2"><table><tbody><tr><td class="number"><code>4</code></td><td class="content"><code class="plain">sudo install_name_tool -change libmysqlclient.</code><code class="constants">18</code><code class="plain">.dylib /usr/local/mysql/lib/libmysqlclient.</code><code class="constants">18</code><code class="plain">.dylib /usr/local/bin/search</code></td>
</tr></tbody></table></div>
<br>It seems that adding it to the path for DYLD_LIBRARY_PATH is safe and stable and local so system updates are not a problem.<br><br><br><br><div class="gmail_quote">On Sun, Apr 1, 2012 at 5:51 PM, Daniel J. Luke <span dir="ltr"><<a href="mailto:dluke@geeklair.net" target="_blank">dluke@geeklair.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Apr 1, 2012, at 4:24 PM, Robyn Jonahs wrote:<br>
><br>
> ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib<br>
<br>
I guess that works, but you usually don't want to mess around with system locations as updates from Apple might interfere with your changes there...)<br>
<div><br>
> The problem may have been caused by the mysql installation from root and the perl installation being local?<br>
<br>
</div>If you run the otool command I recommended, you would know more.<br>
<br>
I don't use mysql, so I haven't had this issue and don't know offhand what is specifically going on for you.<br>
<br>
What likely happened is that DBD::mysql built with an incorrect install_name set for libmysqlclient.<br>
<br>
The page you linked to showed how you can use install_name_tool to change the location dyld would look for to find that library at runtime (this gets set at build time).<br>
<br>
It's also possible that the install_name in libmysqlclient got set wrong when it was built, so the wrong path got set on your DBD::mysql install (install_name_tool could be used to fix both, in that case).<br>
<br>
By adding the symlink there, you're relying on the default fallback behavior of dyld (see DYLD_FALLBACK_LIBRARY_PATH in man dyld) to find the lib.<br>
<div><div><br>
--<br>
Daniel J. Luke<br>
+========================================================+<br>
| *---------------- <a href="mailto:dluke@geeklair.net" target="_blank">dluke@geeklair.net</a> ----------------* |<br>
| *-------------- <a href="http://www.geeklair.net" target="_blank">http://www.geeklair.net</a> -------------* |<br>
+========================================================+<br>
| Opinions expressed are mine and do not necessarily |<br>
| reflect the opinions of my employer. |<br>
+========================================================+<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
</div></div></blockquote></div><br>