I wonder why i only make topics for crazy weirdos that will break their gentoo...
But here's another "breakmygentoo" thread.

Downgrading glibc is really something you shouldn't do, as it will certainly break your gentoo but if you're like me and know that you will certainly break your gentoo BUT really wish to downgrade glibc anyway, here's how you can do it.

Portage will refuse to do it and stop with a security error message you should really follow instead of this thread.

WARNING: DO NOT DO THIS EXCEPT IF YOU CLEARLY UNDERSTAND THAT YOUR GENTOO WILL BE BROKEN !

So the purpose of this thread is to disable portage security and do downgrade your glibc (and i do hope you know well how your system works else you will just break your gentoo)

In my example i'll switch back from glibc-2.12.1-r1 to glibc-2.11.2

You will have good chance to success if you're just trying to get back to a previous glibc version your system was using, but if you are trying to downgrade to a previous glibc version nothing was build against, you're in the best path to break your system.

You have some safer (if downgrading glibc could be considered safe) ways to do that using another glibc version put on a directory to work with it... But this way is the gentoo way (by gentoo way, i'm not saying gentoo way to do it, as gentoo way is clear: portage don't allow you to do that ! But gentoo way as "doing it with portage"), to just let portage undo a bad glibc upgrade you didn't catch.

0: you better build a livecd, because chance you'll kill your gentoo are more than high

1: backup gcc & glibc

Code:

quickpkg gcc glibc

2: you should find a gcc that was built with the previous glibc, it's best way to success
If you don't know if you have a gcc that was built against a previous glibc then you will get in trouble as you should know what you are doing, else you can try finding it with genlop
2a: finding where the "bad" glibc was emerge

As that gcc version was emerge before the glibc one, it means it still use a previous glibc version, good candidate for me (even i didn't took time to check what glibc was used to build that one at that time, but hey! If you're still reading this, you should know you don't really care to break your gentoo

step3: optional, but this will prevent you getting again in trouble later, mask that fu@@@@@ glibc version

Code:

echo ">sys-libs/glibc-2.12.1" >> /etc/portage/package.mask

(check with an emerge -pv glibc run after that your masking is good, this one work to mask it because 2.12.1-r1 and no 2.12.1 exist)

step4: removing portage security

Code:

cd /usr/portage/sys-libs/glibc/files/eblits
nano pkg_setup.eblit

Now you'll have to find the checking, line 12 for me, you should see the portage warning

Just disable the die (a simple # to comment it out), message will still be output, but portage will continue so. Line will look like that then

Code:

# die "aborting to save your system"

step5: now bypass the portage checksum security

Code:

cd ../..
pwd
## just to output where you should be now
/usr/portage/sys-libs/glibc
ebuild glibc-2.11.2.ebuild digest
>>> Creating Manifest for /usr/portage/sys-libs/glibc

step6: switch to your "should work" gcc version

Code:

gcc-config i686-pc-linux-gnu-4.3.2
source /etc/profile

step7: downgrading glibc THIS IS YOUR LAST CHANCE TO STOP THE CARNAGE !

Code:

emerge -1 glibc

step8: cleaning your toolchain (if you're lucky enough)

Code:

emerge -1 gcc && emerge -1 glibc && emerge -1 gcc

step9:
9a: resync your tree to remove the changes you've made to the manifest & eblit file
9b emerge -e world or look for the thread i've made to rebuild only package that were build against the "bad" glibc version. ->> https://forums.gentoo.org/viewtopic-t-842667.html

I wonder why i only make topics for crazy weirdos that will break their gentoo...

Being personally a krinn's topics reader, I take this as a personal attack I think I should report against !

krinn wrote:

But here's another "breakmygentoo" thread.

What do you mean by another ? (Monty python 4.3 intonation)
Should I understand that the preceeding advice you gave me and other crazy-weirdos (while we were not known by ourselves as crazy-weirdos) was a trick to break our gentoo ?
Hmmm... should report you for this.

krinn wrote:

Downgrading glibc is really something you shouldn't do

Hmmm... who wrote recently some kind of howto I had personally found very interesting about how to restore a system to the state it had on a certain date ?
=> potentially downgrading glibc ?

krinn wrote:

]Portage will refuse to do it and stop with a security error message you should really follow instead of this thread.
WARNING: DO NOT DO THIS EXCEPT IF YOU CLEARLY UNDERSTAND THAT YOUR GENTOO WILL BE BROKEN !

Gonna fill a bug about this and ask for some change in the wording : "Warning : You are following an advice from krinn you crazy weirdos !"
</trolling>
BTW... Thanks for the tip !

You can report all you wish, but after that any mod could only agree with me you're a weirdo now

Guys that need to follow my advices are like me, users that update things without taking care of what they are doing, and then try to undo the mistakes.

I would say, noob user, sadly as i'm not really new at gentoo, i think "lame" may fit better.
So i prefer call me a "weirdo user" than "lame user", it looks more friendly and lesser the shame a bit.

Must be why i can only do howto for only a few audience, the ones as weird as me that keep crashing their gentoo but prefer tweak it to death instead of reinstalling it.
Jesus ! lame & lazy, i really prefer weirdo

Thanks for the info. I'm trying to build Linuxcnc which requires a rtai(realtime) kernel. After trying and fighting kernel/rtai combos for a month, I decided it must be a glib/glibc/gcc issue. Since it builds but always exhibits the same failure during initializing a pci card.

I tried your guide as a last ditch effort. It was a new install, so everything was built against the new glibc. Even sh broke I was adequately warned, no hard feelings. And since it didn't work, I had nothing to loose anyway.

At this point I'm giving up, for now, on building a Gentoo system to run it. I'll have to use the Ubuntu disk it comes with.

Would it be possible to downgrade those packages during the install while still chrooted? Sorry, that answer is way beyond my state of awareness.

I'm sorry, except if you boostrap a new system from stage1 to have your own glibc version, you can't success, as soon as a newer glibc is install and criticals tools are build against it, you're dead. Just as an easy example, gcc should be first program you will rebuild with the downgraded glibc version, but to build it, you will need... gcc, and that gcc will be in a state where it expect all functions, files... that were provided by the newer glibc. Kinda a dead end.

BIG FAT WARNING: WHEN YOU DO THIS WITH GLIBC-2.15--->GLIBC-2.14 THE FIRST THING THAT BREAKES IS BASH!!! _________________"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."

Last edited by Kollin on Sun Apr 01, 2012 3:26 am; edited 1 time in total

The eblit hack don't work with binary packages. In my case, I had to temporary redefine die() in Portage in order to downgrade glibc (gcc was broken with the new version of glibc)._________________Kind regards,
Xavier Miller