[Haskell-cafe] Haskell on Debian - gcc compilation problem with cabal installed libs like hmatrix, etc.

Jason Jason at JasonKnight.us
Sun Dec 19 22:37:40 CET 2010


Hi Phil,

I hope your Haskell journey so far has been enjoyable. I'm rather new
myself, but I'm pretty sure the answer to your question is:

By default, ghc doesn't try to include all the libraries that you import
when you compile with "ghc test.hs". You can either specify these manually:
"ghc test.hs -package hmatrix" or tell ghc to try and intelligently track
down all the relevant packages with: "ghc --make test.hs".

I hope that helps!
-- 
Jason M. Knight
Ph.D. Electrical Engineering '13
Texas A&M University
Cell: 512-814-8101


On Sun, Dec 19, 2010 at 2:32 PM, gutti <philipp.guttenberg at gmx.net> wrote:

>
> Hi,
>
> I'm very new to Haskell and this Forum, just doing my first steps ... --
> Try
> to use the hmatrix package for vector and matrix calculations.
>
> The haskell compilation works (no problem in GHCi mode), the gcc however
> compilation fails with messages like:
> EFA.o: In function `r1bo_info':
> (.text+0x48): undefined reference to
> `hmatrixzm0zi10zi0zi0_NumericziVector_zdfNumVector1_closure'
> EFA.o: In function `r1bs_info':
> (.text+0x10a): undefined reference to
> `hmatrixzm0zi10zi0zi0_NumericziVector_zdfFractionalVector_closure'
>
> Obviously gcc doesn't know where the according libraries are installed.
> Same
> problem with other packages.
>
> I installed the haskell base system over debian (debian squeeze), gcc
> version 4.4.5. - Hmatrix and other packages are installed and build over
> cabel into local folder ~/.cabal/lib
>
> Do I need to set a system path, or change cabal options or .. ?
>
> Thanks in advance, Phil
>
>
>
> --
> View this message in context:
> http://haskell.1045720.n5.nabble.com/Haskell-on-Debian-gcc-compilation-problem-with-cabal-installed-libs-like-hmatrix-etc-tp3311396p3311396.html
> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20101219/34bb26fd/attachment.htm>


More information about the Haskell-Cafe mailing list