Hi, I use FreeBSD 13.0-STABLE. When I scan my packages via "pkg check -Bds" command, I got output: (apache-openoffice-4.1.11) /usr/local/openoffice-4.1.11/openoffice4/program/libofficebean.so - required shared library libjawt.so not found Checking all packages: 66% (nvidia-driver-470.86) /usr/local/lib/libnvidia-vulkan-producer.so.1 - required shared library libnvidia-egl-wayland.so.1 not found Checking all packages: 100% llvm13 is missing a required shared library: libcxxrt.so.1 llvm13 is missing a required shared library: libc.so.7 llvm13 is missing a required shared library: libthr.so.3 llvm13 is missing a required shared library: libncursesw.so.9 llvm13 is missing a required shared library: libm.so.5 I search packages with missing libraries, but I can't find. How I can fix it? Thanks for help :-)
I noticed this back in FreeBSD-12. You are not the only one affected by this. Check out whats missing on fully blown (1400 ports) plasma desktop. Funny thing is this desktop and every application is fully functional. However since upgrading to 13 my logs are getting spammed to death with this 'login_getclass: unknown class 'daemon''. Its everywhere and I really don't like it! Excerpt from # pkg info libreoffice FreeBSD_version: 1300139 build_timestamp: 2022-01-23T13:04:42+0000 built_by : poudriere-git-3.3.99.20211017_2 cpe : cpe:2.3:a:libreoffice:libreoffice:7.2.5.2:::::freebsd13:x64 port_checkout_unclean: no port_git_hash : 97dcd5109 ports_top_checkout_unclean: no ports_top_git_hash: c716170c8 repo_type : binary repository : Poudriere This checkout was latest at the time. What follows is a reverse order (sorry) cut and paste from a verbose session with 'pkg check'. # pkg check -dBvx -a llvm10 is missing a required shared library: libcxxrt.so.1 llvm10 is missing a required shared library: libc.so.7 llvm10 is missing a required shared library: libthr.so.3 llvm10 is missing a required shared library: libncursesw.so.9 llvm10 is missing a required shared library: libm.so.5 woff2 is missing a required shared library: libm.so.5 woff2 is missing a required shared library: libcxxrt.so.1 woff2 is missing a required shared library: libc.so.7 Checking timidity-0.2i_1: dependencies... shared libraries...(timidity-0.2i_1) /usr/local/bin/timidity - required shared library libncurses.so.8 not found Checking speech-dispatcher-0.10.2: dependencies... shared libraries...(speech-dispatcher-0.10.2) /usr/local/lib/speech-dispatcher-modules/sd_voxin - required shared library libvoxin.so not found Checking ruby25-bdb-0.6.6_6: dependencies... shared libraries...(ruby25-bdb-0.6.6_6) /usr/local/lib/ruby/site_ruby/2.5/amd64-freebsd11/bdb.so - required shared library libruby25.so.25 not found Checking python27-2.7.18_1: dependencies... shared libraries...(python27-2.7.18_1) /usr/local/lib/python2.7/lib-dynload/_curses.so - required shared library libncursesw.so.8 not found (python27-2.7.18_1) /usr/local/lib/python2.7/lib-dynload/_curses_panel.so - required shared library libpanelw.so.5 not found (python27-2.7.18_1) /usr/local/lib/python2.7/lib-dynload/_curses_panel.so - required shared library libncursesw.so.8 not found Checking py27-cryptography-2.6.1: dependencies... shared libraries...(py27-cryptography-2.6.1) /usr/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so - required shared library libssl.so.9 not found (py27-cryptography-2.6.1) /usr/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so - required shared library libcrypto.so.9 not found Checking py27-cffi-1.12.3: dependencies... shared libraries...(py27-cffi-1.12.3) /usr/local/lib/python2.7/site-packages/_cffi_backend.so - required shared library libffi.so.6 not found Checking p5-Encode-3.07: dependencies... shared libraries...(p5-Encode-3.07) /usr/local/lib/perl5/site_perl/mach/5.28/auto/Encode/Byte/Byte.so - required shared library libperl.so.5.28 not found ----lang/perl is missing one dependancy in no less than 8 different libraries!!!--- (p5-Encode-3.07) /usr/local/lib/perl5/site_perl/mach/5.28/auto/Encode/CN/CN.so - required shared library libperl.so.5.28 not found (p5-Encode-3.07) /usr/local/lib/perl5/site_perl/mach/5.28/auto/Encode/EBCDIC/EBCDIC.so - required shared library libperl.so.5.28 not found (p5-Encode-3.07) /usr/local/lib/perl5/site_perl/mach/5.28/auto/Encode/Encode.so - required shared library libperl.so.5.28 not found (p5-Encode-3.07) /usr/local/lib/perl5/site_perl/mach/5.28/auto/Encode/JP/JP.so - required shared library libperl.so.5.28 not found (p5-Encode-3.07) /usr/local/lib/perl5/site_perl/mach/5.28/auto/Encode/KR/KR.so - required shared library libperl.so.5.28 not found (p5-Encode-3.07) /usr/local/lib/perl5/site_perl/mach/5.28/auto/Encode/Symbol/Symbol.so - required shared library libperl.so.5.28 not found (p5-Encode-3.07) /usr/local/lib/perl5/site_perl/mach/5.28/auto/Encode/TW/TW.so - required shared library libperl.so.5.28 not found (p5-Encode-3.07) /usr/local/lib/perl5/site_perl/mach/5.28/auto/Encode/Unicode/Unicode.so - required shared library libperl.so.5.28 not found Checking libreoffice-7.2.5.2: dependencies... shared libraries...(libreoffice-7.2.5.2) /usr/local/lib/libreoffice/program/libofficebean.so - required shared library libjawt.so not found Checking go-1.17.6,1: dependencies... shared libraries...(go-1.17.6,1) /usr/local/go/src/debug/elf/testdata/gcc-386-freebsd-exec - required shared library libc.so.6 not found Checking aucatctl-0.1_1: dependencies... shared libraries...(aucatctl-0.1_1) /usr/local/bin/aucatctl - required shared library libsndio.so.6.1 not found done ----------------------[1405/1405] Checking zziplib-0.13.72_1: dependencies... shared libraries... done-------------------------
This is a problem with pkg check --shlibs|-B and a problem with ports using -nostdlib -lc... # Bug 243739 comment #11 is a comment I wrote earlier when I did some research on this. # However, I don't remember what it was :)
(In reply to rhs from comment #1) Oh, and as for libperl, please use a tool like `portmaster -r perl` to do something about it :) You can also clean up unnecessary ports/packages with `pkg autoremove`.
'pkg autoremove' was a big help. Had not done that for quite some time. Re-installing pkgs solved all other library issues as reported by 'pkg check [option]'. I used 'pkg install -fR blob' because I build with poudriere. Have not used portmaster in eons. Maybe I should? Thanks for the reply rhs
(In reply to rhs from comment #4) If you are using poudriere, the default behavior is that the package is removed when the library it depends on is version up. When a library is upgraded, the ports that use it will most likely also be bumped to a new portrevision. However, there are uses for poudriere that disrupt its integrity. For example, if we only make packages for ports that are updated with poudriere bulk -S, we can greatly reduce the build time. If you break the integrity in such a way, reconnect steadily. For example (maybe not completely): poudriere ports -l # check if the port tree is appropriate. poudriere ports -u -p default # update by explicitly specifying the default tree pkg info -o port-which-is-missing-shlib # examine origin poudriere bulk -j somejail -C origin-of/port-which-is-missing-shlib # delete the package and rebuild it. pkg install port-which-is-missing-shlib And then port like aucatctl in comment #1 . It has been registered in MOVED for the following reasons, and it is better to delete what has been registered in MOVED. Port: audio/aucatctl Moved: audio/sndio Date: 2020-07-12 Reason: Use sndioctl from audio/sndio instead
Created attachment 231811 [details] patch for ports-mgmt/pkg to make bad values visible llvm uses the following rpath when linking liblldb. -Wl,-rpath,"\$ORIGIN/../lib:\$ORIGIN/../../../../lib:/usr/local/lib" This value will not cause any problems since the system shared libraries cannot be found from STAGEDIR. After the installation, system shared libraris will be found using this value. The function filter_system_shlibs, which excludes system shared libraries used by pkg-check and pkg-create, will not successfully exclude them if they contain this value. As a result, the database will be rewritten so that "missing a required shared library" will be displayed.
Created attachment 231812 [details] experimental patch for ports-mgmt/pkg I don't know if this patch is working correctly. However, the systems libraries seem to be recognized correctly.
pkg-1.19.0 can still reproduce this problem. make -C /usr/ports/devel/llvm15/ pkg-depends deinstall install-package # example of installing llvm15 pkg check -d -n -a # At this point, there is still no problem pkg check -B -n -a # The problem enters with this operation pkg check -d -n -a # This problem is shown attachment 231811 [details] and attachment 231812 [details] can be applied to 1.19.0 without any problems. I think this problem summary should be prefixed with ports-mgmt/pkg:
short anwer here: never ever use pkg check -B if you don't know what you are doing. For Łukasz case: My guess is somone turned on ALLOW_BASE_SHLIBS, which means not packages do require libraries provided by base, except you don't use pkgbase, so pkg cannot find them.