
Hi, Is GHC required to be installed on the target OS I compile Haskell binaries for in order for these binaries to run? I need a quick answer on that! By the way there is no computer in the 4 or so networks I have online access to on which ghc is not installed, which might be a sign people like haskell here in Heidelberg/Mannheim, Germany. Best Regards, Cetin Sert

2008/4/10 Cetin Sert
Hi,
Is GHC required to be installed on the target OS I compile Haskell binaries for in order for these binaries to run? I need a quick answer on that!
If I parse your question correctly, the answer is no, you do not need GHC installed to run the binaries, only to compile them.
By the way there is no computer in the 4 or so networks I have online access to on which ghc is not installed, which might be a sign people like haskell here in Heidelberg/Mannheim, Germany.
Best Regards, Cetin Sert
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Is GHC required to be installed on the target OS I compile Haskell binaries for in order for these binaries to run? I need a quick answer on that!
Nope! As long as they're compiled for the right architecture, GHC-produced binaries should run anywhere, whether GHC is there or not. This is true for any compiler that produces native binaries (as opposed to certain languages which require a virtual machine...)
By the way there is no computer in the 4 or so networks I have online access to on which ghc is not installed, which might be a sign
people like haskell here in Heidelberg/Mannheim, Germany.
Cool! =) It's probably also a sign of the great work various people have done packaging GHC for various package systems. -Brent

On Apr 10, 2008, at 1:20 PM, Brent Yorgey wrote:
This is true for any compiler that produces native binaries (as opposed to certain languages which require a virtual machine...)
Unless, of course, it results in a dynamically linked binary, which I'm pretty sure GHC doesn't support at all anyway (unless that has changed?). — Jake

moving a binary compiled on a 32-bit machine running Linux to a 64-bit one,
would that necessitate recompilation on the target machine or
cross-compilation or can 64-bit Linux run 32-bit binaries?
2008/4/11 Jake Mcarthur
On Apr 10, 2008, at 1:20 PM, Brent Yorgey wrote:
This is true for any compiler that produces native binaries (as opposed
to certain languages which require a virtual machine...)
Unless, of course, it results in a dynamically linked binary, which I'm pretty sure GHC doesn't support at all anyway (unless that has changed?).
— Jake

On Apr 10, 2008, at 12:27 , Cetin Sert wrote:
Is GHC required to be installed on the target OS I compile Haskell binaries for in order for these binaries to run? I need a quick answer on that!
ghc doesn't currently create shared objects, so no. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

Cetin Sert wrote:
Is GHC required to be installed on the target OS I compile Haskell binaries for in order for these binaries to run? I need a quick answer on that!
No. Well possibly yes if you use GHC api (e.g. for compiling a haskel code from your haskell application) but for common applications it is not required. Peter.

"Cetin Sert"
Is GHC required to be installed on the target OS I compile Haskell binaries for in order for these binaries to run? I need a quick answer on that!
Quick answer: No. GHC produces normal, standalone binaries. You may have problems with dynamic libraries, use ldd to check, or compile with -optl-static. -k -- If I haven't seen further, it is by standing in the footprints of giants

2008/4/10 Cetin Sert
Is GHC required to be installed on the target OS I compile Haskell binaries for in order for these binaries to run? I need a quick answer on that!
Short answer: no. GHC can produce binaries which don't have any runtime deps on GHC libs. One thing that you might need on the target host is GMP, however that's pretty common. AGL -- Adam Langley agl@imperialviolet.org http://www.imperialviolet.org

Hi
Is GHC required to be installed on the target OS I compile Haskell binaries for in order for these binaries to run? I need a quick answer on that!
No. You can compile binaries on one machine and move them to a similar machine without recompilation. If you want to move binaries to a different type of machine, you would need to cross compile, which is a lot more work Thanks Neil

Cetin Sert wrote:
Hi,
Is GHC required to be installed on the target OS I compile Haskell binaries for in order for these binaries to run? I need a quick answer on that!
By the way there is no computer in the 4 or so networks I have online access to on which ghc is not installed, which might be a sign people like haskell here in Heidelberg/Mannheim, Germany.
Best Regards, Cetin Sert
------------------------------------------------------------------------
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
No, GHC is not required. Compiling on the same OS and architecture will produce an executable that can be sent standalone to users. If it uses any external libraries (GTK, for example) then these libraries will need to be installed as well. Generally it is not necessary. Braden Shepherdson shepheb

On Thu, Apr 10, 2008 at 06:27:12PM +0200, Cetin Sert wrote:
Hi,
Is GHC required to be installed on the target OS I compile Haskell binaries for in order for these binaries to run? I need a quick answer on that! Because you need a quick answer I will give you an incomplete one:
No, of course not. Depends on architecture though. You need some runtime dependencies (libraries such readline ).. using ghc-pkg describe you can find them (or readelf should list them as well) You need ghc if your applicattions use the ghc library. Running x86 on x86_64 won't work (although you can bootstrap ghc itself using C-files only, But I've never tried this.. There is -f-viaC as well. ) Marc
participants (11)
-
Adam Langley
-
Braden Shepherdson
-
Brandon S. Allbery KF8NH
-
Brent Yorgey
-
Cetin Sert
-
Jake Mcarthur
-
Ketil Malde
-
Marc Weber
-
Neil Mitchell
-
Peter Hercek
-
Philip Weaver