Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Just to clarify profile 17.0 > 17.1 migration procedure
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3367
Location: Gainesville, Florida

PostPosted: Sun Jun 23, 2019 4:43 pm    Post subject: Just to clarify profile 17.0 > 17.1 migration procedure Reply with quote

Current system: default/linux/amd64/17.0/desktop/plasma (stable), using gcc-9.1.0, glibc-2.29-r2, 5.1.12-gentoo x86_64

Just to clarify about the eselect news item on the profile 17.1 migration from 17.0, the following is the complete & correct procedure:

1. Sync and upgrade your system to the newest package versions
to reduce the risk of issues.

2. 17.0 users can skip step 2 as it refers to profile 13.0 systems.

3. Install the tool:

# emerge -1v app-portage/unsymlink-lib

4. Run 'unsymlink-lib --analyze' and check the output for obvious
mistakes. If you need to perform any changes to the system, remember
to run 'unsymlink-lib --analyze' again afterwards.

[past this point do not call emerge or modify /usr manually]

5. This is a very good time to make a backup.

6. Run 'unsymlink-lib --migrate'. You can add '--pretend' first to see
what is going to happen.

7. Reboot your system. Check if important programs work.
In particular, verify that e.g. 'emerge --info' works (but do not
install anything). If you hit any serious problems, you can use
'unsymlink-lib --rollback' to revert the changes and return to
step 4.

8. Run 'unsymlink-lib --finish'. You can add '--pretend' first to see
what is going to happen but note that you're going to see a very long
list of files to remove.

9. Switch the profile, e.g.:
# eselect profile set default/linux/amd64/17.1/desktop ( in my case default/linux/amd64/17.1/desktop/plasma (stable)

[at this point you can start using emerge again]

10. Rebuild the toolchain:

# emerge -1v sys-devel/gcc:8.3.0 (in my case gcc-9.1.0)
[ repeat for other slots you will be using ]

SKIP THIS PART of step 10, or go ahead and do the entire toolchain?
[ if you are upgrading from 13.0 profile, also: ]
# emerge -1v sys-devel/binutils
# emerge -1v sys-libs/glibc

11. If you are using a multilib profile, rebuild all 32-bit packages.
This can be done using:

# emerge -1v --deep /lib32 /usr/lib32 /usr/lib/llvm/*/lib32

(SKIP THIS PART of step 11?)
Alternatively, if you are switching from one of the 13.0 profiles
you can rebuild all packages as detailed in the 17.0 news item:

# emerge -ev @world

12. Once the last 32-bit package is rebuilt, your package manager
should remove the orphaned /lib32 and /usr/lib32 symlinks. If that
does not happen, remove them manually:

# rm /lib32 /usr/lib32


DONE? Any possible conflicts in /etc/portage/make.conf customized USE FLAGS?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.32, gcc-10.2.0, kernel-5.9.1-gentoo, 5.10.0-rc1 USE=experimental
Back to top
View user's profile Send private message
UnclePa
n00b
n00b


Joined: 05 Apr 2019
Posts: 19

PostPosted: Tue Jul 02, 2019 1:59 pm    Post subject: Reply with quote

I'm new to Gentoo and going through this procedure. At step 10. Rebuild the toolchain, there is "[ repeat for other slots you will be using ]". What does that mean? How do I know what slots I will be using?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8056
Location: Austria

PostPosted: Tue Jul 02, 2019 2:04 pm    Post subject: Reply with quote

Code:
$ eshowkw gcc
Keywords for sys-devel/gcc:
            |                             a     |           | 
            |                             m     |           | 
            |                             d   x |           | 
            |                             6   8 |           | 
            |                             4   6 |   u       | 
            | a a   a     p           s r |   | |   n       | 
            | l m   r i   p   h m s   p i f m f | e u s     | r
            | p d a m a p c x p 6 3   a s b i b | a s l     | e
            | h 6 r 6 6 p 6 8 p 8 9 s r c s p s | p e o     | p
            | a 4 m 4 4 c 4 6 a k 0 h c v d s d | i d t     | o
