
How hard is it to distribute a haskell binary that contains a bunch of libraries embedded in the executable? Is it pretty easy to make a large statically-linked executable? -- Joe Van Dyk http://fixieconsulting.com

I'm also prety interested in that point. Last semester I've programmed some
coursework on formal language theory in Haskell and had to run the software
on my PC. Only if I knew how to easily statically link everything
together...
Has anyone here experience in doing this?
Thanks in advance,
João Paulo Pizani Flor
http://pet.inf.ufsc.br/~joaopizani
CS Student - Third year @ Brazilian Federal University - UFSC
2009/9/27 Joe Van Dyk
How hard is it to distribute a haskell binary that contains a bunch of libraries embedded in the executable? Is it pretty easy to make a large statically-linked executable?
-- Joe Van Dyk http://fixieconsulting.com _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On Mon, Sep 28, 2009 at 08:23:57PM -0300, João Paulo Pizani Flor wrote:
I'm also prety interested in that point. Last semester I've programmed some coursework on formal language theory in Haskell and had to run the software on my PC. Only if I knew how to easily statically link everything together...
Has anyone here experience in doing this?
What OS is it for? (I'm inclined to believe it's windows, but I can't be sure.) In either case, why distribute it as a _completely_ statically linked executable, wouldn't putting together an installer just as good? /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe

On Tue, Sep 29, 2009 at 7:43 AM, Magnus Therning
What OS is it for? (I'm inclined to believe it's windows, but I can't be sure.)
In either case, why distribute it as a _completely_ statically linked executable, wouldn't putting together an installer just as good?
It would. But actually, while going to work, I was wondering if a sort of Haskell application deployer would be a good idea ? It'd package Haskell apps with the necessary dynamic libraries, etc, depending on the target system of course, just like NSIS or so does. Except if nobody can't find a good reason not to use tools like NSIS which are already portable IIRC. -- Alp Mestan http://blog.mestan.fr/ http://alp.developpez.com/

On Tue, Sep 29, 2009 at 7:36 AM, Alp Mestan
On Tue, Sep 29, 2009 at 7:43 AM, Magnus Therning
wrote: What OS is it for? (I'm inclined to believe it's windows, but I can't be sure.)
In either case, why distribute it as a _completely_ statically linked executable, wouldn't putting together an installer just as good?
It would. But actually, while going to work, I was wondering if a sort of Haskell application deployer would be a good idea ? It'd package Haskell apps with the necessary dynamic libraries, etc, depending on the target system of course, just like NSIS or so does. Except if nobody can't find a good reason not to use tools like NSIS which are already portable IIRC.
It could be a good extension to Cabal (not the tool), currently there's the target 'sdist', maybe add a target 'wininst'. Similar to how Python's distutils have targets for MSI and Windows installers. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe

On Tue, Sep 29, 2009 at 10:15 AM, Magnus Therning
It could be a good extension to Cabal (not the tool), currently there's the target 'sdist', maybe add a target 'wininst'. Similar to how Python's distutils have targets for MSI and Windows installers.
Actually, I was more thinking about a separate tool. Something you'd just install, from cabal/apt/pacman/whatever, using some external system tools to check out dependencies of the application, then packaging everything and putting some install.sh script around for linux, and a nice installer under Windows, etc. It is just an idea, but the main point here is that it'd just be "simple". (of course, the idea I describe may fail heavily for packaging very complex and heavy apps, IMO, but I think there are workarounds) PS : shouldn't we move this discussion to -cafe ? -- Alp Mestan http://blog.mestan.fr/ http://alp.developpez.com/

On Tue, Sep 29, 2009 at 9:53 AM, Alp Mestan
On Tue, Sep 29, 2009 at 10:15 AM, Magnus Therning
wrote: It could be a good extension to Cabal (not the tool), currently there's the target 'sdist', maybe add a target 'wininst'. Similar to how Python's distutils have targets for MSI and Windows installers.
Actually, I was more thinking about a separate tool. Something you'd just install, from cabal/apt/pacman/whatever, using some external system tools to check out dependencies of the application, then packaging everything and putting some install.sh script around for linux, and a nice installer under Windows, etc. It is just an idea, but the main point here is that it'd just be "simple". (of course, the idea I describe may fail heavily for packaging very complex and heavy apps, IMO, but I think there are workarounds)
Linux ought to be simple, a script based on output from ldd would most likely do it. Or even better, run prelink on the executable (I suspect it'd work, but I'm not sure). Though for Linux I don't understand why anyone would do this, since it's so simple to put together distro packages :-) IMNSHO Windows is the only OS where it's useful to create binary installers. There are quite a few tools out there for that, I'd expect most of them would be suitable for Haskell binaries. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe

No love for OS X?
On Tue, Sep 29, 2009 at 5:13 PM, Magnus Therning
On Tue, Sep 29, 2009 at 9:53 AM, Alp Mestan
wrote: On Tue, Sep 29, 2009 at 10:15 AM, Magnus Therning
wrote: It could be a good extension to Cabal (not the tool), currently there's the target 'sdist', maybe add a target 'wininst'. Similar to how Python's distutils have targets for MSI and Windows installers.
Actually, I was more thinking about a separate tool. Something you'd just install, from cabal/apt/pacman/whatever, using some external system tools to check out dependencies of the application, then packaging everything and putting some install.sh script around for linux, and a nice installer under Windows, etc. It is just an idea, but the main point here is that it'd just be "simple". (of course, the idea I describe may fail heavily for packaging very complex and heavy apps, IMO, but I think there are workarounds)
Linux ought to be simple, a script based on output from ldd would most likely do it. Or even better, run prelink on the executable (I suspect it'd work, but I'm not sure). Though for Linux I don't understand why anyone would do this, since it's so simple to put together distro packages :-)
IMNSHO Windows is the only OS where it's useful to create binary installers. There are quite a few tools out there for that, I'd expect most of them would be suitable for Haskell binaries.
/M
-- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On Tue, Sep 29, 2009 at 11:19 AM, Lyndon Maydwell
No love for OS X?
No knowledge of OS X binary/library interactions, actually :-) Magnus : I agree about Linux. At least, a cabal package is enough, since there are a lot of cabal-to-<insert distro package format here> tools around. For Windows, which tool do you know that'd make it for Haskell apps ? -- Alp Mestan http://alpmestan.wordpress.com/ http://alp.developpez.com/

