problem cabal install'ing hmatrix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

problem cabal install'ing hmatrix

Erik Quaeghebeur
$ cabal install hmatrix
Resolving dependencies...
Configuring hmatrix-0.5.1.1...
Preprocessing library hmatrix-0.5.1.1...
running dist/build/Numeric/GSL/Special/Internal_hsc_make failed
command was: dist/build/Numeric/GSL/Special/Internal_hsc_make
>dist/build/Numeric/GSL/Special/Internal.hs
cabal: Error: some packages failed to install:
hmatrix-0.5.1.1 failed during the building phase. The exception was:
exit: ExitFailure 1

What should I do to diagnose/resolve this problem?
I'm on Gentoo/amd64 and have also posted this question in the gentoo
forums.


TIA for any help and pointers,

Erik
Reply | Threaded
Open this post in threaded view
|

Re: problem cabal install'ing hmatrix

Heinrich Apfelmus
Erik Quaeghebeur wrote:

> $ cabal install hmatrix
> Resolving dependencies...
> Configuring hmatrix-0.5.1.1...
> Preprocessing library hmatrix-0.5.1.1...
> running dist/build/Numeric/GSL/Special/Internal_hsc_make failed
> command was: dist/build/Numeric/GSL/Special/Internal_hsc_make
>> dist/build/Numeric/GSL/Special/Internal.hs
> cabal: Error: some packages failed to install:
> hmatrix-0.5.1.1 failed during the building phase. The exception was:
> exit: ExitFailure 1
>
> What should I do to diagnose/resolve this problem?
> I'm on Gentoo/amd64 and have also posted this question in the gentoo
> forums.

Try

   cabal install hmatrix --verbose

to get a more detailed failure report.

On Mac/PPC, the trickiest part for me was to meet the dependencies on C
libraries, and there was some x86 assembly instruction lurking around.

Otherwise, no idea. You might want to try the  [hidden email]
 or  [hidden email]  mailing lists.


Regards,
apfelmus

--
http://apfelmus.nfshost.com

Reply | Threaded
Open this post in threaded view
|

problem cabal install'ing hmatrix

Alberto Ruiz-2
In reply to this post by Erik Quaeghebeur
Hi Erik,

Probably a dependency not mentionend in extra-libraries is missing.
There is not a standard way to link -llapack. For instance, in
Ubuntu/Debian we only need gsl and lapack:

$ ld -lgsl -llapack
ld: warning: cannot find entry symbol _start; not setting start address

This means that everything is ok, but in other systems we may also need
some of -l[gsl]cblas, -lgfortran, or -lf77blas, -latlas, -lgcc_s, etc.

Try to find the correct libraries with

$ ld -lgsl -llapack -lgslcblas

or other combinations, and modify the extra-libraries field in
hmatrix.cabal. In any case, I will try to add cabal flags to cover
common situations. (There is also a possible issue with ghc-6.8 that
must be fixed, but the library should work ok with 6.10).

Alberto

PS: I CC the list for reference.

Erik Quaeghebeur wrote:

