weird packages/libs behavior: /usr/local/lib/ Undefined symbol "_ZNSt19bad_optional_accessD1Ev"

From: Eugene M. Zheganin <>
Date: Thu, 17 Mar 2022 19:33:51 UTC

recently I've upgraded my desktop FreeBSD from 12.1 to 13.0 (make 
delete-old/delete old-libs included). Everything was fine until I broke 
some package dependencies (not actually related to OS upgrade, at least 
I believe so) and then I decided to completely update/reinstall KDE 
(since it was qt5 that was broken).

Since this usually takes great amount of  time, I just pkg installed all 
the stuff. But now no matter I'm doing I get for qt/kde-dependent binaries:

[emz@bsdrookie:~]> konsole /usr/local/lib/ Undefined symbol 

How do I fix this ? /usr/local/lib/ is from 
devel//usr/local/lib/ port; I've rebuilt it already 
from ports - the issue stil persists.

I'm kinda stuck.