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

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-probl... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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
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-probl... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hi Jason, many,many thanks - it works. -- u saved the day Haskell rather seems like a steeper slope to be honest, but I find the whole language concept very fascinating. What I can't imagine yet, how to address typical oo-problems especially when its "not allowed" to update and change variables ... Cheers Phil -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-on-Debian-gcc-compilation-probl... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

Phil,
I found Haskell to be a pretty steep slope at first too, but it helped me to
start out small and work my way up. And now its my favorite tool in the
arsenal!
One of the steps I took was to do quite a few of the Project Euler (
http://projecteuler.net/) problems, and then after cobbling together my own
solution (sometimes with small peeks at the Project Euler Haskell Solutions
(http://www.haskell.org/haskellwiki/Euler_problems)) I could see all the
other Haskell solutions in the forums.
As far as scientific style programming goes, I liked this tutorial which
walks you through an entire program including a section on simulated
annealing: http://www.lisperati.com/haskell/.
http://www.lisperati.com/haskell/In the large, I really liked this
haskell-cafe response by Jonathan in regards to complete programs in
Haskell: http://www.mail-archive.com/haskell-cafe@haskell.org/msg85374.html
.
--
Jason M. Knight
Ph.D. Electrical Engineering '13
Texas A&M University
Cell: 512-814-8101
On Sun, Dec 19, 2010 at 5:25 PM, gutti
Hi Jason,
many,many thanks - it works. -- u saved the day
Haskell rather seems like a steeper slope to be honest, but I find the whole language concept very fascinating.
What I can't imagine yet, how to address typical oo-problems especially when its "not allowed" to update and change variables ...
Cheers Phil -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-on-Debian-gcc-compilation-probl... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hi Henk-Jan, thanks for the advice - using hmatrix already worked, but only with simple matrices. I'll check the dependencies thanks. Hi Jason, thanks a lot for the response. Looks like I found a like minded soul. These links indeed sound very relevent for me. Thanks and see u around, Philipp -- View this message in context: http://haskell.1045720.n5.nabble.com/Haskell-on-Debian-gcc-compilation-probl... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

On Sun, 19 Dec 2010 21:32:00 +0100, gutti
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.
The description of the package states: "internally implemented using GSL, BLAS and LAPACK"; I suppose you need to install these (non-Haskell) packages first. Regards, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --
participants (3)
-
gutti
-
Henk-Jan van Tuyl
-
Jason