The published ffmpeg cannot run on the host, so no benchmark can start #173
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The published upstream cannot start on the host, so
cargo xtask benchcannotrun at all — which is what #116 and #117 are waiting on.
What happens
reference/publishcopiesffmpeg/ffmpegandffmpeg/libout of the image.The binary's
RPATHis the container's absolute/usr/lib/jellyfin-ffmpeg/lib,so on the host it resolves nothing:
LD_LIBRARY_PATHpointing at the copiedlibgets one step further and thenstops:
libbluray.so.2is a system library of the image and was never copied.Both servers refuse to start without an ffmpeg they consider valid, so a run
dies before it measures anything:
xtask bench --ffmpegdefaults to exactly this binary, anddocs/benchmarks.mdsays both servers are pointed at it on purpose — a stock ffmpeg has neither
tonemapxnoralphasrcand earns different arguments. So pointing the run at/usr/bin/ffmpegis a workaround for a search or listing workload and wrong foranything that transcodes.
Where to start
Either the publish stage carries what the binary loads — the rest of the image's
shared libraries beside the ones already copied, with the
RPATHmade relative(
$ORIGIN/../lib) — or the publish writes a launcher beside it that names thedirectory. The first is what makes
--ffmpegmean the pinned encoder; thesecond only makes it start.
Whichever it is,
publishshould refuse rather than write an artifact whoseffmpeg cannot run: it already checks that the stage produced the two files, and
a
-versionthat fails is the same class of failure one step later.House rules
Tests run under
cargo nextest; upstream's source is the checkout inupstream/at the pin. The anchor library and the scripts that stand a pair up on it are
outside the repository;
README.mdsays where.Landed in
0a52954.reference/published/ffmpeg/ffmpegruns on the host now. Anffmpeg-portablestage between
ffmpegandpublishedgathers the closure the binaries load —the four libraries the image installs rather than the package ships, plus what
those name in turn — beside the ones the deb carries, and repoints every binary
and every shipped library at
$ORIGIN.publishruns the result beforerecording it, and reuses an existing artifact only when its encoder still
starts.
Verified:
ffmpeg -versionandffprobe -versionanswer,lddresolveseverything,
tonemapxandalphasrcare both there, a real encode completes,and
cargo xtask benchruns end to end with upstream starting against it.Worth knowing for anyone touching
relocate-ffmpeg.sh:ldconfig -p | awk '... exit'leaves ldconfig writing into a closed pipe, and underpipefailthe SIGPIPE kills the script with status 141 before it can name the library it
was looking for. The cache is read once into a variable and searched from there.