# Issue with startxfce4 after version upgrade from 11.4 to 12.2



## rraj (Jan 13, 2022)

Hi

After upgrade from 11.4 to 12.2, running startxfce4 throws following error:
ld-elf.so.1: Shared object “libcrypto.so.8” not found, required by “Xorg”
xinit: giving up
xinit: unable to connect to X server: Operation timed out
xinit: server error

Xorg.0.log can be found at: https://termbin.com/v9rn.


----------



## SirDice (Jan 13, 2022)

You need to reinstall all your ports/packages after a major version upgrade.


----------



## Erichans (Jan 13, 2022)

Also: you might consider upgrading to 12.3-RELEASE; 12.2-RELEASE is EOL as of March 31*, 2022 (see: Supported FreeBSD releases).

* Edit: I misread, that is the _expected EOL_. As 12.3-RELEASE was released and announced on December 7, 2021, the countdown of three months to EOL for 12.2-RELEASE starts from that date.


----------



## rraj (Jan 14, 2022)

SirDice said:


> You need to reinstall all your ports/packages after a major version upgrade.


Made a deinstall & then reinstall pkg through ports. Subsequent pkg upgrade went successfully.

Xfce4 now seems to run as before.

Issue resolved!


----------



## SirDice (Jan 14, 2022)

rraj said:


> Made a deinstall & then reinstall pkg through ports.


No need to deinstall anything. Just `pkg upgrade`, it'll notice there's been a major version change and automatically reinstall everything.


----------



## grahamperrin@ (Jan 14, 2022)

rraj said:


> resolved



Thanks, you can add the _Solved_ prefix to your topic.


----------



## Erichans (Jan 14, 2022)

SirDice said:


> No need to deinstall anything. Just `pkg upgrade`, it'll notice there's been a major version change and automatically reinstall everything.



Going _by the book_, 24.2.3.2. Upgrading Packages After a Major Version Upgrade:


> [...]
> A forced upgrade of all installed packages will replace the packages with fresh versions from the repository even if the version number has not increased. _This is required because of the ABI version change when upgrading between major versions of FreeBSD_. The forced upgrade can be accomplished by performing:
> 
> ```
> ...


(my _emphasis_)

A clean base FreeBSD install contains only pkg(7); when pkg has been bootstrapped, it is "transformed" into pkg(8). This bootstrapping entails that  ports-mgmt/pkg is installed with, for example, the files needed for pkg(8) and pkg-static(8). The file /usr/local/sbin/pkg-static is different from the ordinary pkg file;  however, note that both share the same man page. The difference between pkg(8) and pkg-static(8) is explained in pkg vs pkg-static.


----------



## SirDice (Jan 14, 2022)

If you run `pkg upgrade` after the _second_ `freebsd-update install` then it should work just fine. If you run it after the _third_ `freebsd-update install` then you may need to use `pkg bootstrap -f` or `pkg-static upgrade`. The reason is that after the _third_ install run the old libraries would be removed, which could potentially break the installed pkg(8).

Before a certain version (forgot which version exactly) of pkg(8) it couldn't tell if you did a major version upgrade, hence the use of `pkg-static upgrade -f` in the handbook. The current versions of pkg(8) should be able to detect this and automagically reinstall everything.


----------



## Erichans (Jan 14, 2022)

Thanks for that historical perspective and the current aspects with respect to a possible breaking of pkg(8).

I have a question about this topic. Searching the _man pages_, I could not find any reference as to applying `pkg upgrade` (with or without the "-f") after a FreeBSD (major) update has taken place. Am I overlooking something or, should this aspect "just" be known* to users that operate purely based on "man page information" ?

___
* knowing of ABI changes and that ports depend on it, this is the (logical) conclusion but, I find it strange that it isn't mentioned if only in a single line.


----------



## grahamperrin@ (Jan 14, 2022)

Major upgrades



Erichans said:


> _… man pages_, … Am I overlooking something …



You're probably correct, I suspect that the routine for users of freebsd-update is *not covered*. 

For major upgrades, release notes e.g. <https://www.freebsd.org/releases/12.2R/relnotes/> and <https://www.freebsd.org/releases/13.0R/relnotes/> lean more towards people who upgrade from source.


----------

