Hacker News new | past | comments | ask | show | jobs | submit login

If you want portable apps just make one fully staticly compiled binary.

This is the worst of all worlds. No security updates for used libraries and no performance gain that comes with static linking.




The static linking ship has sailed years ago for glibc based apps (no static linking support).


Always use musl for static linking. As a bonus you might get an even smaller binary than a dynamically linked glibc binary.


Keep in mind, however, that AFAIK musl won't respect /etc/nsswitch.conf, so if for instance the machine is configured to lookup users on ldap, a musl static linked program won't be able to correctly lookup users.


There are certainly cases where you need the features of glibc over musl, but those are pretty rare IMO, and you can always implement a missing piece yourself if using musl saves you enough in maintenance overhead.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: