Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
libressl: ensure we can link against libtls
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ruuda committed May 4, 2019
1 parent 8c7cde5 commit 5f594be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/development/libraries/libressl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down

0 comments on commit 5f594be

Please sign in to comment.