Subject: | [PATCH] darwin can have libfoo.0.dylib |
... and ExtUtils::LibList::Kid doesn't know this.
Patch attached.
Working with bleadperl, I had added a non-standard -lfoo, which was available only as libfoo.0.dylib.
Configure had to be patched (http://perl5.git.perl.org/perl.git/commit/d98292cc88b8c823e911dca3e59a28b3e3fd6fec) after which the library was found and perl could be linked.
The attached patch has been verified against blead, after which the lib/ExtUtils/t/Embed.t started working.
Without the patch I got:
Warning (mostly harmless): No library found for -lfoo
Subject: | 0001-darwin-can-have-libfoo.0.dylib-as-opposed-to-libfoo..patch |
From 2b1a9889704036dbcf3ed6f4de901b4a584e38cf Mon Sep 17 00:00:00 2001
From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Wed, 10 Sep 2014 17:42:04 -0400
Subject: [PATCH] darwin can have libfoo.0.dylib, as opposed to libfoo.dylib.0
Configure was changed similarly in d98292cc
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
index e39c8b2..ca12afd 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
@@ -106,8 +106,10 @@ sub _unix_os2_ext {
# For gcc-2.6.2 on linux (March 1995), DLD can not load
# .sa libraries, with the exception of libm.sa, so we
# deliberately skip them.
- if ( @fullname = $self->lsdir( $thispth, "^\Qlib$thislib.$so.\E[0-9]+" ) ) {
-
+ if ((@fullname =
+ $self->lsdir($thispth, "^\Qlib$thislib.$so.\E[0-9]+")) ||
+ (@fullname =
+ $self->lsdir($thispth, "^\Qlib$thislib.\E[0-9]+\Q\.$so"))) {
# Take care that libfoo.so.10 wins against libfoo.so.9.
# Compare two libraries to find the most recent version
# number. E.g. if you have libfoo.so.9.0.7 and
--
2.1.0