From 52184b53c05464fc9ccd3dd8200cb78c41ec8cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sat, 6 Jun 2015 09:21:21 +0200 Subject: [PATCH] Revert "Revert "Explicitly pass -pthread flag to fix the build after some updates"" This reverts commit 6cfea50ad14b3225226e64bd77925dc05a593689. I think the reason for the revert was because of patch dependencies. We really need this patch to fix heimdal build. Or else: $ nix-build -A heimdal ... /tmp/nix-build-heimdal-1.5.3.drv-0/heimdal-1.5.3/base/.libs/libheimbase.so: undefined reference to `pthread_getspecific' /tmp/nix-build-heimdal-1.5.3.drv-0/heimdal-1.5.3/base/.libs/libheimbase.so: undefined reference to `pthread_key_create' /tmp/nix-build-heimdal-1.5.3.drv-0/heimdal-1.5.3/base/.libs/libheimbase.so: undefined reference to `pthread_setspecific' collect2: error: ld returned 1 exit status Makefile:509: recipe for target 'tc' failed make[2]: *** [tc] Error 1 --- pkgs/development/libraries/kerberos/heimdal.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/kerberos/heimdal.nix b/pkgs/development/libraries/kerberos/heimdal.nix index aeea290bdb2..320e161d3da 100644 --- a/pkgs/development/libraries/kerberos/heimdal.nix +++ b/pkgs/development/libraries/kerberos/heimdal.nix @@ -23,6 +23,10 @@ stdenv.mkDerivation rec { "--without-x" ]; + preConfigure = '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -pthread" + ''; + # We need to build hcrypt for applications like samba postBuild = '' (cd lib/hcrypto; make)