------------+-----------------------------------+-----------+-------
   7.3.0-r3 | + + + + + + + + + + + + + o ~ ~ ~ | 5 o 7.3.0 | gentoo
   7.3.0-r6 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o ~ ~ ~ | 5 o       | gentoo
------------+-----------------------------------+-----------+-------
   7.4.0-r1 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o ~ ~ ~ | 5 # 7.4.0 | gentoo
   7.4.0-r2 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o ~ ~ ~ | 5 o       | gentoo
------------+-----------------------------------+-----------+-------
[I]8.2.0-r5 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o ~ ~ ~ | 5 # 8.2.0 | gentoo
   8.2.0-r6 | + + + + + + + + + + + + + o ~ ~ ~ | 5 o       | gentoo
------------+-----------------------------------+-----------+-------
   8.3.0    | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ o ~ ~ ~ | 5 # 8.3.0 | gentoo
   8.3.0-r1 | + + + + + + + + + ~ + ~ + ~ ~ ~ ~ | 6 o       | gentoo
------------+-----------------------------------+-----------+-------
[I]9.1.0    | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | 6 # 9.1.0 | gentoo
   9.1.0-r1 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | 6 o       | gentoo


Any installed slots of GCC as marked by [I] if you are going to use them going forward.

To see which one is your system compiler:

Code:
$ gcc-config -l
 [1] x86_64-pc-linux-gnu-8.2.0
 [2] x86_64-pc-linux-gnu-9.1.0 *

_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 958

PostPosted: Wed Jul 03, 2019 11:07 am    Post subject: Reply with quote

UnclePa wrote:
I'm new to Gentoo and going through this procedure. At step 10. Rebuild the toolchain, there is "[ repeat for other slots you will be using ]". What does that mean? How do I know what slots I will be using?

Check which profile you are currently using with
Code:
eselect profile list
and look for the asterisk. If you're new to Gentoo you're probably using profile 17.0, in which case step 10 does not apply.
_________________
Greybeard
Back to top
View user's profile Send private message
UnclePa
n00b
n00b


Joined: 05 Apr 2019
Posts: 19

PostPosted: Fri Jul 05, 2019 1:06 pm    Post subject: Reply with quote

Thanks! I'm not familiar with "slot" terminology and didn't see anything in the wiki about it. Two more issues:

gcc-config -l lists both 8.2.0 (with a star beside it) and 8.3.0. AFAIK, I don't need 8.2.0. Do I need to do anything to switch it?

Also, after step 11, I get the following:

Code:
!!! existing preserved libs:
>>> package: dev-libs/icu-64.2
 *  - /usr/lib64/libicudata.so.63
 *  - /usr/lib64/libicudata.so.63.1
 *  - /usr/lib64/libicui18n.so.63
 *  - /usr/lib64/libicui18n.so.63.1
 *      used by /usr/bin/xiphos (app-text/xiphos-4.0.6a-r1)
 *      used by /usr/lib64/libsword.so.1.8.1 (app-text/sword-1.8.1-r1)
 *  - /usr/lib64/libicuuc.so.63
 *  - /usr/lib64/libicuuc.so.63.1
 *      used by /usr/bin/imp2gbs (app-text/sword-1.8.1-r1)
 *      used by /usr/lib64/libsword.so.1.8.1 (app-text/sword-1.8.1-r1)
Use emerge @preserved-rebuild to rebuild packages using these libraries


Do I need to rebuild those as it says?
Back to top
View user's profile Send private message
spork_kitty
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jul 2019
Posts: 124

PostPosted: Fri Jul 05, 2019 8:44 pm    Post subject: Reply with quote

UnclePa wrote:
Thanks! I'm not familiar with "slot" terminology and didn't see anything in the wiki about it. Two more issues:


No big deal. SLOTs are exactly what they sound like: they allow Portage to install two different versions of the same software (assuming its ebuild has been written with SLOT in mind).

UnclePa wrote:

gcc-config -l lists both 8.2.0 (with a star beside it) and 8.3.0. AFAIK, I don't need 8.2.0. Do I need to do anything to switch it?

Also, after step 11, I get the following:

