morse icon indicating copy to clipboard operation
morse copied to clipboard

Build a dynamically linked binary on linux

Open asdil12 opened this issue 5 years ago • 4 comments

asdil12 avatar Jul 03 '19 11:07 asdil12

Is there some advantage to being dynamically linked?

I see the industry moving away from this as just another opportunity to fail. See golang, for example.

WardCunningham avatar Jul 03 '19 14:07 WardCunningham

Blame traces the choice of static back to: https://github.com/WardCunningham/morse/pull/3

WardCunningham avatar Jul 03 '19 14:07 WardCunningham

For languages like go and d this may be true but for c/c++ it actually has been the opposite in the last years. Static binaries are are less and less well supported. Most distributions don't even package the .a files for most of their libraries so you can't even build on that distros.

But if you are concerned about static building, it might make sence to add a second target m-static that will drop out a static binary. Providing prebuilt binaries for download from your website might be the only real usecase for static binaries.

asdil12 avatar Jul 03 '19 14:07 asdil12

Go and D will actually build dynamically linked binaries that only link against glibc.

asdil12 avatar Jul 03 '19 15:07 asdil12