summary refs log tree commit diff
path: root/pkgs/development/libraries/libressl
diff options
context:
space:
mode:
authorRuud van Asseldonk <dev@veniogames.com>2019-05-04 18:40:21 +0200
committerRuud van Asseldonk <dev@veniogames.com>2019-05-04 18:40:21 +0200
commit5f594be46317e71e66e587670ebbf95e386ac365 (patch)
treec2f231f1ff51949c150b0e5454d06b40d8d10d47 /pkgs/development/libraries/libressl
parent8c7cde5df2dc16599397f0511432c9d52317217a (diff)
libressl: ensure we can link against libtls
Without setting BUILD_SHARED_LIBS, the package would build file, but
when linking it into acme-client or nginx, I got the following error:

    libressl-2.9.1/lib/libtls.a(tls.c.o): undefined reference to symbol 'pthread_once@@GLIBC_2.2.5'
    binutils-2.31.1/bin/ld: glibc-2.27/lib/libpthread.so.0: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status

After looking at the CMakeLists.txt in libressl/tls, I noticed the
BUILD_SHARED_LIBS option, and setting it resolves the linking error.
Diffstat (limited to 'pkgs/development/libraries/libressl')
-rw-r--r--pkgs/development/libraries/libressl/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libressl/default.nix b/pkgs/development/libraries/libressl/default.nix
index 62fed24200ee0..e694c353df09b 100644
--- a/pkgs/development/libraries/libressl/default.nix
+++ b/pkgs/development/libraries/libressl/default.nix
@@ -13,7 +13,7 @@ let
 
     nativeBuildInputs = [ cmake ];
 
-    cmakeFlags = [ "-DENABLE_NC=ON" ];
+    cmakeFlags = [ "-DENABLE_NC=ON" "-DBUILD_SHARED_LIBS=ON" ];
 
     # The autoconf build is broken as of 2.9.1, resulting in the following error:
     # libressl-2.9.1/tls/.libs/libtls.a', needed by 'handshake_table'.