[Bug 288718] devel/uv: libzstd.so not found when uv is run from an RC script (RPATH not set)

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 07 Aug 2025 16:08:34 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288718

            Bug ID: 288718
           Summary: devel/uv: libzstd.so not found when uv is run from an
                    RC script (RPATH not set)
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr@FreeBSD.org
          Reporter: michaelo@FreeBSD.org
                CC: ports-bugs@FreeBSD.org

Running:
FreeBSD deblndw013x3j.innomotics.net 13.5-STABLE FreeBSD 13.5-STABLE 0106e5d72
GENERIC amd64
cafe-custom-uis@deblndw013x3j:/usr/home/cafe-custom-uis
$ pkg info uv
uv-0.8.3
Name           : uv
Version        : 0.8.3
Installed on   : Thu Aug  7 14:00:40 2025 CEST
Origin         : devel/uv
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : devel
Licenses       : APACHE20, MIT
Maintainer     : yuri@FreeBSD.org
WWW            : https://astral.sh/
Comment        : Extremely fast Python package installer and resolver, written
in Rust
Shared Libs required:
        libc.so.7
        libgcc_s.so.1
        libm.so.5
        libthr.so.3
        libzstd.so.1
Annotations    :
        FreeBSD_version: 1305000
        build_timestamp: 2025-07-26T19:51:18+00:00
        built_by       : poudriere-git-3.4.99.20250724
        port_checkout_unclean: no
        port_git_hash  : a9ed9b78ff42
        ports_top_checkout_unclean: no
        ports_top_git_hash: b1a465aadbc3
        repo_type      : binary
        repository     : cafe-custom-uis
Flat size      : 28.5MiB
Description    :
uv is an extremely fast Python package installer and resolver, written in Rust.
It is designed as a drop-in replacement for `pip` and `pip-compile`.


We use uv to run an application directly from an RC script:
...
pidfile="/var/run/${name}/${name}.pid"
daemon_pidfile="/var/run/${name}/${name}-daemon.pid"
procname="/usr/local/bin/uv"
command="/usr/sbin/daemon"
command_args="-f -p ${pidfile} -P ${daemon_pidfile} -t ${name} -o
${konabeat_logfile} ${procname} run --no-sync celery ...
...
It does not really work and the daemon.log contains:
ld-elf.so.1: Shared object "libzstd.so.1" not found, required by "uv".

It only happens when the jail is restarted. Manual restart from within the jail
does not reveal the problem.

The RPATH in the executable is missing:
root@deblndw013x3j:~
# objdump -x  /usr/local/bin/uv | grep RPATH
root@deblndw013x3j:~

The only viable workaround is to set {name}_env=LD_LIBRARY_PATH=/usr/local/lib
in the RC script.

-- 
You are receiving this mail because:
You are on the CC list for the bug.