<div dir="ltr"><div class="gmail_default" style="font-size:large">thank for all the advices,</div><div class="gmail_default" style="font-size:large">i will keep all that in mind when it's time to update the DB on the server.</div><div class="gmail_default" style="font-size:large">regards,</div><div class="gmail_default" style="font-size:large">damin<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 5, 2019 at 1:33 PM Niklas Hambüchen <<a href="mailto:mail@nh2.me">mail@nh2.me</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The two topics of creating standalone executables, and you not being a system admin, are very separate and don't have much to do with each other.<br>
<br>
On the admin topic:<br>
You can set up a full Haskell build environment in your home directory even if you are not an admin.<br>
<br>
On the standalone executable topic:<br>
Most Haskell compiled executables can easily run on other Linux systems.<br>
In the default build, a Haskell executable has only a few runtime dependencies via dynamic linking. Here's and example for a HelloWorld program when compiled with `ghc --make`:<br>
<br>
% ldd Hello<br>
linux-vdso.so.1 => (0x00007ffcd9dea000)<br>
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3799dcd000)<br>
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f3799b4d000)<br>
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3799945000)<br>
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3799741000)<br>
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3799524000)<br>
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f379915a000)<br>
/lib64/ld-linux-x86-64.so.2 (0x00007f379a0d6000)<br>
<br>
As you can see, a few C libraries must be present on the system.<br>
They are already present on most systems.<br>
Again, you don't need to be admin to get those; if they are missing, you can also ship them along with your executable and set LD_LIBRARY_PATH.<br>
<br>
In general, executables created this way on one Linux flavour work reasonably well on other Linux flavours, but not always.<br>
And example (if I remember correctly) where it doesn't work, is Centos 6 vs. newer Debian; one has libgmp.so.3 and one libgmp.so.6.<br>
This means that if you are using the default dynamic linking of C dependencies, you may have to ship "a few" (usually two) flavours of your executable.<br>
In general, executables created on one OS version work well on newer ones, e.g. something created on Ubuntu 16.04 will work well on newer Ubuntus.<br>
<br>
You can also link everything statically.<br>
Then your executable should work on any Linux system.<br>
But you need to learn a few more things to do so; I try to make it as convenient as possible with my project<br>
<a href="https://github.com/nh2/static-haskell-nix/" rel="noreferrer" target="_blank">https://github.com/nh2/static-haskell-nix/</a><br>
<br>
Niklas<br>
</blockquote></div>