Bug #29580 dyld osx intel Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15
Submitted: 5 Jul 2007 18:41 Modified: 6 Aug 2007 21:40
Reporter: gian enrico conti Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S1 (Critical)
Version:mysql-5.0.41-osx10.4-i686 OS:MacOS
Assigned to: Assigned Account CPU Architecture:Any

[5 Jul 2007 18:41] gian enrico conti
Description:
I have a console std app.
it worked fine on PPC under 5.1
mysql fodler layout is standard:
/usr/local/mysql ( a simbolic link to mysql-5.0.41-osx10.4-i686)

I got:

dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
  Referenced from: /Volumes/HD_XEON/LAVORI/Sorgenti C/mysql_cpp/build/Development/./mysql1
  Reason: image not found
Trace/BPT trap

from cmd line.,

I added:
/usr/local/mysql-5.0.41-osx10.4-i686/lib/libmysqlclient.a

to my PB project, and it links, but does NOT run

Now I am under 10.4.9, but now under INTEL. It worked FINE under G5, same project and same vers.

the difference is the BINARY VERS OF MYSSQL, I guess.

How to repeat:
1) download mysql-5.0.41-osx10.4-i686.dmg
2) install as default
3) make a new console under XCODE using mysql.h 
4) link against /usr/local/mysql-5.0.41-osx10.4-i686/lib/libmysqlclient.a
5) run it.
[5 Jul 2007 18:51] gian enrico conti
quick ' and dirty patch;

cd /usr/local/mysql/lib 
mkdir mysql
cp libmysqlclient.15.dylib mysql/libmysqlclient.15.dylib
[6 Jul 2007 10:58] Sveta Smirnova
Can be related to Bug #28544
[6 Jul 2007 21:40] Sveta Smirnova
Thank you for the report.

Problem with dinamic library is same as in Bug #28544.

But you mentioned you have problems with static library. I can successfully build, link with static library and run test program without any problem.

Please provide repeatable test case including test program and command line you use to build the program for we can repeat issue with static library.
[6 Aug 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[19 Nov 2007 17:39] James Solderitsch
I can duplicate this bug. I am running Mac OS X 10.4.11.

The work-around:

quick ' and dirty patch;

cd /usr/local/mysql/lib 
mkdir mysql
cp libmysqlclient.15.dylib mysql/libmysqlclient.15.dylib

reported in a previous comment works for me.

But WHY do I need to do this? Why is there an extra lib in the folder path?
[4 Jan 2008 11:39] Paul Walk
For the record, I experienced this bug on Leopard (Mac OSX 10.5.1) and the simple workaround outlined previously worked for me:

cd /usr/local/mysql/lib 
mkdir mysql
cp libmysqlclient.15.dylib mysql/libmysqlclient.15.dylib
[4 Jan 2008 11:39] Paul Walk
For the record, I experienced this bug on Leopard (Mac OSX 10.5.1) and the simple workaround outlined previously worked for me:

cd /usr/local/mysql/lib 
mkdir mysql
cp libmysqlclient.15.dylib mysql/libmysqlclient.15.dylib
[11 Mar 2009 23:30] Blythe Dunham
I had to copy libmysqlclient.15.dylib with leopard also.

I installed the mysql gem using:
sudo su -
ARCHFLAGS='-arch i386' gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

recommended here:
http://www.schmidp.com/2007/9/29/rails-mysql-and-leopard/