[Haskell-beginners] problem cabal install'ing hmatrix
Alberto Ruiz
aruiz at um.es
Thu Apr 23 04:47:44 EDT 2009
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
>
More information about the Beginners
mailing list