Bug 281587 - Port emulators/linux-rl9 ldd does not recognize shared libraries (.so) in /compat/linux directory
Summary: Port emulators/linux-rl9 ldd does not recognize shared libraries (.so) in /co...
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-19 10:52 UTC by ykla
Modified: 2024-09-20 15:02 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (emulation)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ykla 2024-09-19 10:52:04 UTC
FreeBSD does not recognize shared libraries (.so) in /compat/linux directory in Port emulators/linux-rl9.


-------------------------------
root@ykla:~ # uname -r
14.0-RELEASE
# sysrc linux_enable="YES"
# sysrc kld_list+="linux linux64"
# kldload linux64
# service linux start
# pkg install linux-rl9
# cd /usr/ports/emulators/linux-rl9/ 
# make install clean
# sysrc dbus_enable="YES" 
# service dbus start 
# dbus-uuidgen > /compat/linux/etc/machine-id
# sysrc linux_mounts_enable="YES"
# reboot
root@ykla:/ # fetch https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.12_240919_x86_64_01.rpm
root@ykla:/compat/linux # pkg install archivers/rpm4 libc6-shim
root@ykla:/compat/linux # rpm2cpio < /QQ_3.2.12_240919_x86_64_01.rpm  | cpio -id
./usr/share/icons/hicolor/512x512/apps/qq.png: Cannot extract through symlink usr/share/icons/hicolor/512x512/apps/qq.png
1040641 blocks
root@ykla:/compat/linux # ldd opt/QQ/qq
opt/QQ/qq:
	libffmpeg.so => /compat/linux/opt/QQ/libffmpeg.so (0x6f9758d1000)
	libdl.so.2 => not found (0)
	libpthread.so.0 => not found (0)
	libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x6f975e0d000)
	libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0 (0x6f976df2000)
	libgio-2.0.so.0 => /usr/local/lib/libgio-2.0.so.0 (0x6f9828cc000)
	libnss3.so => /usr/local/lib/libnss3.so (0x6f9833f2000)
	libnssutil3.so => /usr/local/lib/libnssutil3.so (0x6f984091000)
	libsmime3.so => /usr/local/lib/libsmime3.so (0x6f984a1b000)
	libnspr4.so => /usr/local/lib/libnspr4.so (0x6f984d93000)
	libdbus-1.so.3 => /usr/local/lib/libdbus-1.so.3 (0x6f9864c9000)
	libatk-1.0.so.0 => /usr/local/lib/libatk-1.0.so.0 (0x6f984ffd000)
	libatk-bridge-2.0.so.0 => /usr/local/lib/libatk-bridge-2.0.so.0 (0x6f9859cb000)
	libcups.so.2 => /usr/local/lib/libcups.so.2 (0x6f987ce9000)
	libgtk-3.so.0 => not found (0)
	libpango-1.0.so.0 => not found (0)
	libcairo.so.2 => /usr/local/lib/libcairo.so.2 (0x6f98658a000)
	libX11.so.6 => /usr/local/lib/libX11.so.6 (0x6f987203000)
	libXcomposite.so.1 => not found (0)
	libXdamage.so.1 => not found (0)
	libXext.so.6 => /usr/local/lib/libXext.so.6 (0x6f987e81000)
	libXfixes.so.3 => /usr/local/lib/libXfixes.so.3 (0x6f98848f000)
	libXrandr.so.2 => not found (0)
	libgbm.so.1 => not found (0)
	libdrm.so.2 => not found (0)
	libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x6f988ae5000)
	libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0x6f9890a4000)
	libxkbcommon.so.0 => not found (0)
	libasound.so.2 => /usr/local/lib/libasound.so.2 (0x6f989b2f000)
	libatspi.so.0 => /usr/local/lib/libatspi.so.0 (0x6f989ecd000)
	libm.so.6 => not found (0)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x6f98a652000)
	libc.so.6 => not found (0)
	ld-linux-x86-64.so.2 (0)
	libpthread.so.0 => not found (0)
	libm.so.6 => not found (0)
	libc.so.6 => not found (0)
	libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x6f98b206000)
	libintl.so.8 => /usr/local/lib/libintl.so.8 (0x6f98c3b6000)
	libpcre2-8.so.0 => /usr/local/lib/libpcre2-8.so.0 (0x6f98cbda000)
	libutil.so.9 => /lib/libutil.so.9 (0x6f98bcce000)
	libthr.so.3 => /lib/libthr.so.3 (0x6f98d030000)
	libc.so.7 => /lib/libc.so.7 (0x6f98d8a0000)
	libffi.so.8 => /usr/local/lib/libffi.so.8 (0x6f98f324000)
	libgmodule-2.0.so.0 => /usr/local/lib/libgmodule-2.0.so.0 (0x6f98e37f000)
	libz.so.6 => /lib/libz.so.6 (0x6f990231000)
	libplc4.so => /usr/local/lib/libplc4.so (0x6f99043e000)
	libplds4.so => /usr/local/lib/libplds4.so (0x6f990a7e000)
	libdl.so.1 => /usr/lib/libdl.so.1 (0x6f991532000)
	libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x6f991b90000)
	libavahi-common.so.3 => /usr/local/lib/libavahi-common.so.3 (0x6f99242a000)
	libavahi-client.so.3 => /usr/local/lib/libavahi-client.so.3 (0x6f992bac000)
	libgnutls.so.30 => /usr/local/lib/libgnutls.so.30 (0x6f992ffa000)
	libm.so.5 => /lib/libm.so.5 (0x6f994c75000)
	libcrypt.so.5 => /lib/libcrypt.so.5 (0x6f993f0e000)
	libpixman-1.so.0 => /usr/local/lib/libpixman-1.so.0 (0x6f995098000)
	libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0x6f9955c2000)
	libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x6f996b86000)
	libEGL.so.1 => /usr/local/lib/libEGL.so.1 (0x6f995c52000)
	libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x6f997b74000)
	libxcb-shm.so.0 => /usr/local/lib/libxcb-shm.so.0 (0x6f998fd0000)
	libxcb-render.so.0 => /usr/local/lib/libxcb-render.so.0 (0x6f997ef9000)
	libXrender.so.1 => /usr/local/lib/libXrender.so.1 (0x6f998c4d000)
	libGL.so.1 => /usr/local/lib/libGL.so.1 (0x6f99a0f2000)
	libXau.so.6 => /usr/local/lib/libXau.so.6 (0x6f999b0d000)
	libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x6f99a9e3000)
	librt.so.1 => /lib/librt.so.1 (0x6f99b993000)
	libXi.so.6 => /usr/local/lib/libXi.so.6 (0x6f99c219000)
	libelf.so.2 => /lib/libelf.so.2 (0x6f99d1d7000)
	libp11-kit.so.0 => /usr/local/lib/libp11-kit.so.0 (0x6f99d1f8000)
	libidn2.so.0 => /usr/local/lib/libidn2.so.0 (0x6f99d62a000)
	libunistring.so.5 => /usr/local/lib/libunistring.so.5 (0x6f99f2a7000)
	libtasn1.so.6 => /usr/local/lib/libtasn1.so.6 (0x6f99d844000)
	libnettle.so.8 => /usr/local/lib/libnettle.so.8 (0x6f99e2f3000)
	libhogweed.so.6 => /usr/local/lib/libhogweed.so.6 (0x6f99feac000)
	libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x6f9a02a6000)
	libbz2.so.4 => /usr/lib/libbz2.so.4 (0x6f9a145e000)
	libbrotlidec.so.1 => /usr/local/lib/libbrotlidec.so.1 (0x6f9a1053000)
	libGLdispatch.so.0 => /usr/local/lib/libGLdispatch.so.0 (0x6f9a287c000)
	libGLX.so.0 => /usr/local/lib/libGLX.so.0 (0x6f9a15c4000)
	libbrotlicommon.so.1 => /usr/local/lib/libbrotlicommon.so.1 (0x6f9a2220000)
	[vdso] (0x6f974b97000)
--------------------------------------------
Comment 1 ykla 2024-09-19 13:08:15 UTC
After further testing, it was determined that the issue lies with the ldd tool, which incorrectly shows missing glibc libraries. However, the software itself does not actually lack these libraries. Nonetheless, this is still considered a bug, as it seems to work correctly within the CentOS compatibility layer.
Comment 2 Tatsuki Makino 2024-09-20 06:55:58 UTC
Which ldd do you use?

We need to make sure that ldd in /compat/linux/usr/bin/ldd is used, or that ldd is invoked from a Linux program such as /compat/linux/usr/bin/bash.

I have also done it with /usr/bin/ldd on FreeBSD, but that's my conclusion :)

Then, if the library is missing, we have to find the package that contains it and extract it.
Comment 3 Fernando Apesteguía freebsd_committer freebsd_triage 2024-09-20 15:02:58 UTC
(In reply to Tatsuki Makino from comment #2)
Exactly, you need to use the ldd from the linuxolator to get meaninful results. It is not a bug, but the way the Linux emulation work.
This is also true for other things like configuration files: A command/application running inside the Linux emulation uses the files in the compat linux prefix *before* using the system-wide configuration files.