[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:32:48 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288718

--- Comment #1 from Michael Osipov <michaelo@FreeBSD.org> ---
Fixed executable:
root@135-release-amd64-default-head:/usr/ports/devel/uv # readelf -d
/wrkdirs/usr/ports/devel/uv/work/target/release/uv

Dynamic section at offset 0x1c0add8 contains 31 entries:
  Tag                Type                  Name/Value
 0x000000000000001d RUNPATH              Library runpath: [/usr/local/lib]
 0x0000000000000001 NEEDED               Shared library: [libthr.so.3]
 0x0000000000000001 NEEDED               Shared library: [libzstd.so.1]
 0x0000000000000001 NEEDED               Shared library: [libgcc_s.so.1]
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]
 0x0000000000000001 NEEDED               Shared library: [libm.so.5]

Add this line to the Makefile:
root@deblndw011x:/var/poudriere/ports/default-head (main *=)
# git diff
diff --git a/devel/uv/Makefile b/devel/uv/Makefile
index 8730516df940..837004ec0e50 100644
--- a/devel/uv/Makefile
+++ b/devel/uv/Makefile
@@ -31,6 +31,8 @@ OPENSSLLIB=   /usr/lib

 PROGS=     uv uvx

+RUSTFLAGS+=    -C link-args=-Wl,-rpath=${LOCALBASE}/lib
+
 PLIST_FILES=   ${PROGS:S/^/bin\//}

 PORTSCOUT= limit:.*\..*$$ # prevent tags like perma-39

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