[Haskell-cafe] Can't create a static Linux executable when using hmatrix

Carter Schonwald carter.schonwald at gmail.com
Mon Sep 8 00:41:18 UTC 2014


The error says all, you need to install blas / lapack on the target system
OR static link those same libs. Adding ransom flags that use the word
static wont  do that :-)
On Sep 5, 2014 5:03 PM, "Kai Zhang" <kai at kzhang.org> wrote:

> Hi Cafe,
>
> I am trying to build a static exec to be run on another machine, and I
> failed probably due to hmatrix. How can I fix this? Thanks!
>
> Test code:
>
> import Numeric.LinearAlgebra.Data
>
> main = print (fromLists [[2,3,3], [2,3,3]] :: Matrix Double)
>
> When complied with "ghc -O2 -static -optc-static -optl-static test.hs
> -optl-pthread", gave me lots of errors:
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgees.o): In
> function `dgees_':
>
> (.text+0xbc4): undefined reference to `dcopy_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgees.o): In
> function `dgees_':
>
> (.text+0xed9): undefined reference to `dswap_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgees.o): In
> function `dgees_':
>
> (.text+0x1304): undefined reference to `dswap_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgees.o): In
> function `dgees_':
>
> (.text+0x1377): undefined reference to `dswap_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0xf9a): undefined reference to `dnrm2_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0xfd4): undefined reference to `dnrm2_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x1022): undefined reference to `dscal_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x103b): undefined reference to `dscal_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x109c): undefined reference to `idamax_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x1125): undefined reference to `drot_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x12aa): undefined reference to `dnrm2_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x12e4): undefined reference to `dnrm2_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x1332): undefined reference to `dscal_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x134b): undefined reference to `dscal_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x13ac): undefined reference to `idamax_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x143d): undefined reference to `drot_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x148e): undefined reference to `dnrm2_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x14bc): undefined reference to `dscal_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x14fe): undefined reference to `dnrm2_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgeev.o): In
> function `dgeev_':
>
> (.text+0x152c): undefined reference to `dscal_'
>
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/liblapack.a(dgehrd.o):
> In function `dgehrd_':
>
> (.text+0x65d): undefined reference to `dtrmm_'
>
> .
>
> .
>
> .
>
> _______________________________________________
> 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/20140908/7ddee67c/attachment.html>


More information about the Haskell-Cafe mailing list