[SOLVED] Can you safely remove GCC, binutils after LFS installation
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can you safely remove GCC, binutils after LFS installation
I already have LFS working and stable.
I just tested the LFS after removing the usr folder and it was still working. Never mind this, ignore it.
Because gcc(includes/is just a compiler) and binutils a (linker).
I'm just curios can i remove gcc and binutils from LFS. Is it safe to remove it, after removal can i still install upgrade packages without gcc or binutils, on the working and stable LFS that I'm in.
And why do i need gcc, or binutils after LFS installation.
Is it just for development and compiling ,writing programs etc.
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,137
Rep:
If you mean the tools you built in chapter 5 yes you can remove them, but I would tar them up for future use.
If on the other hand you mean the gcc/binutils you built in chapter 6 then no you cant remove them because then you cant build any more software.
I you have removed /usr and your system is still working, its NOT, most software is in /usr if you remove it and your system still works you are not using the /usr you think you are..
If you mean the tools you built in chapter 5 yes you can remove them, but I would tar them up for future use.
If on the other hand you mean the gcc/binutils you built in chapter 6 then no you cant remove them because then you cant build any more software.
I you have removed /usr and your system is still working, its NOT, most software is in /usr if you remove it and your system still works you are not using the /usr you think you are..
Forget the chapters - I already have LFS installed and working.
My questions is - What happens if you remove gcc and binutils. Will the LFS still work, and can i install other favorite packages after this.( I mean directly installing form LFS via - sudo apt-get install something)
I will repeat for the hard of thinking.
WITHOUT GCC/BINUTILS ET AL YOU CAN NOT COMPILE AKA BUILD AND INSTALL SOFTWARE.
If you want to install pre-built software from debian repos with apt-get for example whats the point of using LFS in the first place?
So basically what ur saying is that any Linux Distro example debian - must have gcc/binutils installed in order to get packages installed. So every program that u want to download it requires gcc/binutils, in order to install it.
But the program that I'm downloading for example is already compiled and build, so i only need to install it. Who makes my program installed.
GCC/BINUTILZ IS FOR BUILDING SOFTWARE NOT FOR INSTALLING PREBUILT SOFTWARE
if you are installing pre built software read the above again.
Lol - that's what i said in the first post
- Quote -
"And why do i need gcc, or binutils after LFS installation.
Is it just for development and compiling ,writing programs etc."
- End Quote -
So GCC/BINUTILZ can be removed from LFS( it's objective is to compile, link and via make - build software) and not install per-build software. Is that correct?
LFS is not a prepackaged distribution. You build it from source and because the compilers are tightly knit into the system, you can not remove them or else you will break not only the toolchain, but the underlying libraries that support the core of the system, rendering the system useless.
It is also extremely unwise to import ANY prepackaged software sets into LFS because many of the libraries used are linked against different versions.
All packages built and installed to LFS are all-or-nothing packages very similar to Slackware. There are no broken down -dev, -bin, -lib, -src, -doc, -meta, etc. packages like Debian.
Even if you have completed the entire LFS, BLFS, and even adventured into CBLFS or on your own, you can not remove compilers like GCC and LLVM later on due to the fact many libraries used with each set of compilers would be removed also. Because LFS uses dynamic linking of shared libraries, rather than static, to save tons of space and memory overhead, it's impossible to do so.
It is possible to build a custom LFS, add a package manager and use binaries from an existing (and maintained) distro. But I would not recommend it.
There are a few methods to add a package manager from another distro and/or use binaries from other distros. Makes it easier and faster to upgrade certain software.
Whenever you use a package manager for LFS, just build everything in-house and create your own repository of packages and link the configuration to your repository. Be aware there is ONE royal pain of a package that will require a series of patches to make to portable into a package.
Glibc
There are several patches used by various distributions just to make glibc portable. By nature glibc, when built, hard locks to your system path. If you build it and install it to the DEST= path, the system cache file created by glibc during make install, will hard lock the path to say for example: /tmp/package-glibc rather than /. The same patches are used by roughly every distribution, but are not used by LFS due to the fact its directly built into the main system.
My suggestion, study how glibc is built by distributions like CRUX, Arch, and Slackware, and reincorporate it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.