On Tue, Sep 29, 2009 at 10:29 AM, Alp Mestan
On Tue, Sep 29, 2009 at 11:19 AM, Lyndon Maydwell
wrote: No love for OS X?
No knowledge of OS X binary/library interactions, actually :-)
Magnus : I agree about Linux. At least, a cabal package is enough, since there are a lot of cabal-to-<insert distro package format here> tools around. For Windows, which tool do you know that'd make it for Haskell apps ?
I don't know of any Haskell-specific ones, but I'd be surprised if you can't make NSIS or WiX create an installer for a Haskell binary. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe

On Tue, Sep 29, 2009 at 10:19 AM, Lyndon Maydwell
No love for OS X?
No, not from me personally ;-) Seriously, I simply don't know anything about OSX. I've never owned a McComputer. Though I suspect OSX isn't quite as broken as Windows in relation to installers. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe

I was thinking more along the lines of how reasonable it would be to
ask a non-technical user to build a program you wish to distribute
from source. On linux / bsd /etc it would probably be unsurprising,
but it may be asking too much of windows and mac users.
On Tue, Sep 29, 2009 at 5:30 PM, Magnus Therning
On Tue, Sep 29, 2009 at 10:19 AM, Lyndon Maydwell
wrote: No love for OS X?
No, not from me personally ;-)
Seriously, I simply don't know anything about OSX. I've never owned a McComputer. Though I suspect OSX isn't quite as broken as Windows in relation to installers.
/M
-- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
participants (5)
-
Alp Mestan
-
Joe Van Dyk
-
João Paulo Pizani Flor
-
Lyndon Maydwell
-
Magnus Therning