From 0e6c77befa86dc9ed53d5ebd75b3a0897f90bca8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 17 Feb 2012 19:32:15 +0000 Subject: [PATCH] * On Darwin, don't link Perl against /usr/lib/libutil.dylib. Libutil uses /usr/lib/libstdc++.dylib, and so we get segfaults when using Perl modules that depend on another libstdc++.dylib (like Nix's Perl bindings). It doesn't appear that libutil provides useful functionality for Perl on Darwin. svn path=/nixpkgs/branches/stdenv-updates/; revision=32364 --- pkgs/development/interpreters/perl/5.14/default.nix | 3 ++- .../interpreters/perl/5.14/no-libutil.patch | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/interpreters/perl/5.14/no-libutil.patch diff --git a/pkgs/development/interpreters/perl/5.14/default.nix b/pkgs/development/interpreters/perl/5.14/default.nix index bdd3365b8b0..75b15da3efd 100644 --- a/pkgs/development/interpreters/perl/5.14/default.nix +++ b/pkgs/development/interpreters/perl/5.14/default.nix @@ -17,7 +17,8 @@ stdenv.mkDerivation rec { patches = [ # Do not look in /usr etc. for dependencies. ./no-sys-dirs.patch - ]; + ] + ++ stdenv.lib.optional stdenv.isDarwin ./no-libutil.patch; # Build a thread-safe Perl with a dynamic libperls.o. We need the # "installstyle" option to ensure that modules are put under diff --git a/pkgs/development/interpreters/perl/5.14/no-libutil.patch b/pkgs/development/interpreters/perl/5.14/no-libutil.patch new file mode 100644 index 00000000000..9b749bccf32 --- /dev/null +++ b/pkgs/development/interpreters/perl/5.14/no-libutil.patch @@ -0,0 +1,12 @@ +diff -ru -x '*~' perl-5.14.2-orig/Configure perl-5.14.2/Configure +--- perl-5.14.2-orig/Configure 2011-09-26 11:44:34.000000000 +0200 ++++ perl-5.14.2/Configure 2012-02-16 17:24:50.779839039 +0100 +@@ -1368,7 +1368,7 @@ + : List of libraries we want. + : If anyone needs extra -lxxx, put those in a hint file. + libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun" +-libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD" ++libswanted="$libswanted m crypt sec c cposix posix ucb bsd BSD" + : We probably want to search /usr/shlib before most other libraries. + : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. + glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`