Yes! I do have more then one perl! Trying the fix... I first went to the
cpan build dir, then I ran...
sudo make realclean; sudo perl Makefile.PL; sudo make; sudo prove -bv
t/ta_common.t
I saw...
# Running under perl version 5.014001 for darwin
# Current time local: Tue Sep 13 21:01:01 2011
# Current time GMT: Wed Sep 14 02:01:01 2011
# Using Test.pm version 1.25_02
TA-Lib 0.4.0 (Sep 9 2011 23:49:25)
Testing ta_common...
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
Testing TA_SetRetCodeInfo()...
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
Testing TA_Initialize and TA_Shutdown...
ok 13
ok 14
ok 15
ok 16
ok 17
ok
All tests successful.
Files=1, Tests=17, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.02 cusr 0.00
csys = 0.05 CPU)
Result: PASS
so I did a sudo make test...
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/ta_abstract.t .. ok
t/ta_common.t .... ok
t/ta_defs.t ...... ok
t/ta_func.t ...... ok
All tests successful.
Files=4, Tests=172, 1 wallclock secs ( 0.05 usr 0.02 sys + 0.10 cusr
0.02 csys = 0.19 CPU)
Result: PASS
so I did a sudo make install!
Then I ran this perl script:
#!/usr/bin/perl
use Finance::TA;
my @series =
('91.500000','94.815000','94.375000','95.095000','93.780000','94.625000','92.530000','92.750000','90.315000','92.470000');
my ($retCode, $begIdx, $result) = TA_MAX(0, $#series, \@series, 4);
if($retCode == $TA_SUCCESS) {print("max[$_] = ", $result->[$_], "\n") for
($begIdx .. scalar(@$result)-1);}else {die "error during TA_MAX";}
and I saw...
max[3] = 95.095
max[4] = 94.625
max[5] = 94.625
max[6] = 92.75
SO I THINK IT'S GONNA WORK! I'M SO HAPPY AND EXCITED THANK YOU VERY MUCH
OMG I'M SERIOUS! WOO HOOOOO !!!
On Sun, Sep 11, 2011 at 3:07 PM, kmx via RT <bug-Finance-TA@rt.cpan.org>wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=70858 >
>
> I have noticed in your build log that you probably have 2 perls on your
> MacOSX box:
>
> /opt/local/bin/perl (v5.12.x) maybe from macports
> /usr/bin/perl (v5.10.x) the original macosx perl
>
> Which might be a trouble.
>
> Test please:
>
> 1/ fix ta-lib-config as mentioned in previous post (add -lta_lib to --libs)
>
> 2/ run: sudo cpan
>
> 3/ from cpan prompt run: look Finance::TA
>
> 4/ perl Makefile.PL
>
> 5/ make
>
> 6/ prove -bv t/ta_common.t
>
> If you see something like this:
>
> /# Running under perl version 5.012003 for darwin
> # Current time local: Sun Sep 11 13:00:07 2011
> # Current time GMT: Sun Sep 11 20:00:07 2011
> # Using Test.pm version 1.25_02
> dyld: lazy symbol binding failed: Symbol not found: _Perl_Gthr_key_ptr
> Referenced from:
>
> /Users/bob/.cpan/build/Finance-TA-v0.4.0-ehwbUX/blib/arch/auto/Finance/TA/TA.bundle
> Expected in: flat namespace
>
> dyld: Symbol not found: _Perl_Gthr_key_ptr
> Referenced from:
>
> /Users/bob/.cpan/build/Finance-TA-v0.4.0-ehwbUX/blib/arch/auto/Finance/TA/TA.bundle
> Expected in: flat namespace/
>
> then the trouble is in mixing different versions of perl
>
> 7/ to confirm my guess from point 6/ try to run: /usr/bin/perl -Mblib
> t/ta_common.t
>
> You should see something like this:
>
> # Running under perl version 5.010000 for darwin
> # Current time local: Sun Sep 11 13:03:25 2011
> # Current time GMT: Sun Sep 11 20:03:25 2011
> # Using Test.pm version 1.25
> TA-Lib 0.4.0 (Sep 11 2011 12:09:35)
> Testing ta_common...
> ok 1
> ok 2
> ok 3
> ok 4
> ok 5
> ok 6
> Testing TA_SetRetCodeInfo()...
> ok 7
> ok 8
> ok 9
> ok 10
> ok 11
> ok 12
> Testing TA_Initialize and TA_Shutdown...
> ok 13
> ok 14
> ok 15
> ok 16
> ok 17
>
> Unfortunately my knowledge about macosx is very low so I do not know
> what is the right way to fix this "double-perl-collision"
>
> --
> kmx
>
>