Hacker News new | past | comments | ask | show | jobs | submit | more ashishmax31's comments login

So does that mean no statically linked binaries since glibc can't be statically linked?


OpenBSD does not use glibc.


But if even Go can't use static binaries, does that mean that static binaries are not supported by those systems ?


"static binaries" are dynamically linked to the kernel. Only the OS ISOs are fully statically linked.


I would think so. Can anyone eli5 why statically linking binaries is a big deal? Even light weight container oriented linux distributions like alpine ship with musl. In which scenario would it find it use cases?


Massively simplifies the build process, especially for cross-compilation. You can just build the binary, copy it over and run it, without having to ever touch containers, or having to worry about sysroots.

You can go ahead and do the following on your Mac:

    GOARCH=riscv GOOS=linux go build
to build a binary that just runs on Linux on RISC-V.


One advantage is that you need to worry less about versions; if I build a dynamic library that uses a feature from GNU libc 2.30, and someone tries to run it with GNU libc 2.23 then they will get an error.

These versions are not chosen at random: I ran in to this issue with people trying to run my binary on Ubuntu 16.04 (LTS release), which was solved by linking it statically.

Also, people may use musl libc, and while it has some compatibility with GNU libc this is far from complete.

So in short, linking it statically means it will work for the largest amount of people with a minimal of fuss for both the person building the binaries, and the people running them.

As people have mentioned, these issues are less present on non-Linux systems.


> which was solved by linking it statically

You could also have linked against glibc 2.23 or 2.22 or older instead of bloating your binary.


But that's a lot more effort, and who knows if someone is still using a CentOS or whatnot with an even older version. And it still won't work for other libc implementations.

Adding an extra megabyte or so is a reasonable trade-off, with no real other downsides. It's not that large – smaller than many websites.


Some have the viewpoint that static linking allows for what is essentially dependency pinning of binaries.


Not glibc in mac os/openbsd case but yeah can’t have fully static go binaries on those.


glibc is Linux only.


glibc also supports Hurd.


Did Debian not also port most of glibc to support FreeBSD's kernel?



Yep, it is already at 1.0 finally?


Yes, but we already know about the rules which govern evolution, its the laws of physics.


We have no idea where those come from either.


No, you have no idea if god exists to begin with. Thus, leave the phantasies out and stick to the real things we are proving today.


First of all, I though we are past the time where attacking other’s beliefs is acceptable.

Second, have you ever heard of this thing called philosophy? It is not useless to think about the word in an abstract way - without necessary relevance to the physical world. Like, what IS math?

By the way, I do not approve of those believer that go against science, since I think belief and actual reality can go hand-in-hand, and even with God, or perhaps because of Him, one can appreciate the beauty of sciences.


Beliefs do not reserve respect, at all. Just people do.

I'll respect you, not your beliefs.

>what IS math?

Relations between proportions. There's no magic.

Also, Science never can't go side by side with superstition. Ever.


I respect beliefs that aren't pushed on someone. For example, I have a working idea of the universe with regards to sprituality that involves neither science nor religion. I don't push that belief on others, I only offer it when my opinion is asked, and I discuss it with an open mind towards the idea that I might be completely wrong. That type of belief should absolutely be respected.


You can’t really respect another person if you disrespect his/her religion..

Math is not that easy. How does something like eg. Group Theory fits into this “definition”? And yet, it is useful to the real world.

Superstition is not religion.


Nah I think I've sussed it.


If we start from a primitive prokaryote, we pretty much nailed it. However, there's no experimentally verified theory of going from organic molecules to life.


Read the Blind Watchmaker and then The Selfish Gene. These books should help you understand the science behind life's existence.(For the uninitiated)


> These books should help you understand the science behind life's existence

Those can explain how life evolves once it already exists. And there's no argument about that, we know many laws governing those processes, from molecular to population-scale models.

However, nobody was able to show that life can emerge from non-living matter.


Sure, there are things we do not know, yet. So what?


Now the programmer just waits till the stack blows up to get his free drink.


Or whether the tale is optimised


Well, that depends on the language they speak.


That's how you get out of the simulation.


Please can you elaborate on the objective measures of code quality part? Do you mean to use static analysis tools like code climate? Also, if you don't mind can you share some good reads/books which cover these topics? Thanks


Happy new year to all the HNers, no place like this on the internet :) പുതുവത്സര ആശംസകൾ...


Neat! Definitely going to try this out.


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

Search: