Why is compiling from source so complicated? I have to install 20 different packages, have 4 different "msys" prompts and 10 specific C++ compilers, add 7 things to my %PATH% just run someone else's program. Is there a guide purely on this stuff?
Why is compiling from source so complicated? I have to install 20 different packages, have 4 different "msys" prompts and 10 specific C++ compilers, add 7 things to my %PATH% just run someone else's program. Is there a guide purely on this stuff?
Bad build system
That's because C/++ lacks a standard package format and a build system. Everyone makes shitty projects and their shitty project structures, results in zero coherence on how a project is supposed to be built.
>Why is compiling from source so complicated
because lintards don't know how a proper build system should work, and they overcomplicate shit.
I wrote out a long ass post yesterday mocking linux build systems but I couldn't be bothered to find it, so I'll write a summary version now.
>run a cmake program on some .txt file with some fucktarded syntax
>generate a ./configure script, which is thousands of lines long and is interpreted by sh, bash, dash, ash or any other supposedly poosix compatible shell which could error out at any moment
>this runs some random-ass macro processor to read a makefile.in to generate a makefile
>mixed up a space or a tab in there? ERROR
>now you use one of like 3 subtly incompatible variants of make to process that makefile
>use one of a myriad versions of either gcc, clang, tcc, compcert, or whatever weirdo compiler you happen to be using (and there's no back compat so if you use too old or too new versions of even popular compilers like gcc or clang - tough luck, errors out the ass)
>header files scattered all over the place because incompetent "packagers" have no standard to follow
>finally built? well now you have to link, there's 3 different linkers (bfd, gold, llvm-ld) with different features. cross fingers and pray that the versions of all libraries installed on your system are compatible and you won't get random symbol errors.
>now type sudo make install
>want to uninstall later? whoops, too bad, there's no way to uninstall without manually removing all the files :^) scattered all over the system :^) unless the developer bothered to write a make uninstall rule, in which case it will probably leave more stale files and config shit all over the place
Meanwhile, on Windows, you just open the .sln file in Visual Studio and press F7. Wallah, the app has been built and all you gotta do is click on the .exe to start it.
Don't blame us for the incompetence of Bell Labs. There is no such thing as "Linux build system".
Proper languages like Rust has build system and everything simply works with cargo build
>Bell Labs
debian had plenty of opportunities to standardize the shit
Debian is not the C/++ standardization body, the ISO is. Have fun explaining 78 year old boomers in the ISO committee the need of a standard package format.
To them, defending convicted child sex offender is more important than package management.
https://twitter.com/pati_gallardo/status/1501211140310904841
>Don't blame us for the incompetence of Bell Labs
Why did you copy the incompetence of Bell Labs instead of creating your own OS?
Microsoft did it with NT, you freetards should've done that too. Unix clones are overrated garbage that all belong in the dustbin of history.
Maybe Linux would be the dominant desktop OS by now if it wasn't run by unixtard homosexuals who insist on using text files for everything.
>Why did you copy the incompetence of Bell Labs instead of creating your own OS?
What a stupid fucking thing to say.
Why should Linus fix the problem with C/++ to begin with? It's not his job. Furthermore mac toddler OS has the same issue with package formatting but every day you cry about muh Linux.
But as I said, proper languages like Rust does not have this problem and hopefully in near future we slowly get rid of the C garbage.
Rust is barely any better than C. The syntax is horrible and the code generated is quite slow.
>Why should Linus fix the problem with C/++ to begin with?
no, i meant that Linus should NOT have copied unix. what a retarded idea, copying some garbage mainframe OS from the 60s and trying to use it on a PC.
>Rust is barely any better than C.
Rust is a strict improvement upon C. C lacks monomorphism.
> The syntax is horrible
Far better than unreadable macro-pointer vomit soup.
Most of the time Rust code is clear and concise. The intent is crystal clear.
>and the code generated is quite slow.
Bold statement. Show me a code snippet of equivalent Rust code is "quite slow".
>no, i meant that Linus should NOT have copied unix
Linux copied nothing. Problem lies with the language tooling itself, not the OS. Whether the OS is mainframe or not is simply not relevant.
>he believes amazon propaganda about rust being as fast as C
Those benchmarks were done with unsafe rust, and by a company that’s in the rust foundation. Welcome back to reality anon.
Unsafe rust is safer than C. Plus it has all the QoL improvements upon C.
Most of this is complaining about shit that doesn't affect you as a user. The point of shit like autotools is that you can use any unix-like OS, any shell, any compiler, any linker, and it will detect library presence and compatibility for you, before you start building. Setting up and building a project is a simple, easy to remember command (./configure && make), and you don't care about what's going on under it. Software is installed to /usr/local by default, so it's simple to nuke the entire folder when done, though I agree there should be easier ways to make "self-built" linux packages without writing package descriptions and such.
Being the "standard" that everyone knows how to use is exactly what has made autotools stick around for so long. Developers hate working with it, but from the user's perspective it's not bad.
No, the problem with building from source on linux is when people *don't* use one of the three standard build systems (autotools, cmake, meson), or do something in the former two that breaks everything under some configurations. Bespoke, custom build systems tend to forget about half the things you need to build on some systems, have a tendency of hardcoding paths, flags, libraries and compilers, and just make everything hard to build and package properly.
>Most of this is complaining about shit that doesn't affect you as a user
Someone who isn't a developer but compiles software on linux for whatever reason counts as a user and the user experience is horrible.
Contrast that with Windows where
1. You never need to compile software as a non-developer
2. Even for developers, compiling native Windows software is extremely easy - just open the VS solution and press a single key on the keyboard.
>Wallah
w'allah habibi
homosexual
>Meanwhile, on Windows, you just open the .sln file in Visual Studio and press F7.
OP is talking about windows, retard.
well, you see, what OP is complaining about is when you port Linux software over to Windows and have to deal with the crappy Linux build systems. It's just as bad on Linux as it is on Windows.
Stop installing freetard software, stop using freetard compilers, and stop contributing to freetard projects.
Linux has no build system.
Because Windows wasn't made with this in mind, it was designed to be a platform for self-contained commercial software products. It's easy on *nix because necessity is the mother of invention.
And then you have actual liars like who have no idea how fucking awful MS's tooling actually is.
He uses GNU/Linux for sure, he's just trolling and probably does this a lot.
No, he's some LULZ-poisoned hypercontrarian NEET who still uses Windows 7.
Linux building systems are ok. What's really flawed and need fixing is *packaging* systems
On Windows, all you need is a simple NSIS myprogram.exe
On Linux you need to build snap for Ubuntu, Flatpak for Fedora and Mint, .rpm for openSUSE, also don't forget to build a native .deb package for Debian users, and also one little AUR, just to be sure. And maybe also AppImage for other distros. This shit gets so wild, sometimes it's just easier to run Windows version through WINE rather than figuring out SEVEN different packaging systems
MSBuild is infinitely more retarded than autotools shit. On every rare occasion where I have to deal with a shitty Microsoft build system I consider myself lucky that I'm working with the shittiest Linux/Unix build systems instead of the MS dumpster fire for the majority of my time.
>MSBuild is infinitely more retarded than autotools shit
dont care, seethe more freetard.
>clicks F7
>instantly everything gets built and i can get my exe's and dlls
you can't beat that level of user/developer friendliness.
>clicks F7
>explodes into cryptic error codes
you can't beat that level of user/developer friendliness.
I tried building mpv from source on Debian Stable, and one of the many reasons it wouldn't work is that some cunt had used the Python walrus (:=) operator in a python config script, which only became valid Python syntax in like 3.8 or some shit, while I was stuck on 3.7. I had to build a bunch of other build-programs from source as well because Debian is too out of date, and download fuck loads of extra library packages, and then when it finally did compile it couldn't play anything
Oh yeah. Python never fucking works.
Literally every (every) single time I used software that came with .py files there was some gay fucking error.
>RuntimeError: middleware cannot be added to a descriptor before the interface is activated
literal meaningless gobbledeasiatic messages
I did manage to fix that one but i am NEVER updating that software, ever, because no doubt they will have introduced even more stupid bugs.
also i had to manually copy paste random files from the internet because PIP didn't fucking work.
Python is literally the "just doesn't werk" programming language. I prefer to click an .exe and have it fucking do its job.
Shitty linux ports, yeah. Windows only open source projects are literally press green button to build.
>msys
That's what you get for using the worst operating system for software development.
On Linux you just install the dependencies and build. No need to fuck around with environment variables because pkg-config knows where everything is.
>linux version of the game doesnt have controller support
>10 specific C++ compilers
Name all 10.
GCC, Clang, MSVC, Boreland, Intel, Comeau, Digital Mars, Embarcadero, TCC, Oracle C++.
Mae is for sexo
Because windows libraries are shitty festering piles of garbage. Just this morning I had to spend an hour fixing an ambiguous statement because the winsock library has its own declaration of byte when my build had another definition
>fixing an ambiguous statement because the winsock library has its own declaration of byte
a byte is a byte lmao
Because you are using a legacy programming language written 50 years ago that is on its way out of the industry and for a good reason.
Try JS, Python, Rust, or anything with actual package management and write again.
Flaming homosexual alert.
Build from source on linux
>git clone
>apply distro-specific patches
>meson blah-blah
>ninja build
Works like a charm every time
Except when the project does not use meson.
i used rust i dont have this problem anymore like i did with c++
>arch build system, make a pkgbuild or use one of the millions
>paru -S packagename
>only installs a few things at most
>compiles in a few moments and then program is created and works properly
uhh wintoddlers btfo,
Because it's not meant to "download and just run it". That's for binaries. You know, the *result* of what you're trying to do.
Seting up a build environment is an arduous task because every software project is unique and grew organically. Do you also complain about having to spend multiple weeks figuring out how the code actually works? Then why complain about having to spend a day or two trying to get it to compile.
In addition to that, it filters the weak-willed and incompetent from messing with your project, so it's a feature.