Finance Quote Install difficulties

John Ralls jralls at
Sun Nov 18 08:41:39 EST 2012

On Nov 18, 2012, at 4:15 AM, Erik Colson <eco at> wrote:

> Lincoln A Baxter <lab at> writes:
> [..]
>>> Well, not all of the packages are pure perl, which is a big part of the problem. But IIRC perl dlopens modules binaries, so if 
>>> I package them in Resources/lib, set LD_LIBRARY_PATH to point there, put the modules somewhere, and add somewhere to @INC, it should be good, right?
> AFAIK The non pure-perl packages required by Finance::Quote are already
> installed with perl by MacOS and probably Windows too. Linux users
> probably have no problem using package managers to install F::Q

Unfortunately not. That's why users are required to install Xcode/command-line tools so that CPAN can compile the dependencies. On Windows we use ActivePerl which packages modules with their binaries, so there's no compilation required.

> [..]
>>        3) Or, one can diddle @INC within a BEGIN block of the script
>>        (which will execute before any mainline use statements are
>>        executed, thus enabling the libraries to be found)
>>                BEGIN {
>>                	@INC = ( "/the/path/to/the/root/of/the/gnucash/perl/lib", @INC );
>>                }
>> No doubt, there are other ways to do it... I linr #3 above best because
>> it is entirely self contained within the script. 
> I'd prefer the 'use lib' variant. This has the benefit that it
> OS-indepent path with slashes is used. On Windows it will correctly
> modify '/' to '\'. And no need to use BEGIN blocks which somehow results
> in less maintainable code since there seem to be much perl devs which
> don't really know what it does.

I'm not looking to do this in an OS-independent way. That's just too hard. The Linux distros and ActivePerl (which we use for F::Q on windows) each have a way of providing Finance::Quote that works pretty well without invoking CPAN. I want to provide the same for Mac users, and I want to do it in a way that doesn't involve inserting more Mac-specific code into Gnucash -- C, Scheme, or Perl. That means that any custom paths have to be set with the launcher shell script. PERLINCPATH and LD_LIBRARY_PATH will work fine, so that's the way I'll go. Thanks to both of you for your very useful comments.

All of that said, it would still be good to figure out where PaxHeaders.11917 came from and why CPAN decided to insert it into Date-Manip-6.36.

John Ralls

More information about the gnucash-user mailing list