[Hackage] #866: Problem linking to dll's

#866: Problem linking to dll's ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- I recently installed the hmatrix package on a Windows 7 system via using the Haskell Platform (installed only a few months ago). The hmatrix installation appeared to be successful (with an OK on foreign functions), and I can successfully compile Haskell programs that use hmatrix functions. However, when I attempt to run these programs I get the follow system error: "The program can't start because lapack.dll is missing from your computer. Try reinstalling the program to fix this problem." I get similar error messages if I attempt to use hmatrix functions in ghci (after importing Numeric.LinearAlgebra). The file lapack.dll is clearly visible in my folder C:\Haskell\gsl, which also includes a gsl subfolder, blas.dll, libgsl-0.dll, and libgslcblas-0.dll. I installed hmatrix with the following parameters cabal install hmatrix --extra-lib-dir=C:\Haskell\gsl --extra-include- dir=C:\Haskell\gsl Why is lapack.dll inaccessible at runtime despite successful installation of the package? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/866 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#866: Making sure external C library DLLs are available at runtime is too easy to get wrong ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by duncan):
Why is lapack.dll inaccessible at runtime despite successful installation of the package?
Because unfortunately, finding libraries at link time and at runtime are just totally different (on Windows, Linux and OSX). To find the .dll at runtime on Windows, the .dll has to be in one of: * the same dir as your .exe * a windows system dir (not recommended) * in a directory that is on the %PATH% (works ok but is a bit fragile) This problem is not unique to Haskell, but we could perhaps have the tools check and explain it better. I'm open to suggestions. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/866#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage