
I tried your solution but it doesn’t work.
I unregistered the previous install with ghc-pkg unregister (for mysql and mysql-simple) and I tried:
cabal install mysql --extra-lib-dirs=/usr/local/mysql-5.6.11-osx10.7-x86_64/lib
But I get the error again:
Resolving dependencies...
Configuring mysql-0.1.1.7...
Building mysql-0.1.1.7...
Failed to install mysql-0.1.1.7
Last 10 lines of the build log ( /Users/batman/.cabal/logs/mysql-0.1.1.7.log ):
Building mysql-0.1.1.7...
Preprocessing library mysql-0.1.1.7...
dyld: Library not loaded: libmysqlclient.18.dylib
Referenced from: /private/var/folders/fk/339860r16j759wmsfmjkyr4h0000gn/T/mysql-0.1.1.7-25273/mysql-0.1.1.7/dist/build/Database/MySQL/Base/C_hsc_make
Reason: image not found
running dist/build/Database/MySQL/Base/C_hsc_make failed (exit code -5)
command was: dist/build/Database/MySQL/Base/C_hsc_make >dist/build/Database/MySQL/Base/C.hs
cabal: Error: some packages failed to install:
mysql-0.1.1.7 failed during the building phase. The exception was:
ExitFailure 1
Le 25 oct. 2014 à 15:43, Brandon Allbery
On Sat, Oct 25, 2014 at 8:07 AM, Christian Sperandio
wrote: After, to link the mysql-simple package I did an export LD_LIBRARY_PATH=/usr/local/mysql-5.6.11-osx10.7-x86_64/lib. Thus, the library libmysqlclient.18.dylib was found. This is usually a bad idea, and what you're seeing is the least of the things that can go wrong.
The correct fix for all of this is not to use the environment settings, but to build the mysql binding with
cabal install mysql-simple --extra-lib-dirs=/usr/local/mysql-5.6.11-osx10.7-x86_64/lib
so it actually finds and records the location of the library instead of using an unsafe override that you have to reproduce at runtime (doing that for anything launched from the GUI is difficult, and in some OS X releases impossible, and is always risky).
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners