[Bucardo-general] Strange Bug with multiple Perl in MacOS X

rivantsiv+bucardo at gmail.com rivantsiv+bucardo at gmail.com
Tue May 29 14:05:01 UTC 2012


Please, disregard this one.
Problem was very hard to determine - actualy when installing MacPorts,
Postgres took the plperl.so fro original perl distribution.


> Let me explain the situation:

> I installed MacPorts package on MacOS X Lion, together with perl5.12.
> MacPorts successfully modified all export PATHes, so when you type
> perl -V it shows following @INC:

>     @INC:
>     /opt/local/lib/perl5/site_perl/5.12.4/darwin-multi-2level
>     /opt/local/lib/perl5/site_perl/5.12.4
>     /opt/local/lib/perl5/vendor_perl/5.12.4/darwin-multi-2level
>     /opt/local/lib/perl5/vendor_perl/5.12.4
>     /opt/local/lib/perl5/5.12.4/darwin-multi-2level
>     /opt/local/lib/perl5/5.12.4
>     /opt/local/lib/perl5/site_perl
>     /opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-2level
>     /opt/local/lib/perl5/vendor_perl/5.12.3
>     /opt/local/lib/perl5/vendor_perl
>     .

> Because  Bucardo  script  is started with #!/bin/usr/env perl, it also
> successfully  picks  up  the  right verion of perl

> I installed all required packages, INCLUDING DBD::Pg to the new @INC,
> perl -MDBD::Pg -e 1 shows module is installed.


> But  then  I have a strange bug, happening in Bucardo, and it concerns
> only DBD::Pg module:


> bash-3.2#  bucardo add table public.LocationFacilities db=local
> herd=localherd standard_conflict=target

> DBD::Pg::st execute failed: ERROR:  install_driver(Pg) failed:
> Can't locate DBD/Pg.pm in @INC (@INC contains:
> /Library/Perl/5.12/darwin-thread-multi-2level
> /Library/Perl/5.12
> /Network/Library/Perl/5.12/darwin-thread-multi-2level
> /Network/Library/Perl/5.12
> /Library/Perl/Updates/5.12.3/darwin-thread-multi-2level
> /Library/Perl/Updates/5.12.3
> /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12
> /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level
> /System/Library/Perl/Extras/5.12 .) at line 3.
> Perhaps the DBD::Pg perl module hasn't been fully installed,
> or perhaps the capitalisation of 'Pg' isn't right.
> Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.
>  at line 62
> CONTEXT:  PL/Perl function "validate_goat" at /opt/local/bin/bucardo line 4637.

> As  you  see, for some reason it searches in old @INC (the @INC of the
> default perl installed in MacOS).

> Failing line is

$sth = $dbh->>prepare(SQL)
-->> ($count = $sth->execute(@args)) =~ s/0E0/0/;
> debug(qq{Added "$schema.$table" to goat table with db "$db", count was
> $count});

> All other modules in "use XXXX" are loading just fine.








-- 
Best regards,
 Rivantsiv+bucardo                            mailto:rivantsiv+bucardo at gmail.com



More information about the Bucardo-general mailing list