Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
A slimmer Gentoo ;)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
sledge
n00b
n00b


Joined: 04 Aug 2003
Posts: 6

PostPosted: Mon Aug 04, 2003 8:39 am    Post subject: A slimmer Gentoo ;) Reply with quote

Size matters. Everbody knows that. 8)

How to install gentoo (stage3) with dietlibc

The easy (time-consuming :wink: ) way:

After you have untared your stage3-tarball you have to emerge dietlibc
Code:
# emerge dietlibc

After that, edit your make.conf and add the following lines anywhere in your make.conf (preferably after the host-settings section):
Code:
# Compiler Setting
# ================
#
# If you want to use a different libc (i.e. fefe`s dietlibc) and
# you are provided with a wrapper script for gcc you want to
# change this line.
#COMPILER="gcc3"
COMPILER="diet"

and change your CFLAGS:
Code:
# I usually compile with -pipe and -fomit-frame-pointer ,too
CFLAGS="-march=your_arch_here -Os"

Now you have to rebuild all you packages (that`s why it`s the time-consuming way :wink: ):
Code:
# export CONFIG_PROTECT="-* /etc/make.conf"
# emerge -uUDep system
( prints packages )
# emerge -uUDe system
( recompiles all (new) packages using dietlibc )
# unset CONFIG_PROTECT


... and continue with step 14 of the Installation Guide.
Don`t forget to backup your make.conf before every portage update. Portage will replace your make.conf with a default one.

Hope that helped :P
Back to top
View user's profile Send private message
sledge
n00b
n00b


Joined: 04 Aug 2003
Posts: 6

PostPosted: Mon Aug 04, 2003 8:46 am    Post subject: Reply with quote

I just noticed that this should have gone into "Installing Gentoo".

Doh! 8O
Back to top
View user's profile Send private message
nikai
Apprentice
Apprentice


Joined: 02 Oct 2002
Posts: 270
Location: Kitzbühel, Austria

PostPosted: Mon Aug 04, 2003 9:31 am    Post subject: Reply with quote

In theory, this is a very nice idea.
But I guess it takes to hack ebuilds to actually use that wrapping.
I see other distros (like ROCK) put a lot of work in getting stuff to compile against dietlibc (like gawk, for example).
Back to top
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Mon Aug 04, 2003 9:51 am    Post subject: Re: A slimmer Gentoo ;) Reply with quote

sledge wrote:
... and continue with step 14 of the Installation Guide.
Don`t forget to backup your make.conf before every portage update. Portage will replace your make.conf with a default one.

No it won't. etc-update might but only if you let it or are careless enough to just let etc-update auto-update all files.

Puggy
_________________
Where there's open source , there's a way.
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Mon Aug 04, 2003 2:06 pm    Post subject: Reply with quote

Moving to Docs, Tips & Tricks.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
DefconAlpha
Apprentice
Apprentice


Joined: 25 Feb 2003
Posts: 151
Location: Alabama

PostPosted: Mon Aug 04, 2003 2:23 pm    Post subject: Ok Reply with quote

So slimmer you say? How big is your install of Dietlibc Gentoo? Do you also have at least an approximation of the size after finishing the stage3 install? With glibc it is almost 1gb, just curious really.
_________________
In the end, the love you get is equal to the love you make
--John Lennon & Paul McCartney (The End - Abbey Road,
Back to top
View user's profile Send private message
Chickpea
l33t
l33t


Joined: 03 Jun 2002
Posts: 846
Location: Vancouver WA

PostPosted: Mon Aug 04, 2003 2:47 pm    Post subject: Reply with quote

DefconAlpha wrote

Quote:
So slimmer you say? How big is your install of Dietlibc Gentoo? Do you also have at least an approximation of the size after finishing the stage3 install? With glibc it is almost 1gb, just curious really


yours is really that high with only a base system...Stage 3? my system currently is at 1.1 gb and that is with X, evolution, a couple of window managers gedit, and Mozillafirebird and some other fun things.
Back to top
View user's profile Send private message
DefconAlpha
Apprentice
Apprentice


Joined: 25 Feb 2003
Posts: 151
Location: Alabama

PostPosted: Mon Aug 04, 2003 5:48 pm    Post subject: Reply with quote

Chickpea wrote:

yours is really that high with only a base system...Stage 3? my system currently is at 1.1 gb and that is with X, evolution, a couple of window managers gedit, and Mozillafirebird and some other fun things.


Umm, i think so, perhaps it was more in the 600 - 700 MB range. But i have slept since then. Like several months worth of sleeping. (Not to mention several other memory-degrading activities)...

Now to get linux on two floppies with dietlibc. Then we can install gentoo on non-cdrom booting computers :)
_________________
In the end, the love you get is equal to the love you make
--John Lennon & Paul McCartney (The End - Abbey Road,
Back to top
View user's profile Send private message
Chickpea
l33t
l33t


Joined: 03 Jun 2002
Posts: 846
Location: Vancouver WA

PostPosted: Mon Aug 04, 2003 6:14 pm    Post subject: Reply with quote

Quote:
Now to get linux on two floppies with dietlibc. Then we can install gentoo on non-cdrom booting computers :)


