summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-11-22 14:46:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-11-23 08:47:26 +0100
commit27eb23369f9e250e71cfea8524a71f962e93b8fd (patch)
tree7f4666bcaa80d235a767530d1954470a5d4e74c9 /l10ntools
parent59e25927f4babdc142cdcbd81b5ceb7afe798d02 (diff)
Work around system(3) dropping DYLD_LIBRARY_PATH on macOS
...which caused `make translations` fail for me with > [POT] pot.done > dyld[96290]: Library not loaded: @__VIA_LIBRARY_PATH__/libuno_sal.dylib.3 > Referenced from: <CD4F28D6-E3BE-3126-B861-C90BF3E14492> .../workdir/LinkTarget/Executable/cfgex > Reason: tried: '/System/Volumes/Preboot/Cryptexes/OS@__VIA_LIBRARY_PATH__/libuno_sal.dylib.3' (no such file), '/usr/local/lib/libuno_sal.dylib.3' (no such file), '/usr/lib/libuno_sal.dylib.3' (no such file, not in dyld cache) > Error: Failed to execute .../workdir/LinkTarget/Executable/cfgex -i .../connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu -o .../workdir//pot/connectivity/registry/ado/org/openoffice/Office/DataAccess.pot (This is the opposite case to 17cfd43e28c45626b1e0990bd0e51fdc97409ebe "Avoid external processes picking up instdir/program/libxml2.so.2". Here, the executables called from Executable_localize are LO-internal executables that need the libraries in instdir/. There, the scripts called from Executable_localize in turn only call external tools that shall not accidentally pick up LO-internal libraries from instdir/.) Change-Id: Ib1aa240ee47a21d14ec0463fee85bebe82453cee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143118 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/localize.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index c5ffd6d5c060..96037c991927 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -109,6 +109,11 @@ void handleCommand(
}
else
{
+#if defined MACOSX
+ if (auto const env = getenv("DYLD_LIBRARY_PATH")) {
+ buf.append(OString::Concat("DYLD_LIBRARY_PATH=") + env + " ");
+ }
+#endif
auto const env = getenv("WORKDIR_FOR_BUILD");
assert(env != nullptr);
buf.append(env);