Skip to content

Commit

Permalink
Fix program startup of the static binary (#3526)
Browse files Browse the repository at this point in the history
The recent addition of the s3 connector causes the linker to add symbols
from the AWS crypto abstraction layer library. This lib uses the
`dlopen` and `dlclose` functions even when built as a static library -
which is possible. What's more, the return value of those functions is
asserted, causing the tenzir executables to abort during initialization.

The good news is that this can be worked around by disabling the
problematic assert. For that we pull a patch that does exactly that from
an open upstream pull request.
  • Loading branch information
tobim committed Sep 19, 2023
2 parents ef59f3e + 42f9b2a commit 0972167
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ in {
./google-cloud-cpp/0001-Use-pkg-config-to-find-CURL.patch
];
});
aws-c-cal =
if !isStatic
then prev.aws-c-cal
else
prev.aws-c-cal.overrideAttrs (orig: {
patches = (orig.patches or []) ++ [
(prev.fetchpatch {
url = "https://github.com/awslabs/aws-c-cal/commit/ee46efc3dd0cf300ff4ec89cc2d79f1b0fe1c8cb.patch";
sha256 = "sha256-bFc0Mqt0Ho3i3xGHiQitP35dQgPd9Wthkyb1TT/nRYs=";
})
];
});
arrow-cpp =
if !isStatic
then prev.arrow-cpp
Expand Down

0 comments on commit 0972167

Please sign in to comment.