can't you just create a grub boot disk and install from a network or hard drive. I installed a couple of times from a spare hard drive...but it has been so long.
Back to top
View user's profile Send private message
Gibberx
Apprentice
Apprentice


Joined: 20 Oct 2002
Posts: 217
Location: UMBC

PostPosted: Tue Aug 05, 2003 12:48 am    Post subject: Reply with quote

..what is dietlibc? sounds like a replacement of glibc, of course...

does it make your binaries smaller, or what?
Back to top
View user's profile Send private message
imp
n00b
n00b


Joined: 03 Dec 2002
Posts: 45
Location: Belgrade, SCG

PostPosted: Thu Aug 07, 2003 3:13 pm    Post subject: Reply with quote

From diet libc homepage:
Quote:
The diet libc is a libc that is optimized for small size. It can be used to create small statically linked binaries for Linux on alpha, arm, hppa, ia64, i386, mips, s390, sparc, sparc64, ppc and x86_64.

_________________
blog :: bookmarks
Back to top
View user's profile Send private message
DefconAlpha
Apprentice
Apprentice


Joined: 25 Feb 2003
Posts: 151
Location: Alabama

PostPosted: Fri Aug 08, 2003 7:17 pm    Post subject: Reply with quote

Chickpea wrote:
can't you just create a grub boot disk and install from a network or hard drive. I installed a couple of times from a spare hard drive...but it has been so long.


Yes, but it would be really nice to have the two floppies that did all of the above... Boot from the floppies and install from cdrom, network, spare hard drive, etc. Anything really... Perhaps even modify the second floppy for clustering utilities or small servers (dhcp, iptables, ftp, mail, etc)

Just a nifty thing to have lying around for "one of those days"
_________________
In the end, the love you get is equal to the love you make
--John Lennon & Paul McCartney (The End - Abbey Road,
Back to top
View user's profile Send private message
simcop2387
Apprentice
Apprentice


Joined: 14 Aug 2002
Posts: 200
Location: Galactic Sector ZZ9 Plural Z Alpha

PostPosted: Sat Aug 09, 2003 8:56 pm    Post subject: Reply with quote

seldge i got to hand it to you so far my laptop has been recompiling system and its not even near done and i've got 40+ meg more of free space, everything appears to be working right now, when i'm done i'm doing an emerge world to get X and everything compiled with dietlibc, i was running near 25meg free before this
Back to top
View user's profile Send private message
someguy
Guru
Guru


Joined: 10 Jul 2003
Posts: 433
Location: (-_-) .::OH_WELL::. (-_-)

PostPosted: Tue Sep 16, 2003 8:25 am    Post subject: Reply with quote

wow good howto saving me space on my router :)
_________________
print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<>
)]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`
while [ 1 ] ; do echo "*" | telnet ip.of.print.er 9100 ; done
Back to top
View user's profile Send private message
ghardey
n00b
n00b


Joined: 11 Jun 2003
Posts: 15

PostPosted: Thu Dec 18, 2003 3:08 am    Post subject: fomit-frame-pointer caused compiler cannot create executable Reply with quote

Quote:
and change your CFLAGS:
Code:
Code:
# I usually compile with -pipe and -fomit-frame-pointer ,too
CFLAGS="-march=your_arch_here -Os"


When I tried using the -fomit-frame-pointer flag I got an error "C compiler cannot create executable" when emerging gnet. config.log showed that it didn't like -fomit-frame-pointer. After I removed that flag emerged without error using dietlibc 0.23.
Back to top
View user's profile Send private message
dub.wav
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2003
Posts: 149
Location: Norway

PostPosted: Fri Dec 19, 2003 8:21 am    Post subject: Re: A slimmer Gentoo ;) Reply with quote

sledge wrote:
Now you have to rebuild all you packages (that`s why it`s the time-consuming way :wink: ):
Code:
# export CONFIG_PROTECT="-* /etc/make.conf"
# emerge -uUDep system
( prints packages )
# emerge -uUDe system
( recompiles all (new) packages using dietlibc )
# unset CONFIG_PROTECT

If you have to rebuild the whole system, why not just start from stage1? :?
Back to top
View user's profile Send private message
Aaron_Brown
n00b
n00b


Joined: 29 Mar 2003
Posts: 14

PostPosted: Sat Dec 20, 2003 10:34 am    Post subject: Reply with quote

After I have compiled everything with dietlibc can I remove glibc?

Aaron
Back to top
View user's profile Send private message
_hesoez_
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2003
Posts: 103
Location: Belgium-Duffel/Leuven

PostPosted: Thu Dec 25, 2003 3:21 pm    Post subject: Reply with quote

is it normal that i still see 'gcc ... -Os -... blabla.c'
as an output on the screen when compiling something?

can i let another box that doesn't have dietlibc compile for my box with dietlibc when using distcc?

grtz
Back to top
View user's profile Send private message
airflow
Apprentice
Apprentice


Joined: 14 Dec 2003
Posts: 173
Location: Vienna, Austria

PostPosted: Fri Dec 26, 2003 8:19 pm    Post subject: Re: A slimmer Gentoo ;) Reply with quote

dub.wav wrote:
sledge wrote:
Now you have to rebuild all you packages (that`s why it`s the time-consuming way :wink: ):
Code:
# export CONFIG_PROTECT="-* /etc/make.conf"
# emerge -uUDep system
( prints packages )
# emerge -uUDe system
( recompiles all (new) packages using dietlibc )
# unset CONFIG_PROTECT

If you have to rebuild the whole system, why not just start from stage1? :?


Because as far as I know you wouldn't have the possibility to emerge dietlibc before bootstrapping. So you would have to bootstrap twice... Better to start with a Stage-3 Installation in this case, I think.

regards,
airflow
Back to top
View user's profile Send private message
airflow
Apprentice
Apprentice


Joined: 14 Dec 2003
Posts: 173
Location: Vienna, Austria

PostPosted: Sun Dec 28, 2003 2:51 pm    Post subject: Re: A slimmer Gentoo ;) Reply with quote

sledge wrote:
After that, edit your make.conf and add the following lines anywhere in your make.conf (preferably after the host-settings section):
Code:
# Compiler Setting
# ================
#
# If you want to use a different libc (i.e. fefe`s dietlibc) and
# you are provided with a wrapper script for gcc you want to
# change this line.
#COMPILER="gcc3"
COMPILER="diet"


