I’m being cynical but my experience of building from source even with automated tools is one where things going wrong and being very difficult to resolve: there’s a cyclic dependency here; this things compiles but won’t link; this thing just segfaults; you need a new version of X to build Y but Z, which is a part of X, needs an old version of Y; I know you wanted to run the latest version of X but author of Y didn’t update it to work with that new version of X so you can’t but that was the whole point of doing this thing in the first place; etc.
Nowadays I avoid building anything from source if there is a binary I can download and everytime I have to build from source I cringe in apprehension as to whether it will work or not. Too often, if something fails, I just give up.
OK, I’m not really this aiming this criticism at the LFS project. I’m really just griping about shitty this aspect of software development in general. People should be working on solutions to these problems. Or maybe this is a problem with me. I’d be interested other’s opinions.
It's easier than building something without dependencies from scratch with Visual C++ :-)
I built an LFS system when it came out years ago and it was a good learning exercise. That's the cool thing here. I wouldn't consider using the system from day to day though.
I agree with your sentiment though. A recent attempt to get sstp-client and NetworkManager-sstp working on CentOS 6.3 resulted in a long stompy walk when I couldn't get it to build without breaking the distribution due to dependency hell. I just chucked Ubuntu on the box in the end and used the vendor provided deb packages. Was much easier :-)
I've build a few LFS systems, knowing for sure I won't use it as a primary system. Nevermind : it's great for educational purpose, and I'm surely more confident in my sysadmin skills since I've did it.
I think it ha a lot to do with almost all of the software being open source. Instead of having management and organized teams we have.. binary based distributions, package management, and other tools like configuration management.
In that context we're really just solving a management problem with engineering! Machines are pretty great at following procedure and ensuring consistency after all.
This isn't just a problem with you, this is really a problem in the ecosystem of build tools, primarily those that target C/C++ code (though the problem exists with other languages and their build tools as well on a lesser scale). And I say this as someone who spent over a decade coding in nothing but C and C++ (thankfully that is in the past).
Go has essentially solved these problems, but only for Go code and in the process threw out (for now, at least) the notion of binary linkable libraries that your code can access, which may or may not be a bad thing depending upon how you feel about dynamically linkable libraries.
I don't think the problem is practically fixable on existing languages whose basic toolset wasn't built to deal with these sort of things. And there is a cultural element in addition to the technical one -- even if you managed to create such a build toolset for languages like C/C++, some (large) subset of C/C++ programmers are going to want to hold on to their hard-won mastery of all things configure/autconf/make and stick with them, even if those tools are all completely horrible (which, IMO, they are).
I built LFS about a year ago. The good thing about it, is that it tells you what specific versions of things you should use, so you know that you won't have a version compatibility issue. The bad thing is, a slightly wrong command at one point in the process leads to a cryptic error down the line.
Does anyone feels LFS leans a bit outside its own point ?
I felt like I was learning more about gcc/make/autoconf more than the OS itself. The relationship between packages, how the OS interacts with hardware was still obscure. After a successful first reboot I tried to build elinks and while it ran, it was broken in many strange ways (tty rendering, dns lookups failing sometime).
It's a inspiring project, but IMHO it could be split into two goals, toolchain/compilation and operating system assembly.
I started writing that I guess I don't know Linux and missed the information LFS conveys.
But I can't shake the feeling that I learned more about independent toolchain than about the OS, and I'm lost trying to understand why a CLI http browser refuse to access some domains for no apparent reason.
I'll read BLFS to see if some part of the knowledge I'm looking is there.
What do you mean by 'independent toolchain'? And what part of the OS were you looking to learn about?
Remember that LFS, despite the name, is not about learning Linux-the-kernel, it's about learning 'Linux-the-operating-system' (which is more precisely referred to as GNU - using 'Linux' to refer to the OS is technically incorrect, though very widespread).
Most of the time this is just a point of either pedantry or politics, but if you want to build your OS from scratch, you really need the entire toolchain[1] if you want to build a 'usable' system.
[1] You can sub parts of other toolchains, so I guess the more correct answer is that you need an entire toolchain, with the GNU tools being the de-facto default toolchain.
Agreed the toolchain is a requirement. But you raise the problem, what LFS teaches you Linux or 'From Scratch' ? I[1] didn't learn about the kernel nor the operating system there. Only about package building. The OS remain a mystery to me for most of its part. See my example about elinks problems.
"Please don't submit comments complaining that a submission is inappropriate for the site. If you think something is spam or offtopic, flag it by going to its page and clicking on the "flag" link. (Not all users will see this; there is a karma threshold.) If you flag something, please don't also comment that you did."
So? I haven't heard of it before, and I doubt if many of my friends have either. Programming landscape is very big now and everyone has a finite amount of time for exploring it. I could use your argument to whine about how so many self proclaimed geeks/hackers don't know about Lisp and keep reinventing wheels all the time.
A simple truth of this site is that most of the people here are young. This means, more or less axiomatically, that they haven't seen all, done all, and been jaded by it.
This means that stuff will be reposted. It means that old stuff will be presented as new. Sometimes it will even be upvoted to the front page. This is not a bug. It is how we have a continuity of community. The new folks need to be brought up to speed. It isn't bad.
I am curious if you realize you dont have to read an article that you have seen before, or about at topic you don't like, or whatever. It is ok. We won't ever know. If we find out, we won't judge you poorly.
There's a tendency here (and yes, reddit) of people submitting, and others upvoting, a random well known thing that happens to be significant in the real world, but with zero actual novelty. The Stallman interview from the 80s that was posted recently comes to mind.
LFS definitely provides an excellent learning opportunity to the beginner. However, I think, considering the clarity of the available documentation, there is little to "think".
Having said that, I have always considered LFS to be a kind of personal linux. For running on servers, I think Gentoo would be the closest to LFS and having well matured tools and package management.
Gentoo is indeed a very nice option in between a bog-standard distro like Ubuntu and LFS. It's easy to customize and tinker with, but still usable on a day-to-day basis.
If you want something in between Gentoo and LFS, you could consider OpenEmbedded, which is a distro builder primarily intended for specialized embedded/low-power hardware, but can easily be repurposed and extended to also build your own x86 desktop distro's, using one of the more generic profiles as a template. It would take a lot of tinkering and learning (but that's the point, right?), but once you have it working it's relatively easy to extend and maintain.
Am I right in saying that Arch still doesn't have package signing by default? I know they've been working on adding it. Until it has that it can't really be used imo.
Yeah, though as ocharles and alexchamberlain (and myself, actually) have mentioned, it has now been implemented as of January 2012. The issue now is that it doesn't seem to be enabled by default (afaik) and doesn't seem to work with all packages.
As for pacman itself - I agree. Great name and one of the fastest package managers I've ever used.
I ran Archlinux for over 6 months. Gentoo is more hacking. I am back to "bog-standard" distro Ubuntu because once you have learned basics you just need a complete user experience and stop wasting time on trivial things.
I personally prefer an "user experience" tailored to my own needs instead of a set of defaults chosen by someone else. Specially when they push you into things like Unity and Pulseaudio.
There are a plenty of choice available when it comes to Linux. The problem is people expect some distribution to behave in certain way which of course doesn't happen as "user experience" is a design choice and not a technological fault.
What do you learn in LFS that you don't learn in Gentoo?
I have started with Gentoo several years ago (and never tried LFS) but I really learned a lot how Linux works. In Gentoo, you can basically do everything. You are just supported in that by a really nice package manager. But you are starting from scratch. You are bootstrapping the system, setting up compiler flags, setting up build flags and decide about every single package you want to have on your system.
Right, and then Portage makes everything and puts it into place. And then you use Gentoo's init scripts. And then you use Gentoo's package manager. And so forth.
What you learn is exactly what it is that the distribution does, which parts of the system are decided by it, which things are convention and which things are configuration.
Gentoo's great, I ran it for several years, but I'm still glad I did LFS one semester and could really see what's going on under the hood.
But nothing is really decided on Gentoo. You can easily use another init-system for example (all the common ones are in Portage). You can also use a different package manager. I recall that there was a famous replacement for emerge; forgot its name right now.
Otherwise, I don't see much difference between
./configure
make install
and
emerge x
Except that in the first case, you have to deal with some exceptions where it doesn't work that way. But not sure if that knowledge is really valuable.
Looks interesting if niche. Somebody should take all the documentation and create gamification experience around it. With levels and all. Maybe even as a submission to the currently running Gamification Coursera class....
I can just imagine: Level one: you managed to download all sources. All the way to "You are the master, you can now serve your own ??? (ruby on rails app?) from your own server".
Then build a community with badges and pledges and things around it. Have a side quest or two for the adventurous players.
When I look for inspiration for new projects or new ideas, I often look out for posts like yours. Things that people would love to have, which don't exist yet and solve a real problem. This is a really great idea... maybe when I have some time to spare somewhere in the near future, I will try to implement something like that :-).
Never underestimate the effect a few tweaks to the ancient parts of your brain can have. As one anecdote, I was quite surprised how much of a difference was made in my motivation by coloring my passing/failing test cases green/red using ANSI escape sequences.
I do it a few years ago (when compiling all of this take 1 day per step). I totally recomend it. It give you the background needed to understand an operate system, unix, kernel, modules/drivers, stdlib, et cetera...
It'd probably take about a week for a noob to get a reasonable desktop up and running with LFS or Gentoo, but that week will be some of the most valuable education about software build processes and operating system design one can find.
I beg to differ. I don't recall how long it took me exactly, but the only thing I learnt about build processes was, both on LFS and Gentoo: if it fails to compile, lookup on google what to do and apply that. If all else fails, edit the code and hope it does not cause a waterfall effct.And I even cared about learning. If you just follow the manual you'll have learned nothing at all.
I spent nearly an entire summer doing this, back after I graduated from High School in 2003. If you just follow the manual and enter the commands blindly, you can do it a lot faster. Instead, I took the time to look up each package I was installing, figure out what it did, why I was installing it, and so forth. Chipped away at it a few hours a week, then went through the process of install X windows, _which was the worst experience of my life_.
When I was just starting with Linux I did it in a week. Most time was spend on waiting for compilations. Second time hug was exploring and learning about stuff that was mentioned.
If you just want to follow the instructions, it's a no brainier in terms that you can do it from start to finish with minimal prior knowledge.
The instructions are very clear and easy to follow, depending on your specs it takes a few days to compile everything. Certainly a week would be enough time.
Well. It's very nice project. Thanks that, I've learnt quite much about building essentional environment. However it's tough as hell. I know pretty much about Linux and Operating Systems, low level programming, but it was just impossible to me to succeed some time ago. I admire anybody who can build it properly. :P
To people who want to give a try I'd say - sure, do it. It's worth it, but don't expect it's going to work. :)
I really liked Linux From Scratch-Couple of years back It helped to build my own distro -Initially It was around 100MB then I tried to trimmed it down to less than 4MB :P . It was fun.anybody wants to try with their vm check this out http://giis.co.in/minili.iso I guess it should work
The newest of those is past the commenting period. That means any discussion on this can't take place there, so you are either advocating that no one else, particularly new people, has anything valid to say, or your are advocating that we should cater specifically to you.
Since neither of these make a lick of sense, what value do you think you are adding?
The two comments that frame this as an over-reaction to a helpful list of links have a valid point. But, for what it's worth, my first read of esolyt's post was that it was a terse reprimand for reposting, and in that mindset I definitely appreciated your reply.
I'm pretty sure that in another time and place (perhaps reddit, several years back) I too would have presumed that esolyt had a friendly intent. I wonder if I've stopped giving the benefit of the doubt in general, or if my perception of the vibe in certain comment threads is darker.
I can't speak for esolyt, but he added value for ME as an avid Linux user who's never compiled from source and is eager to get his hands dirty. After I'm done writing this comment I'm going to visit those threads and comb the comments of those threads for information. No need to be hostile about a link list.
I've built a few LFSs and Gentoo countless times, it was a great learning experience and I learned a lot of command line mad skillz that way. However I wouldn't run a server using it.
Why not a Gentoo server? It has one of the best package managers (portage) and with a decent knowledge of linux you can fix pretty much anything. I always waste time on distros like CentOS because of binary incompatiblity or library versions that are too old for what I need to run. Gentoo is the only distro that I never had the need to override the package manager.
Nowadays I avoid building anything from source if there is a binary I can download and everytime I have to build from source I cringe in apprehension as to whether it will work or not. Too often, if something fails, I just give up.
OK, I’m not really this aiming this criticism at the LFS project. I’m really just griping about shitty this aspect of software development in general. People should be working on solutions to these problems. Or maybe this is a problem with me. I’d be interested other’s opinions.