ghc searches for package libraries relative to cwd?
Simon Marlow
simonmarhaskell at gmail.com
Mon Aug 21 09:06:40 EDT 2006
Frederik Eaton wrote:
> Hi all,
>
> It seems that ghc is searching for package libraries relative to the
> current directory. Is that the intended behavior? ghci does the same
> thing, by the way.
>
> $ pwd
> /home/frederik/GSLHaskell2
> $ ghc --make ../test-proc.hs -package GSL
> Chasing modules from: ../test-proc.hs
> Compiling Main ( ../test-proc.hs, ../test-proc.o )
> Linking ...
> $ cd ..
> $ ghc --make test-proc.hs -package GSL
> Chasing modules from: test-proc.hs
> Skipping Main ( test-proc.hs, test-proc.o )
> Linking ...
> /usr/bin/ld: cannot find -lHSGSL-0.5
> collect2: ld returned 1 exit status
GHC searches for libraries using the library-dirs field of the package. Try
doing a 'ghc-pkg field GSL library-dirs' and see if there are any relative
pathnames in there.
Cheers,
Simon
More information about the Glasgow-haskell-bugs
mailing list