Code:
!!! existing preserved libs:
>>> package: dev-libs/icu-64.2
 *  - /usr/lib64/libicudata.so.63
 *  - /usr/lib64/libicudata.so.63.1
 *  - /usr/lib64/libicui18n.so.63
 *  - /usr/lib64/libicui18n.so.63.1
 *      used by /usr/bin/xiphos (app-text/xiphos-4.0.6a-r1)
 *      used by /usr/lib64/libsword.so.1.8.1 (app-text/sword-1.8.1-r1)
 *  - /usr/lib64/libicuuc.so.63
 *  - /usr/lib64/libicuuc.so.63.1
 *      used by /usr/bin/imp2gbs (app-text/sword-1.8.1-r1)
 *      used by /usr/lib64/libsword.so.1.8.1 (app-text/sword-1.8.1-r1)
Use emerge @preserved-rebuild to rebuild packages using these libraries


Do I need to rebuild those as it says?


`gcc-config -l` showing both is okay. The asterisk is the important part. There is an upgrade guide for GCC on the wiki that does a better job explaining than I can: https://wiki.gentoo.org/wiki/Upgrading_GCC

Generally you should be able to `gcc-config` the compiler you want (try `gcc-config --help`), `. /etc/profile` and `env-update`. Then rebuild @world. The @ character refers to a package set, and @world tends to be automatically selected if you don't feed any package or set names to emerge as arguments. You should be able to read more in `man portage`, `man emerge`, and `man ebuild`. While parts of it may detail the inner workings of ebuilds, that knowledge helps you better understand what's going on, so you can avoid breaking your system. The compiler is one of the few parts of Gentoo that you *can* break so badly you need to reinstall, but in most cases it's avoidable and easy to recover from (just extract another stage3, audit your config, reboot, and try again).

In the case of @preserved-rebuild, it means that shared libraries have updated and packages that depend on them need to be recompiled. It's a completely normal part of adminning a Gentoo machine. Binary distros have to worry about this too, but they handle it before publishing so users never really see it unless they enable a third-party repository that's built against different sonames. Thankfully, Portage does this work for us.

Code:
emerge -a1 @preserved-rebuild


should be enough to give you a prompt to show you what *will* be done (-a, --ask), and prevent the packages from being added to @world (-1, --oneshot).
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 958

PostPosted: Sat Jul 06, 2019 9:48 am    Post subject: Reply with quote

But moving from gcc-8.2.0 to gcc-8.3.0 shouldn't need you to rebuild @world. That's only necessary if the new version of gcc produces programs with a different interface ("ABI" - application binary interface), and that's rare (and is signalled by a change of major release number - would be gcc-10.0.0 or similar in this case), or new features you can take advantage of (typically, optimization for a new processor that you bought before gcc caught up).
_________________
Greybeard
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6874

PostPosted: Sat Jul 06, 2019 9:36 pm    Post subject: Reply with quote

I found I had to `eselect postgresql set` to fix a broken symlink afterwards. It looks like people are having problems with mesa multilib for the same reason. The latter seems like it should be the subject of a sticky thread.

Running `symlinks -r /usr /lib | grep dangling` (app-misc/symlinks) should help root out potential problems.
Back to top
View user's profile Send private message
spork_kitty
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jul 2019
Posts: 124

PostPosted: Sat Jul 13, 2019 7:58 pm    Post subject: Reply with quote

Goverp wrote:
But moving from gcc-8.2.0 to gcc-8.3.0 shouldn't need you to rebuild @world. That's only necessary if the new version of gcc produces programs with a different interface ("ABI" - application binary interface), and that's rare (and is signalled by a change of major release number - would be gcc-10.0.0 or similar in this case), or new features you can take advantage of (typically, optimization for a new processor that you bought before gcc caught up).


In my experience, "should" or "shouldn't" is a matter of ideals clashing with reality. In a perfect world, yes, but upgrades aren't always carried out correctly, or things happen that leave the system in an unknown state. Upstream might get stupid and make a mistake in their release, too. Without knowing the exact state of this guy's machine, I suggested a step that could weed out any potential ABI issues along the way to 17.1. If you or others want to be more cavalier (or if you know you upgraded GCC correctly last time) then by all means skip rebuilding @world. It's not my machine. :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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