Re: GHC and GSL

2013-07-29 Thread Brandon Allbery
On Mon, Jul 29, 2013 at 11:36 AM, Greg Horn wrote: > This might also be needed in OSX, but I don't remember. > OS X *always* builds PIC; a holdover from PPC where, while it was possible to build non-PIC, pretty much everything expected PIC even for static linking (it's part of the official PPC A

Re: GHC and GSL

2013-07-29 Thread Greg Horn
You're welcome! This might also be needed in OSX, but I don't remember. On Mon, Jul 29, 2013 at 5:28 PM, Adrian Victor Crisciu wrote: > It worked! Thank you very much! > > I added the following lines to hmatrix.cabal: > > if os(linux) > if arch(x86_64) > cc-options: -fPIC > > May

Re: GHC and GSL

2013-07-29 Thread Adrian Victor Crisciu
It worked! Thank you very much! I added the following lines to hmatrix.cabal: if os(linux) if arch(x86_64) cc-options: -fPIC Maybe these lines should be included in future versions of the .cabal file. Thank you very, very much! Adrian-Victor __

Re: GHC and GSL

2013-07-29 Thread Greg Horn
I ran into this a while ago and I think I fixed it by adding "cc-options: -fPIC" to the .cabal file. On Mon, Jul 22, 2013 at 6:40 PM, Alberto Ruiz wrote: > I think this is known problem with interpreted mode in 64-bit machines: > > https://github.com/**albertoruiz/hmatrix/issues/2

GHC and GSL

2013-07-22 Thread Adrian Victor Crisciu
That's exactly what happened. Indeed, I work on a 64-bit platform, and the above program works flawlessly in compiled mode (stand-alone executable). It's a bit annoying, because I have to tinker a bit with each module in order to test it, but it works. Any idea what happens with ghci/64-bit? Than

Re: GHC and GSL

2013-07-22 Thread Edward Z. Yang
Usually, a bus error is similar to a segmentation fault, in that it indicates something has gone terribly wrong. However, as hmatrix is an API to some foreign C libraries, I would not rule out the possibility that it's a bug in the library itself. What version of hmatrix do you have, and if you c

Re: GHC and GSL

2013-07-22 Thread Alberto Ruiz
I think this is known problem with interpreted mode in 64-bit machines: https://github.com/albertoruiz/hmatrix/issues/2 The program should work ok in compiled mode. Alberto On 07/22/2013 06:27 PM, Edward Z. Yang wrote: Usually, a bus error is similar to a segmentation fault, in that it indica

GHC and GSL

2013-07-22 Thread Adrian Victor Crisciu
Hi, I need to import in one of my programs the minimization module form Numeric.GSL.Minimization. When I run even the example code in interactive mode, ghci crashes with a "Bus error" message. Is this a bug, or is something wrong with my code? The offending program follows: module MinMaxTest whe