[Haskell-cafe] Mac OS X dylib woes
Judah Jacobson
judah.jacobson at gmail.com
Wed Sep 17 02:39:05 EDT 2008
On Tue, Sep 16, 2008 at 4:49 PM, John MacFarlane <jgm at berkeley.edu> wrote:
> I'm hoping some Haskell developers who use Macs can help me with this
> one. I can install pcre-light just fine using cabal install. But when I
> try to use it, I get this error:
> [snip]
> OK, so it can't find the pcre library (which is in /opt/local/lib).
> I can fix that:
>
> export DYLD_LIBRARY_PATH=/opt/local/lib
>
> Now it works. But other things are broken! For example, I can't run vim,
> which looks for a library called libJPEG.dylib and now finds libjpeg.dylib
> in /opt/local/lib (case-insensitive file system!).
>
I can't reproduce this, although I'm running ghc-6.8.3. It's possible
something wonky happened when you previously installed pcre-light.
If you type "ghc-pkg describe pcre-light", does it list
"/opt/local/lib" under the "library-dirs:" field? If not, that's most
likely your problem. Try unregistering the library and reinstalling
with:
cabal install pcre-light --extra-include-dirs=/opt/local/include
--extra-lib-dirs=/opt/local/lib
If that doesn't work, I think you can work around your problem with
libjpeg/libJPEG by setting
DYLD_FALLBACK_LIBRARY_PATH=$HOME/lib:/usr/local/lib:/lib:/usr/lib:/opt/local/lib
Which should cause the linker to favor system libraries over macports'
libraries.
Hope that helps,
-Judah
More information about the Haskell-Cafe
mailing list