Perl client on OS X


#1

I have tried installing the perl client library but cannot get it to find libcouchbase installed vie homebrew per the instructions. The perl client library builds but make test fails:

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t .. 1/? 
#   Failed test 'use Couchbase::Bucket;'
#   at t/00-load.t line 7.
#     Tried to use 'Couchbase::Bucket'.
#     Error:  Can't load '/Users/elrod/Downloads/perl-Couchbase-Client-master/blib/arch/auto/Couchbase/Couchbase.bundle' for module Couchbase: dlopen(/Users/elrod/Downloads/perl-Couchbase-Client-master/blib/arch/auto/Couchbase/Couchbase.bundle, 2): Symbol not found: _lcb_breakout
#   Referenced from: /Users/elrod/Downloads/perl-Couchbase-Client-master/blib/arch/auto/Couchbase/Couchbase.bundle
#   Expected in: flat namespace
#  in /Users/elrod/Downloads/perl-Couchbase-Client-master/blib/arch/auto/Couchbase/Couchbase.bundle at /System/Library/Perl/5.18/darwin-thread-multi-2level/DynaLoader.pm line 194.

#2

The message there seems to indicate that libcouchbase is missing. Does brew list | grep couchbase in fact show libcouchbase as installed? This should be described in the brew dependencies, but could be a bug.

@mnunberg may know some more, as he maintains this as a community effort.


#3

You may have better luck using a Perl provided by homebrew, or perhaps by adding /usr/local/lib to DYLD_LIBRARY_PATH


#4

FWIW - I ended up getting around this issue by downloading the CPAN source and passing the paths to the lib and include to Makefile.PL