# uninstall gcc

## gentleman

Hi folk,

i currently plan to uninstall the gcc-package from my gentoo-system during removing all compilers from the system. You might say "why then using gentoo anymore". Well I still want to have the USE-flag comfort and build binaries on a seperate system to then with the server only fetch the binary and emerge it with emerge -k binary.

My question: Do I run into great trouble when I do this because - except of portage - important system programs won't work anymore?

----------

## HAL_9000

Try to run the following to see what really would be broken

```
equery depends gcc
```

(equery is a part of app-portage/gentoolkit)

----------

## rman77

You would be better just leaving gcc alone IMHO:

```

equery depends gcc

[ Searching for packages depending on gcc... ]

sys-libs/glibc-2.5-r4 (>=sys-devel/gcc-3.4.4)

                      (arm? >=sys-devel/gcc-4.1.0)

                      (ppc? >=sys-devel/gcc-4.1.0)

                      (ppc64? >=sys-devel/gcc-4.1.0)

sys-libs/libstdc++-v3-3.3.6 (>=sys-devel/gcc-3.3.3_pre20040130)

virtual/libstdc++-3.3 (=sys-devel/gcc-3.3*)

```

Looks to me like you would be playing with fire/asking to bork your system =\

----------

## gentleman

rman77,

my output equals your's. Do you want to say that I should not touch gcc? IMHO the entries only say that the libraries of c and c++ depend on gcc and that the will not run anymore when gcc is missing. Do binaries refer to libstdc or are these libraries only required to compile and link programs?

----------

## rman77

 *Quote:*   

> Do binaries refer to libstdc or are these libraries only required to compile and link programs?

 

These lib's are complied as ".so" or shared objects, for example "/usr/lib/libstdc++-v3/libstdc++.so.5.0.7" so they are loaded when you execute a program, not only at compile time.  However I'm no sure what exactly these library's depend on in gcc so there is a good chance you can remove the gcc package without any negative effects... BUT if removing gcc screws up these lib's you could be in a world of hurt (aka livecd time).  One other thing to note is if you manage to remove gcc and everything still works portage will complain and try to pull it in every time you update because gcc is part of the system profile   :Confused: 

Sorry I cant give you an exact answer, but I hope that helps.Last edited by rman77 on Sun Aug 26, 2007 6:26 pm; edited 1 time in total

----------

## gentleman

 *Quote:*   

>  gcc is part of the system profile

 

Yeah, that would be to change.

----------

## wjb

The question is - if you remove it, then (for some reason) need to get it back, do you know how to do that?

----------

## gentleman

Well I think with the binary of gcc in the bag it should be no problem. As far as everything works correctly in abstinence of gcc and system doesn't break down.

----------

## salam

but very few binary packages exist for gentoo in compare to all available as sources. anyway, has use-flag system any meaning without self-compilation? and point no.3 - the only reason i see for removing gcc is disk space. if you have enough space, there is no reason for it and if not, why not to clean something other(like man pages as on installcd)?

----------

## gentleman

 *salam wrote:*   

> but very few binary packages exist for gentoo in compare to all available as sources. anyway, has use-flag system any meaning without self-compilation? 

 

Hmm, I remember myself to write:

 *gentleman wrote:*   

> You might say "why then using gentoo anymore". Well I still want to have the USE-flag comfort and build binaries on a seperate system to then with the server only fetch the binary and emerge it with emerge -k binary.

 

 *salam wrote:*   

> point no.3 - the only reason i see for removing gcc is disk space. 

 

 *gentleman wrote:*   

> i currently plan to uninstall the gcc-package from my gentoo-system during removing all compilers from the system.

 

For me this is a question of security. If my goal is to harden my system, I have to remove all not-needed software. So debian systems do not need a gcc-compiler. So I think one main difference e.g. between debian and gentoo is portage with compiling source-code. But if I rely to self-compiled binaries I break that difference (at least on the server). But with debian I could not (except of compiling everything by hand) customize my software.

However it would be absolutely mad to test this on a server, so I will do it on one of my locals here in the next days.

----------