Are you sure this works? I had a look into the manpage of make.conf, and this (rather important) variable is not mentioned anywhere... I would like to try it, but it will take a week or so to recompile my system with my laptop, so I would like to be sure.

regards,
airflow
Back to top
View user's profile Send private message
Serj
n00b
n00b


Joined: 04 Aug 2003
Posts: 46
Location: Ukraine

PostPosted: Mon Jul 12, 2004 12:13 pm    Post subject: Reply with quote

Anyway, did anybody try dietlibc?
Does it work now with 2004.1?
Does all packages compile well with dietlibc?

P.S. Sorry for my English!
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Tue Jul 13, 2004 1:24 am    Post subject: Re: A slimmer Gentoo ;) Reply with quote

sledge wrote:
Don`t forget to backup your make.conf before every portage update. Portage will replace your make.conf with a default one.

what horrible nonsense. i'm not taking any advice from someone who doesn't even know about etc-update/dispatch-conf :roll:
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
Serj
n00b
n00b


Joined: 04 Aug 2003
Posts: 46
Location: Ukraine

PostPosted: Tue Jul 13, 2004 6:24 am    Post subject: Reply with quote

Yestarday, I'v try to use diet to reemerge some packages as writing above but nothing happend - the size of binaries have stay the same.

Does anybody now how to use diet in Gentoo 2004.1?
Back to top
View user's profile Send private message
SDraconis
n00b
n00b


Joined: 20 Apr 2005
Posts: 53

PostPosted: Wed Jun 08, 2005 8:08 am    Post subject: Reply with quote

It looks like this thread it pretty old. I was wondering if anybody has had any luck with this in more recent versions of Gentoo. Does setting COMPILER in make.conf work to have things compile with dietlibc still?
Back to top
View user's profile Send private message
Jeffrey0
n00b
n00b


Joined: 31 Dec 2004
Posts: 68

PostPosted: Sat Jun 11, 2005 5:01 am    Post subject: Re: A slimmer Gentoo ;) Reply with quote

Quote:
It looks like this thread it pretty old. I was wondering if anybody has had any luck with this in more recent versions of Gentoo. Does setting COMPILER in make.conf work to have things compile with dietlibc still?

I can't find any matches for COMPILER in all of portage... don't think it does anything. Looks like the new way is using profiles. There's one for uclibc.

kamagurka wrote:
what horrible nonsense. i'm not taking any advice from someone who doesn't even know about etc-update/dispatch-conf :roll:

Look at the date. Portage updates *did* overwrite make.conf back then IIRC (used Gentoo for a little while back in 2003).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum