When building Firebird 3.0.7 as part of LibreOffice, we noticed occasional build
failures like <https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/96392/>
> error: unable to open output file '/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/UnpackedTarball/firebird/temp/Debug/cloop/release/tests/test1/CTest.o': 'No such file or directory'
> 1 error generated.
> Makefile:72: recipe for target '/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/UnpackedTarball/firebird/temp/Debug/cloop/release/tests/test1/CTest.o' failed
and while target "all" depends on target "mkdirs" (which would create all those
directories) in extern/cloop/Makefile, there is no order among the dependencies
of "all", so no guarantee that the directories are already created when the
compilation recipes are executed.
While MacOS people seems to be ok with fixed locations for applications and libraries, this complicates a lot the (post)
build process, needing to change each id and rpaths in a very error prone process.
Relocatable binaries makes this a lot easier, but unfortunately "restricted" (chmod +s, like firebird executable)
programs cannot use @loader_path or @executable_path in its rpath.
So the solution has to make internal libraries relocatable and make rpath of firebird fixed. Also, as the ecosystem
seems to use fixed path, the id of fbclient.dylib has set to its fixed path.
Also MacOS post build makefile has adjusted to allow creation of packages for the debug build.
The MacOS build could still be improved with some scripts to build ICU (instead of done directly in the CI scripts,
but I leave that for now) and copies its files to our lib path. However situation seems to be better than before in
relation to ICU and TomMath.
Note: Linux build is not working in GitHub Actions. It segfaults when running (exiting) utilities.
I had this problem lot's of time in the past, maybe it's not completely fixed in v3.