From 7059a5a73796c7ec499cecb616ea57477ae5bfea Mon Sep 17 00:00:00 2001 From: Leonid Ryzhyk Date: Sat, 23 Jul 2022 14:41:32 -0700 Subject: [PATCH] Dynamically link compiler executable. DDlog used to rely on static linking to reduce runtime dependencies. Unfortunately, this no longer works well on recent Ubuntu and Fedora releases (see #1051). The problem appears to be in the `unix` Haskell package, which may still load dynamic libraries (in particular glibc) using `dlopen` when using static linking. As far as I can tell it uses older versions of Linux static libraries, which require some deprecated libc symbols (specifically `__xmnod`). This will probably get fixed eventually, but overall static linking probably was not a good idea, so we switch to the more standard dynamic linking method. --- package.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.yaml b/package.yaml index 3b6f79370..fab8d9cc9 100644 --- a/package.yaml +++ b/package.yaml @@ -48,7 +48,7 @@ dependencies: library: source-dirs: src ghc-options: - - -optl-static + # - -optl-static - -optl-pthread - -Wall - -Werror @@ -66,7 +66,7 @@ executables: - -threaded - -rtsopts - -with-rtsopts=-N - - -optl-static + # - -optl-static - -optl-pthread - -Wall - -Werror @@ -91,7 +91,7 @@ executables: - -threaded - -rtsopts - -with-rtsopts=-N - - -optl-static + # - -optl-static - -Wall - -Werror else: