Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: PayFlow Pro problem

by cbrandtbuffalo (Deacon)
on Jan 06, 2006 at 13:47 UTC ( [id://521473]=note: print w/replies, xml ) Need Help??


in reply to PayFlow Pro problem

Basically, the problem is what the error says. The module can't find that file, so it can't load it. The makefile for this module is a bit strange, and it puts things in strange places.

Normally I avoid messing directly with a Makefile.PL, but in this case I had to. If you look at the code in Makefile.PL, you'll see they try to play games with the various libs where things are installed. Depending on where you run the install and how your system is configured, it may or may not put things in the correct place.

My solution was to modify the $LIBS variable they set at the top of the Makefile.PL. The original looks like:

my $LIBS = '-L./lib -L. -lpfpro -lMSVCRT ';
I changed it to:
my $libdir = "/dir/to/install/stuff"; my $LIBS = "-L$libdir -lpfpro -lMSVCRT ";
Assuming that directory exists and you can write to it, you can follow through the rest of the file and make these changes:
< mkdir("lib",0744); --- > # mkdir("lib",0744); < copy("../lib/$file","lib/$file"); --- > copy("../lib/$file","$libdir/$file"); < chmod($m,"lib/$file"); < if ( !(-e "lib/$file") ) { --- > chmod($m,"$libdir/$file"); > if ( !(-e "$libdir/$file") ) {
I admit this is less than elegant, but I couldn't figure out what they were trying to do and this got things working for me.

Good luck.

Replies are listed 'Best First'.
Re^2: PayFlow Pro problem
by ilcylic (Scribe) on Apr 06, 2007 at 23:56 UTC
    I think their goal is to provide the possibility of a "local" install of the library, so if you have multiple user accounts on one server all using the payflow pro library, they can each have their own install.

    But, of course, I imagine very few systems include those directories in the path for ldconfig to search.

    So, I used this technique and was still having trouble, until I made sure the directory I was putting libpfpro.so in was getting searched by ldconfig, and then running ldconfig to make the system recognize the existence of the library.

    So, if "make test" works, and "make install" seems to work, but then running "perl test.pl" fails, complaining about being unable to locate libpfpro.so, make sure libpfpro.so is in something like '/usr/lib' or '/usr/local/lib' (and that those directories get indexed by ldconfig ref: /etc/ld.so.conf) and then run ldconfig. You will need root or sudo for that, though.

    Hopefully that will save someone else the hours of frustration and anger I had yesterday. :-\

    OTOH: now I know way more about Makefile.PL internals and ld.so than I did two days ago.
Re^2: PayFlow Pro problem
by Anonymous Monk on Jan 06, 2006 at 17:38 UTC
    Thanks. I made these changes to the Makefile.PL and it worked.
    --TWH

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://521473]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found