Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Bootstrapping compilers through binaries is retarded

Name: Anonymous 2017-03-30 19:37

1. Download a binary version of the compiler you want
2. Use it to compile the sources
3. Replace the binary with your new compiler
Sounds easy, right? Let's ignore right away that one might as well just use the binary version and skip the hour of compilation for Gentoo points as well as the fact that you might not feel comfortable running a random binary from the net because there is another big problem with this method: Thanks to the tireless FUD efforts of supreme toiletscrubber Derpper et al., the binaries are basically never statically linked. They usually depend on the correct version of the glibc library and loader, and if you use some other libc or just an incompatible version of glibc, FUCK YOU.
Your only ways out of this mess that don't include building a goddamn cross compiler on an installation with glibc are to either patch the binary tarball by hand (add all shared objects the thing needs to run and replace all binaries with shitty hackscripts that LD_PRELOAD the necessary files and call the glibc loader) or pray that the language provides some other way to bootstrap. If you are lucky, it will allow you to bootstrap from a different implementation of the same language, but if you have this problem because you use a different libc, you'll just end up in the same situation again because bootstrapping via badly built binaries is extremely fashionable and the way everyone does it. No major language still provides the way it was originally bootstrapped (usually through another language that is more easily available) because the authors don't want to maintain two compilers.

How hard is it to make a program whose job is essentially a form of colonization self-contained? How is it not completely obvious that you should do this? I refuse to believe that somebody who works on a compiler doesn't know about static linking, so it must be on purpose. What purpose?

Name: Anonymous 2017-03-31 11:18

Windows solved this problem by creating multi-GB folder for all versions of DLLs. IIRC its called side-by-side (sxs) assembly or WinSxS

Name: Anonymous 2017-04-01 8:48

>>2
Yeah, but then you are stuck with the downsides of dynamic linking without any of the upsides. Honestly, at this point I wonder whether dynamic linking as a whole wasn't a scam. The primary argument against static linking (updates) doesn't hold much water now that package managers are commonplace and all in all it just seems to create more problems than it solves.

Name: Anonymous 2017-04-01 11:35

>>3
My colleagues, who are hardcore sepples guys, described a problem with static linking and incremental compilation. I'll have to talk to them again, but that seems like a pretty big disadvantage for a large program.

Of course, the best thing to do is not to be an idiot and write a simple program that compiles quickly.

Name: Anonymous 2017-04-21 12:02

>>4
Did anything ever come out of this?

Name: Anonymous 2017-04-21 16:23

>>5
no

Name: Anonymous 2017-04-21 18:28

Compilers are NP-hard.

Name: Anonymous 2017-04-23 0:59

Compilers are code-word for bloat. Use assembler with macros to emulate high-level constructs instead.

Name: Anonymous 2017-04-23 9:20

>>8
I prefer portable assembler for that. Its called C.
Try it out online http://codepad.org/

Name: Anonymous 2017-04-23 14:38

>>9
Assembler has better syntax, macros, and control structures.

Name: Anonymous 2017-04-23 15:20

>>10
But it doesn't?

Name: Anonymous 2017-04-23 16:51

>>11
GAS isn't a real macro assembler.

Name: Anonymous 2017-04-25 8:45

>>9
I prefer an actual assembler.

Don't change these.
Name: Email:
Entire Thread Thread List