Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gcc4 to gcc5 upgrade
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Tue Sep 20, 2016 10:11 am    Post subject: gcc4 to gcc5 upgrade Reply with quote

i have a newly minted gentoo install from scratch (my second one, on my main rig now), clean booting and configured almost just the way i want.. still finishing up.

i did notice this particular news item during install. i wasn't getting any of those errors though. so i didn't rebuild that symbol. but i did select gcc5, did a revdep-rebuild, and unmerged gcc4. so i have only one gcc on my system.

i wanted my gentoo to be clean. so i did a sync and upgrade. additionally, i also just finished an "emerge -e world". whew, didn't know it would take so long.. or i would have just reinstalled again from scratch. but wait i just did that. why does the installer contain *old* stuff?

anyway, moving on to my issue.. i hit this forum thread. op was spot on about one thing relevant to me.
Code:
# revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc

dufeu wrote:
[*]Running the command again always starts at the beginning. There is no intelligence in the command to ignore packages which have already been successfully rebuilt using the new gcc-5.3. If you've already tried running the command again, you already know this


i liked his train of thought and detailed explanation, but didn't fancy those further gui workarounds ;) sounds oh so windowish. khayyam's response was very educational and useful. and with those two, i created my own :)
josephg wrote:
so i'm picking up from both of you above, and end up with this one liner ;) problem solved?

Code:
# revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc --pretend | awk '/^\[/{print "="$4}' | xargs emerge -1


now my question is this: running the above command piped into emerge shouldn't emerge the already emerged packages, should it? so why is that command emerging 74 packages on an almost freshly installed gentoo, and just after an "emerge -e world"? i wonder if something on my setup is not quite right.

ps: my only issue with gentoo is that my laptop always seems to be burning itself down, whenever i'm on gentoo.. probably because i am compiling stuff all the time. on my debian and arch systems, i'm usually at the bottom of the resource usage levels. in gentoo, i seem to be always at the top ;) boy, am i glad that i found that portage niceness


Last edited by josephg on Tue Apr 18, 2017 5:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Tue Sep 20, 2016 7:11 pm    Post subject: Reply with quote

Part of the reason why it's having to recompile so much is because gcc-5 changed the default ABI than what gcc-4 was using (not compatible with each other). So when you graded to gcc-5, you effectively have to recompile a lot of the system, so that the programs/libraries are compatible with the new system format.

Quote:
ps: my only issue with gentoo is that my laptop always seems to be burning itself down, whenever i'm on gentoo.. probably because i am compiling stuff all the time. on my debian and arch systems, i'm usually at the bottom of the resource usage levels. in gentoo, i seem to be always at the top ;) boy, am i glad that i found that portage niceness


This ends up being one of the biggest differences between a source built and a pre-compiled distro, is specifically that source built is much more intensive on resources when you are compiling stuff (same effect when you compile your own programs, it'll use more resources).
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Wed Sep 21, 2016 2:02 am    Post subject: Reply with quote

As I read the quoted xargs-based command, yes, it could recompile even when that is useless. The first part generates a list of packages that use libstdc++.so.6. The second part does some minor text transforms. The third part runs emerge with the transformed text as arguments. Nothing in that command filters the list or protects against recently rebuilt packages. Your only protection is if revdep-rebuild declined to print packages for which a rebuild would be useless. As I understand the situation, both affected and rebuilt packages use libstdc++.so.6, so revdep-rebuild would be correct to print even packages for which a rebuild is useless.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Wed Sep 21, 2016 3:31 am    Post subject: Reply with quote

just to let you all know that this issue seems to have gone away. i can run that command many times, and there is nothing to emerge. this is what i expect. emerge should not emerge packages which have been emerged and no changes.
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4554
Location: Germany

PostPosted: Wed Sep 21, 2016 4:18 am    Post subject: Reply with quote

Please try to understand what the command does.
revdep-rebuild --help wrote:
-L LIBRARY, --library LIBRARY
Unconditionally emerge existing packages that use the
library with NAME. NAME can be a full path, full or
partial name

One successful rebuild with the new gcc is enough.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Thu Sep 22, 2016 4:59 pm    Post subject: Reply with quote

which is why, if you look at the full command, it is not revdep-rebuild, but the emerge at the end of the pipe chain actioning the emerge.
_________________
"Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Fri Sep 23, 2016 2:37 am    Post subject: Reply with quote

Yes, and if you look at the full command, that emerge is run on a set of packages chosen by the earlier parts of the pipeline. It is not allowed to compute what should and should not be built. It is simply told to build the packages listed by the pipeline. The list is generated by revdep-rebuild which, as Josef.95 mentioned, is invoked in a way that does not perform the filtering you want.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Fri Sep 23, 2016 4:44 am    Post subject: Reply with quote

thanks Hu. as i said above, the issue has gone away. emerge doesn't compile packages compiled recently, if no change. and i'm happy with this. i can't recreate that issue anymore, unless perhaps i start installing from scratch again.

all i can now comment is that the install images have the latest/recommended gcc, etc. so someone/newbie like me doesn't get thrown into gcc upgrades during a gentoo install.
_________________
"Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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