x64 linux, x86 program and libgmp shared library

Hello glasgow-haskell-users, i compile my program for linux using ghc 6.6.1 (32-bit) user of my program asks: "any plans of making a static build for linux? that one does not work under x86-64 due to dependencies, missing libgmp which it seems is not available under 64bit. i could be wrong tho." how this may be resolved? should libgmp be available in x64 linux, or i should change compile options? -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

On Mon, Dec 21, 2009 at 2:32 PM, Bulat Ziganshin
Hello glasgow-haskell-users,
i compile my program for linux using ghc 6.6.1 (32-bit)
user of my program asks: "any plans of making a static build for linux? that one does not work under x86-64 due to dependencies, missing libgmp which it seems is not available under 64bit. i could be wrong tho."
how this may be resolved? should libgmp be available in x64 linux, or i should change compile options?
Using cabal, this gets me a completely static executable: runhaskell Setup.hs configure --user --ghc-options="-static -optl-static -optl-pthread" Which implies to me that passing '-static -optl-static -optl-pthread' would do the trick.

On Mon, Dec 21, 2009 at 2:49 PM, Robert Greayer
On Mon, Dec 21, 2009 at 2:32 PM, Bulat Ziganshin < bulat.ziganshin@gmail.com> wrote:
Hello glasgow-haskell-users,
i compile my program for linux using ghc 6.6.1 (32-bit)
user of my program asks: "any plans of making a static build for linux? that one does not work under x86-64 due to dependencies, missing libgmp which it seems is not available under 64bit. i could be wrong tho."
how this may be resolved? should libgmp be available in x64 linux, or i should change compile options?
Using cabal, this gets me a completely static executable:
runhaskell Setup.hs configure --user --ghc-options="-static -optl-static -optl-pthread"
Which implies to me that passing '-static -optl-static -optl-pthread' would do the trick.
(With the caveat: this works with 6.10... not sure at all about 6.6).

I think, libgmp.so* should be available under /usr/lib64/ if you use ghc. There are rpm packages, i.e. SuSE gmp-4.2.1-58 gmp-devel-4.2.1-58 In order to create binaries with libgmp being statically linked in, it is possible to copy libgmp.a into ghc'c libdir so that those binaries can run on systems with libgmp.so. HTH Christian Bulat Ziganshin schrieb:
Hello glasgow-haskell-users,
i compile my program for linux using ghc 6.6.1 (32-bit)
user of my program asks: "any plans of making a static build for linux? that one does not work under x86-64 due to dependencies, missing libgmp which it seems is not available under 64bit. i could be wrong tho."
how this may be resolved? should libgmp be available in x64 linux, or i should change compile options?

Christian Maeder schrieb:
I think, libgmp.so* should be available under /usr/lib64/ if you use ghc.
There are rpm packages, i.e. SuSE gmp-4.2.1-58 gmp-devel-4.2.1-58
In order to create binaries with libgmp being statically linked in, it is possible to copy libgmp.a into ghc'c libdir so that those binaries can run on systems with libgmp.so. ^^^^ without the shared library.
HTH Christian
Bulat Ziganshin schrieb:
Hello glasgow-haskell-users,
i compile my program for linux using ghc 6.6.1 (32-bit)
user of my program asks: "any plans of making a static build for linux? that one does not work under x86-64 due to dependencies, missing libgmp which it seems is not available under 64bit. i could be wrong tho."
how this may be resolved? should libgmp be available in x64 linux, or i should change compile options?
participants (3)
-
Bulat Ziganshin
-
Christian Maeder
-
Robert Greayer