4

raco exe makes dynamic executables, and raco distribute doesn't change that:

$ ldd ./tst                            
        linux-vdso.so.1 (0x00007ffc9ed46000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbeb4c09000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbeb4a18000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fbeb4c67000)

On windows, it looks like one can --embed-dlls, which is kindof what I want, but for all platforms.

I'd like to compile statically for ease of distribution and deployment. Is this possible?

0atman
  • 3,298
  • 4
  • 30
  • 46
  • Do operating systems even support static linking any more? I'm both impressed and depressed that they do. –  Apr 02 '20 at 12:27
  • 3
    Heh! You've blinked and missed the static revolution that Go and Rust have started! I've got a taste of deploying a single binary into a container AND I WANT MORE! – 0atman Apr 02 '20 at 16:26
  • To be fair, it's easy to statically compile Haskell too – 0atman Apr 02 '20 at 16:27
  • 1
    So, when you statically link your application with that version of the SSL libraries with all the security vulnerabilities & then deploy it on a platform where those vulnerabilities are fixed, except, oops, they're not because the static binary just shipped them back in again: that's going to work out well, isn't it? –  Apr 02 '20 at 17:37
  • Yes, and visa versa - my deployed app doesn't inherit YOUR old versions security flaws :-P – 0atman Apr 06 '20 at 15:20
  • I see what you're saying - it's your machine, you are responsible for it. The solution is to recompile, which is easy to do. – 0atman Apr 06 '20 at 15:21
  • I think you're imagining apps on a desktop os, where the user upgrades the system regularly. I'm imagining a single binary app deployed onto a container on aws that will only be updated with a new deploy. – 0atman Apr 06 '20 at 22:16

0 Answers0