Skip Menu |

This queue is for tickets about the LMDB_File CPAN distribution.

Report information
The Basics
Id: 87961
Status: resolved
Priority: 0/
Queue: LMDB_File

People
Owner: sog [...] msg.com.mx
Requestors: quanah.gibsonmount [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.02



Subject: LMDB_File does not support linking to LMDB library in a custom location
build@zre-sles11-64:/tmp/q/LMDB_File-0.01> perl Makefile.PL LIBS="-L/opt/zimbra/openldap/lib -llmdb" INC="-I/opt/zimbra/openldap/include" Note (probably harmless): No library found for -llmdb Will use my own copy of liblmdb WARNING: TEST_REQUIRES is not a known parameter. WARNING: MIN_PERL_VERSION is not a known parameter. Checking if your kit is complete... Looks good 'MIN_PERL_VERSION' is not a known MakeMaker parameter name. 'TEST_REQUIRES' is not a known MakeMaker parameter name. Writing Makefile for LMDB_File build@zre-sles11-64:/tmp/q/LMDB_File-0.01> ls /opt/zimbra/openldap bin etc include lib sbin share build@zre-sles11-64:/tmp/q/LMDB_File-0.01> ls /opt/zimbra/openldap/lib liblber-2.4.so.2 liblber.a liblber.so libldap-2.4.so.2.9.2 libldap.la libldap_r-2.4.so.2.9.2 libldap_r.la libldap.so liblmdb.so liblber-2.4.so.2.9.2 liblber.la libldap-2.4.so.2 libldap.a libldap_r-2.4.so.2 libldap_r.a libldap_r.so liblmdb.a build@zre-sles11-64:/tmp/q/LMDB_File-0.01> ls /opt/zimbra/openldap/include lber.h lber_types.h ldap_cdefs.h ldap_features.h ldap.h ldap_schema.h ldap_utf8.h ldif.h lmdb.h slapi-plugin.h
On Mon Aug 19 19:14:28 2013, MISHIKAL wrote: I would look at ZMQ-LibZMQ3 perl module as an example way to do this by allowing people to just set LMDB_HOME and it should work from there.
This version does not process "LIBS" or "INC", deliberately, since it includes a copy of the library. Values are hard-wired in Makefile.PL. Do you execute the "make" step? Any way, if you want to try a custom version, try applying the following patch: =================================================================== --- Makefile.PL (revision 3607) +++ Makefile.PL (working copy) @@ -7,12 +7,19 @@ my $LNAME = 'LMDB'; my $NAME = "${LNAME}_File"; +my ($LIBS) = map { /^LIBS=(.*)$/ && $1 || () } @ARGV; +my ($INC) = map { /^INC=(.*)/ && $1 || () } @ARGV; my $myextlib = ''; { - my @libdata = ExtUtils::Liblist->ext('-llmdb', 0, 'mdb_env_create'); - my($Head) = grep -f $_, qw(/usr/include/lmdb.h /usr/local/include/lmdb.h); - if($Head && $libdata[0]) { - warn "Will use SYSTEM lmdb in @{$libdata[4]}\n"; + my @libdata = ExtUtils::Liblist->ext($LIBS, 0, 'mdb_env_create'); + my @stdinc = qw(/usr/include /usr/local/include); + push @stdinc, $libdata[3] if $libdata[3]; + my($Head) = grep -f "$_/lmdb.h", @stdinc; + if(($INC || $Head) && $libdata[0]) { + $INC ||= "-I$Head" if -f "$libdata[3]/lmdb.h"; + warn "Will use SYSTEM lmdb in $libdata[3]\n"; + warn "If that path isn't a standard one, you may need to set LD_LIBRARY_PATH!\n" + if($libdata[4][0] =~ /.so/); } else { warn "Will use my own copy of liblmdb\n"; $myextlib = 'liblmdb/liblmdb$(LIB_EXT)'; @@ -35,8 +42,8 @@ MYEXTLIB => $myextlib, INC => '-I. -I./liblmdb' ) : ( - LIBS => ['-llmdb'], - INC => '-I.' + LIBS => [$LIBS], + INC => $INC ) ), ); Thanks for the report.
On Mon Aug 19 21:37:42 2013, SORTIZ wrote: Show quoted text
> This version does not process "LIBS" or "INC", deliberately, since it > includes a copy of the library. Values are hard-wired in Makefile.PL. > > Do you execute the "make" step? > > Any way, if you want to try a custom version, try applying the > following patch: > > =================================================================== > --- Makefile.PL (revision 3607) > +++ Makefile.PL (working copy) > @@ -7,12 +7,19 @@ > > my $LNAME = 'LMDB'; > my $NAME = "${LNAME}_File"; > +my ($LIBS) = map { /^LIBS=(.*)$/ && $1 || () } @ARGV; > +my ($INC) = map { /^INC=(.*)/ && $1 || () } @ARGV; > my $myextlib = ''; > { > - my @libdata = ExtUtils::Liblist->ext('-llmdb', 0, > 'mdb_env_create'); > - my($Head) = grep -f $_, qw(/usr/include/lmdb.h > /usr/local/include/lmdb.h); > - if($Head && $libdata[0]) { > - warn "Will use SYSTEM lmdb in @{$libdata[4]}\n"; > + my @libdata = ExtUtils::Liblist->ext($LIBS, 0, 'mdb_env_create'); > + my @stdinc = qw(/usr/include /usr/local/include); > + push @stdinc, $libdata[3] if $libdata[3]; > + my($Head) = grep -f "$_/lmdb.h", @stdinc; > + if(($INC || $Head) && $libdata[0]) { > + $INC ||= "-I$Head" if -f "$libdata[3]/lmdb.h"; > + warn "Will use SYSTEM lmdb in $libdata[3]\n"; > + warn "If that path isn't a standard one, you may need to set > LD_LIBRARY_PATH!\n" > + if($libdata[4][0] =~ /.so/); > } else { > warn "Will use my own copy of liblmdb\n"; > $myextlib = 'liblmdb/liblmdb$(LIB_EXT)'; > @@ -35,8 +42,8 @@ > MYEXTLIB => $myextlib, > INC => '-I. -I./liblmdb' > ) : ( > - LIBS => ['-llmdb'], > - INC => '-I.' > + LIBS => [$LIBS], > + INC => $INC > ) > ), > ); > > Thanks for the report.
Thanks, I can confirm version .02 fixes this issue! --Quanah