On 21/12/14 03:04, meino.cra...@gmx.de wrote:
> Matti Nykyri <matti.nyk...@iki.fi> [14-12-20 19:48]:
>>> On Dec 20, 2014, at 17:56, meino.cra...@gmx.de wrote:
>>>
>>> Dale <rdalek1...@gmail.com> [14-12-20 02:47]:
>>>> meino.cra...@gmx.de wrote:
>>>>> Dale <rdalek1...@gmail.com> [14-12-19 17:08]:
>>>>>> Mick wrote:
>>>>>>> Meino, to avoid misunderstandings: 1. Emerge the new gcc package. 2.
>>>>>>> Use gcc-config to change to the new gcc version. 3. Run 'env-update &&
>>>>>>> source /etc/profile'. 4. Run fix_libtool_files.sh, although I would
>>>>>>> think that this is redundant these days. 5. Unmerge the old gcc version.
>>>>>> I don't recall ever running fix_libtool_files.sh after switching gcc
>>>>>> versions.  Usually when I see a gcc upgrade, I emerge it, switch to it
>>>>>> and the usual profile thing, run emerge -e world JUST to be safe, then
>>>>>> unmerge the old gcc.  That's all I usually do here.  I have skipped the
>>>>>> emerge -e world a time or two.
>>>>>>
>>>>>> Am I just lucky, not likely as some may know, or does emerge -e world
>>>>>> catch it or what?  Now I'm curious.
>>>>>>
>>>>>> Dale
>>>>>>
>>>>>> :-)  :-)
>>>>> Hi Dale,
>>>>>
>>>>> I started compiling the new gcc this morning about ~7:00 AM...just a
>>>>> few minutes ago stage3 finishes. Now ... before doing anything else...
>>>>> I am makeing a backup of all that, so...if anything fails...I am able
>>>>> to reinstall the status quo.
>>>>>
>>>>> I will keep you informed, what happens to my little embedded system...
>>>>>
>>>>> Best 
>>>>> Meino
>>>>
>>>> That's the thing about slow systems, you want to do it right the first
>>>> time because it takes to much time to repeat something.  Heck, I have a
>>>> 4 core AMD CPU with 16GBs of ram here and I still would rather do it
>>>> right the first time.  If you have something slow that takes days to do
>>>> something, you really want plan A to work. 
>>>>
>>>> I'm also wondering if there have been changes to emerge that could make
>>>> a difference.  I run the latest unstable non *9999 version.  I sorta
>>>> like having all the new improvements.  I'm just not sure if that affects
>>>> the issue here is all.
>>>>
>>>> Dale
>>>>
>>>> :-)  :-)
>>>
>>> Hi,
>>>
>>> after a few more non-booting-systems and backup-reinstalls I think
>>> I know whats the reason is...but by I dont know how to get out of it:
>>>
>>> The system becomes inaccessible if I do an env-update and reboot.
>>>
>>> Reason for that are binaries, in which the path to the old gcc is
>>> hardcoded. With the sdcard mounted I checked that with my PC:
>>> I did a 
>>>
>>>    grep -r '\/usr\/lib\/gcc\/armv7a-hardfloat-linux-gnueabi\/4.7.3'
>>>
>>> on ALL files of the sdcard and found "thousands" of hardcoded links
>>> to the old gcc inside binaries...
>>>
>>> The new gcc installed but not doing env-update implies that any
>>> further compilation will link to the old gcc.
>>>
>>> Doing env-update implies a system which will not survive the next
>>> reboot.
>>>
>>> What now?
>>
>> If i understand your situation correctly, do:
>>
>> gcc-config "to set the new version"
>> env-update
>> logout
>> login
>> emerge --deep --update world
>> emerge --depclean
>> revdep-rebuild
>>
>> This will take a long time but will get your system working again. If you 
>> don't wan't to do that you can of course tweak the libraries with binary 
>> tools. That is easy if you know what you are doing.
>>
>> To prevent this in the future always before world update, update gcc and 
>> glibc first if tere is a new version available. Gcc-config is crusial after 
>> you have installed a bew version of gcc.
>>
>> -- 
>> -Matti
> 
> 
> Hi Matti,
> 
> not exactly...
> The sequence you show looks like this in my case:
>  gcc-config "to set the new version"
>  env-update
>  reboot
>  logina attempt: impossible...system does not respond anymore
> 
>  The reason is, that env-update updates to the new compiler, 
>  while some [CENSORED] system tools/application are hardcoded
>  to use the old compiler libraries...
> 
>  If I do a 
> 
>     env-update --no-ldconfig
> 
>  then I am able to reboot successfully...but compilation
>  will be done against the old compiler a fear...
> 
>  I am installing the backup the fourth time today and I am
>  curious, when the first bad sectors of my sdcard will hit me...
> 
> 
> 
>  Best regards,
>  Meino
> 
> 
> 

Nowhere do you say you run the fix utility - even if its run
automatically you will need to run it EACH TIME you run  gcc-config.
Sometimes you wont get a hit, but often it will.  You will also need to
run it at least ONCE against EVERY version of gcc ever installed in that
OS (as it only looks for the old version number you give it.)

gcc-config sets the symlinks to point to the version of gcc you want to
use.  The fix utility changes the library internal gcc libraries to
point to the proper gcc lib.

There have been non-gcc cases where you have to trawl the lib
directories replacing the errant entries where neccessary (libpng anyone :)

BillK



Reply via email to