> Alberto,
>
> Original message:
>>>
>>>  $ cabal install hmatrix
>>>  Resolving dependencies...
>>>  Configuring hmatrix-0.5.1.1...
>>>  Preprocessing library hmatrix-0.5.1.1...
>>>  running dist/build/Numeric/GSL/Special/Internal_hsc_make failed
>>>  command was: dist/build/Numeric/GSL/Special/Internal_hsc_make
>>> >  dist/build/Numeric/GSL/Special/Internal.hs
>>>  cabal: Error: some packages failed to install:
>>>  hmatrix-0.5.1.1 failed during the building phase. The exception was:
>>>  exit: ExitFailure 1
>>>
>>>  What should I do to diagnose/resolve this problem?
>
> On Tue, 21 Apr 2009, Alberto Ruiz wrote:
>>
>> Erik, do you have the same problem with a previous version?
>>
>> cabal install hmatrix-0.5.0.1
>
> Thanks for your (speedy) reply. Yes it gives the same problem:
>
> $ cabal install hmatrix-0.5.0.1
> Resolving dependencies...
> Configuring hmatrix-0.5.0.1...
> Preprocessing library hmatrix-0.5.0.1...
> running dist/build/Numeric/GSL/Special/Internal_hsc_make failed
> command was: dist/build/Numeric/GSL/Special/Internal_hsc_make
>> dist/build/Numeric/GSL/Special/Internal.hs
> cabal: Error: some packages failed to install:
> hmatrix-0.5.0.1 failed during the building phase. The exception was:
> exit: ExitFailure 1
>
> Also, suggested by Heinrich Apfelmus:
>
> $ cabal install hmatrix --verbose
> /usr/bin/ghc --numeric-version
> looking for package tool: ghc-pkg near compiler in /usr/bin
> found package tool in /usr/bin/ghc-pkg
> /usr/bin/ghc-pkg --version
> /usr/bin/ghc --supported-languages
> Reading installed packages...
> /usr/bin/ghc-pkg list
> Reading available packages...
> Resolving dependencies...
> selecting hmatrix-0.5.1.1 (hackage) and discarding hmatrix-0.1.0.0,
> 0.1.1.0,
> 0.2.0.0, 0.2.1.0, 0.3.0.0, 0.4.0.0 and 0.5.0.1
> selecting base-3.0.1.0 (installed)
> selecting rts-1.0 (installed)
> selecting storable-complex-0.2 (installed or hackage) and discarding
> storable-complex-0.1
> selecting haskell98-1.0.1.0 (installed or hackage) and discarding
> haskell98-1.0
> selecting process-1.0.0.0 (installed or hackage) and discarding
> process-1.0.1.1
> selecting unix-2.3.0.0 (installed or hackage) and discarding unix-2.0,
> 2.2.0.0, 2.3.1.0 and 2.3.2.0
> selecting directory-1.0.0.0 (installed or hackage) and discarding
> directory-1.0.0.3
> selecting filepath-1.1.0.0 (installed or hackage) and discarding
> filepath-1.0,
> 1.1.0.1 and 1.1.0.2
> selecting array-0.1.0.0 (installed or hackage) and discarding array-0.2.0.0
> selecting QuickCheck-1.2.0.0 (installed or hackage) and discarding
> QuickCheck-1.0, 1.1.0.0, 2.1 and 2.1.0.1
> selecting random-1.0.0.0 (installed or hackage) and discarding
> random-1.0.0.1
> selecting old-time-1.0.0.0 (installed or hackage) and discarding
> old-time-1.0.0.2
> selecting old-locale-1.0.0.0 (installed or hackage) and discarding
> old-locale-1.0.0.1
> selecting HUnit-1.2.0.3 (installed or hackage) and discarding HUnit-1.1,
> 1.2.0.0, 1.2.0.1 and 1.2.0.2
> In order, the following would be installed:
> hmatrix-0.5.1.1 (new package)
> hmatrix-0.5.1.1 has already been downloaded.
> Extracting
> /home/equaeghe/.cabal/packages/hackage.haskell.org/hmatrix/0.5.1.1/hmatrix-0.5.1.1.tar.gz
>
> to /tmp/hmatrix-0.5.1.16320...
> Configuring hmatrix-0.5.1.1...
> Flags chosen: unsafe=False, accelerate=False, mkl=False, splitbase=True
> Dependency HUnit -any && ==1.2.0.3: using HUnit-1.2.0.3
> Dependency QuickCheck -any && ==1.2.0.0: using QuickCheck-1.2.0.0
> Dependency array -any && ==0.1.0.0: using array-0.1.0.0
> Dependency base >=3 && ==3.0.1.0: using base-3.0.1.0
> Dependency haskell98 -any && ==1.0.1.0: using haskell98-1.0.1.0
> Dependency storable-complex -any && ==0.2: using storable-complex-0.2
> Using Cabal-1.6.0.3 compiled by ghc-6.8
> Using compiler: ghc-6.8.2
> Using install prefix: /home/equaeghe/.cabal
> Binaries installed in: /home/equaeghe/.cabal/bin
> Libraries installed in: /home/equaeghe/.cabal/lib/hmatrix-0.5.1.1/ghc-6.8.2
> Private binaries installed in: /home/equaeghe/.cabal/libexec
> Data files installed in: /home/equaeghe/.cabal/share/hmatrix-0.5.1.1
> Documentation installed in: /home/equaeghe/.cabal/share/doc/hmatrix-0.5.1.1
> No alex found
> Using ar found on system at: /usr/bin/ar
> No c2hs found
> No cpphs found
> No ffihugs found
> Using gcc version 4.3.2 found on system at: /usr/bin/gcc
> Using ghc version 6.8.2 found on system at: /usr/bin/ghc
> Using ghc-pkg version 6.8.2 found on system at: /usr/bin/ghc-pkg
> No greencard found
> No haddock found
> No happy found
> No hmake found
> Using hsc2hs version 0.66 found on system at: /usr/bin/hsc2hs
> No hscolour found
> No hugs found
> No jhc found
> Using ld found on system at: /usr/bin/ld
> No nhc98 found
> Using pkg-config version 0.23 found on system at: /usr/bin/pkg-config
> Using ranlib found on system at: /usr/bin/ranlib
> Using strip found on system at: /usr/bin/strip
> Using tar found on system at: /bin/tar
> /usr/bin/gcc /tmp/6320.c -o /tmp/6320 -D__GLASGOW_HASKELL__=608 -I.
> -DFINIT -I/usr/lib64/ghc-6.8.2/lib/process-1.0.0.0/include
> -I/usr/lib64/ghc-6.8.2/lib/unix-2.3.0.0/include
> -I/usr/lib64/ghc-6.8.2/lib/directory-1.0.0.0/include
> -I/usr/lib64/ghc-6.8.2/lib/old-time-1.0.0.0/include
> -I/usr/lib64/ghc-6.8.2/lib/base-3.0.1.0/include
> -I/usr/lib64/ghc-6.8.2/include -lgsl -llapack
> Creating dist/build (and its parents)
> Creating dist/build/autogen (and its parents)
> Preprocessing library hmatrix-0.5.1.1...
> Creating dist/build/Numeric/GSL/Special (and its parents)
> /usr/bin/hsc2hs --cc=/usr/bin/gcc --ld=/usr/bin/gcc
> --cflag=-D__GLASGOW_HASKELL__=608 --cflag=-DFINIT --lflag=-lgsl
> --lflag=-llapack
> --cflag=-I/usr/lib64/ghc-6.8.2/lib/process-1.0.0.0/include
> --cflag=-I/usr/lib64/ghc-6.8.2/lib/unix-2.3.0.0/include
> --cflag=-I/usr/lib64/ghc-6.8.2/lib/directory-1.0.0.0/include
> --cflag=-I/usr/lib64/ghc-6.8.2/lib/old-time-1.0.0.0/include
> --cflag=-I/usr/lib64/ghc-6.8.2/lib/base-3.0.1.0/include
> --cflag=-I/usr/lib64/ghc-6.8.2/include
> --lflag=-L/home/equaeghe/.cabal/lib/storable-complex-0.2/ghc-6.8.2
> --lflag=-L/usr/lib64/ghc-6.8.2/lib/haskell98-1.0.1.0
> --lflag=-L/usr/lib64/ghc-6.8.2/lib/process-1.0.0.0
> --lflag=-L/usr/lib64/ghc-6.8.2/lib/unix-2.3.0.0 --lflag=-lutil
> --lflag=-ldl --lflag=-L/usr/lib64/ghc-6.8.2/lib/directory-1.0.0.0
> --lflag=-L/usr/lib64/ghc-6.8.2/lib/filepath-1.1.0.0
> --lflag=-L/usr/lib64/ghc-6.8.2/lib/array-0.1.0.0
> --lflag=-L/home/equaeghe/.cabal/lib/QuickCheck-1.2.0.0/ghc-6.8.2
> --lflag=-L/usr/lib64/ghc-6.8.2/lib/random-1.0.0.0
> --lflag=-L/usr/lib64/ghc-6.8.2/lib/old-time-1.0.0.0
> --lflag=-L/usr/lib64/ghc-6.8.2/lib/old-locale-1.0.0.0
> --lflag=-L/home/equaeghe/.cabal/lib/HUnit-1.2.0.3/ghc-6.8.2
> --lflag=-L/usr/lib64/ghc-6.8.2/lib/base-3.0.1.0
> --lflag=-L/usr/lib64/ghc-6.8.2 --lflag=-lm --lflag=-lgmp --lflag=-ldl
> --lflag=-lrt -o dist/build/Numeric/GSL/Special/Internal.hs
> lib/Numeric/GSL/Special/Internal.hsc
> running dist/build/Numeric/GSL/Special/Internal_hsc_make failed
> command was: dist/build/Numeric/GSL/Special/Internal_hsc_make
>> dist/build/Numeric/GSL/Special/Internal.hs
> cabal: Error: some packages failed to install:
> hmatrix-0.5.1.1 failed during the building phase. The exception was:
> exit: ExitFailure 1
>
> I still have to test the version in the Gentoo Haskell overlay. That
> should work (but then I wouldn't use cabal install).
>
> Regards,
>
> Erik
>
Reply | Threaded
Open this post in threaded view
|

problem cabal install'ing hmatrix

Erik Quaeghebeur
>>  Original message:
>> > >
>> > >   $ cabal install hmatrix
>> > >   Resolving dependencies...
>> > >   Configuring hmatrix-0.5.1.1...
>> > >   Preprocessing library hmatrix-0.5.1.1...
>> > >   running dist/build/Numeric/GSL/Special/Internal_hsc_make failed
>> > >   command was: dist/build/Numeric/GSL/Special/Internal_hsc_make
>> > > >   dist/build/Numeric/GSL/Special/Internal.hs
>> > >   cabal: Error: some packages failed to install:
>> > >   hmatrix-0.5.1.1 failed during the building phase. The exception was:
>> > >   exit: ExitFailure 1
>> > >
>> > >   What should I do to diagnose/resolve this problem?

On Thu, 23 Apr 2009, Alberto Ruiz wrote:

>
> Probably a dependency not mentionend in extra-libraries is missing. There is
> not a standard way to link -llapack. For instance, in Ubuntu/Debian we only
> need gsl and lapack:
>
> $ ld -lgsl -llapack
> ld: warning: cannot find entry symbol _start; not setting start address
>
> This means that everything is ok, but in other systems we may also need some
> of -l[gsl]cblas, -lgfortran, or -lf77blas, -latlas, -lgcc_s, etc.
>
> Try to find the correct libraries with
>
> $ ld -lgsl -llapack -lgslcblas

# ld -lgsl -llapack -lgslcblas
ld: warning: cannot find entry symbol _start; not setting start address

> or other combinations, and modify the extra-libraries field in hmatrix.cabal.
> In any case, I will try to add cabal flags to cover common situations. (There
> is also a possible issue with ghc-6.8 that must be fixed, but the library
> should work ok with 6.10).

# ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.2


It seems we still don't know the cause; any more things I can do to
diagnose?

I'll also investigate the possibilities of resolving this issue by using
the gentoo haskell overlay or non-stable versions of ghc (6.10) in
Gentoo's repository.

Erik
Reply | Threaded
Open this post in threaded view
|

problem cabal install'ing hmatrix

Alberto Ruiz-2
Erik, if you get

 > # ld -lgsl -llapack -lgslcblas
 > ld: warning: cannot find entry symbol _start; not setting start address

perhaps you only need to uncomment line 141 in hmatrix.cabal and try
"cabal install" in that folder.

This is not the default because we prefer to link with a possibly
optimized cblas. Clearly hmatrix requires a previous configure step.

Alberto

Erik Quaeghebeur wrote:

>>>  Original message:
>>> > > > >   $ cabal install hmatrix
>>> > >   Resolving dependencies...
>>> > >   Configuring hmatrix-0.5.1.1...
>>> > >   Preprocessing library hmatrix-0.5.1.1...
>>> > >   running dist/build/Numeric/GSL/Special/Internal_hsc_make failed
>>> > >   command was: dist/build/Numeric/GSL/Special/Internal_hsc_make
>>> > > >   dist/build/Numeric/GSL/Special/Internal.hs
>>> > >   cabal: Error: some packages failed to install:
>>> > >   hmatrix-0.5.1.1 failed during the building phase. The exception
>>> was:
>>> > >   exit: ExitFailure 1
>>> > > > >   What should I do to diagnose/resolve this problem?
>
> On Thu, 23 Apr 2009, Alberto Ruiz wrote:
>>
>> Probably a dependency not mentionend in extra-libraries is missing.
>> There is not a standard way to link -llapack. For instance, in
>> Ubuntu/Debian we only need gsl and lapack:
>>
>> $ ld -lgsl -llapack
>> ld: warning: cannot find entry symbol _start; not setting start address
>>
>> This means that everything is ok, but in other systems we may also
>> need some of -l[gsl]cblas, -lgfortran, or -lf77blas, -latlas, -lgcc_s,
>> etc.
>>
>> Try to find the correct libraries with
>>
>> $ ld -lgsl -llapack -lgslcblas
>
> # ld -lgsl -llapack -lgslcblas
> ld: warning: cannot find entry symbol _start; not setting start address
>
>> or other combinations, and modify the extra-libraries field in
>> hmatrix.cabal. In any case, I will try to add cabal flags to cover
>> common situations. (There is also a possible issue with ghc-6.8 that
>> must be fixed, but the library should work ok with 6.10).
>
> # ghc --version
> The Glorious Glasgow Haskell Compilation System, version 6.8.2
>
>
> It seems we still don't know the cause; any more things I can do to
> diagnose?
>
> I'll also investigate the possibilities of resolving this issue by using
> the gentoo haskell overlay or non-stable versions of ghc (6.10) in
> Gentoo's repository.
>
> Erik
>
Reply | Threaded
Open this post in threaded view
|

problem cabal install'ing hmatrix

Erik Quaeghebeur
On Fri, 24 Apr 2009, Alberto Ruiz wrote:

>
> Erik, if you get
>
>>  # ld -lgsl -llapack -lgslcblas
>>  ld: warning: cannot find entry symbol _start; not setting start address
>
> perhaps you only need to uncomment line 141 in hmatrix.cabal and try "cabal
> install" in that folder.
>
> This is not the default because we prefer to link with a possibly optimized
> cblas. Clearly hmatrix requires a previous configure step.

I've managed to get things working using the gentoo haskell overlay!
I had an optimized blas installed (atlas), but perhaps it wasn't
automatically detected? Anyhow, it works now; there is no need to get
deeper into the distribution-specific behavior. I can focus on coding.

Erik