This commit is contained in:
parent
8603182caf
commit
40e094f7eb
2 changed files with 10 additions and 6 deletions
|
|
@ -295,9 +295,9 @@ jobs:
|
|||
rsync -a --delete content/ /deploy-app/content/
|
||||
# The server links libmsquic as a SHARED lib out of crafter-build's
|
||||
# external cache; the RUNPATH into that cache only exists on this
|
||||
# build machine. The binary carries an $ORIGIN rpath (project.cpp),
|
||||
# so the .so must travel with it. install dereferences the
|
||||
# libmsquic.so.2 -> .so.2.x.y symlink into a regular file.
|
||||
# build machine. The binary carries an rpath to /srv/catcrafts-app
|
||||
# (project.cpp), so the .so must travel with it. install dereferences
|
||||
# the libmsquic.so.2 -> .so.2.x.y symlink into a regular file.
|
||||
MSQ=$(find ~/.cache/crafter.build/external -name 'libmsquic.so.2*' -type f | head -1)
|
||||
if [ -z "$MSQ" ]; then
|
||||
echo "ERROR: libmsquic.so.2 not found in the external build cache." >&2
|
||||
|
|
|
|||
10
project.cpp
10
project.cpp
|
|
@ -137,9 +137,13 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
|
|||
// libmsquic.so.2 is built in crafter-build's external cache, and the
|
||||
// RUNPATH pointing there only exists on the build machine — the first
|
||||
// deploy to a real host died in the loader (exit 127) because of it.
|
||||
// $ORIGIN makes the loader also look next to the binary itself, and CI
|
||||
// ships the .so alongside it into /srv/catcrafts-app.
|
||||
cfg.linkFlags.push_back("-Wl,-rpath,$ORIGIN");
|
||||
// CI ships the .so alongside the binary into /srv/catcrafts-app, and
|
||||
// this rpath makes the loader look there. The path is spelled out
|
||||
// rather than $ORIGIN: the flag passes through a shell on its way to
|
||||
// the linker, where $ORIGIN expands to empty — leaving a bare -rpath
|
||||
// that swallows the next input file (libCatcrafts.Shared.a) and fails
|
||||
// the link with every Shared symbol undefined.
|
||||
cfg.linkFlags.push_back("-Wl,-rpath,/srv/catcrafts-app");
|
||||
|
||||
ApplyReleaseTrimming(cfg);
|
||||
return cfg;
|
||||
|
|
|
|||
Loading…
Reference in a new issue