Entropy.ch Discussion Forums Forum Index Entropy.ch Discussion Forums
Discussion forums about Mac OS X software development.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can't locate DBI.pm

 
Post new topic   Reply to topic    Entropy.ch Discussion Forums Forum Index -> Perl on Mac OS X
View previous topic :: View next topic  
Author Message
yvan



Joined: 20 Jan 2004
Posts: 7
Location: Australia

PostPosted: Tue Jan 20, 2004 23:06    Post subject: Can't locate DBI.pm Reply with quote

Hi All,

May be this topic is more a Perl alone issue, but i am not able to tell Perl where to find the DBI module. I tried to change the PERL5LIb or the @INC variable whitout success. I tried to use cpan or fink to update Perl or change my use.conf file even the httpd.conf, same result...
Is the problem due to, according to fink DBI for panther is in Perl 5.6.1 and panther come with Perl 5.8.1?
Could CGI-AppToolKit be the solution?
Or am i complety wrong ?
Thank you for your time.
Cheers!

yvan
Back to top
View user's profile Send private message
keath



Joined: 21 Jun 2003
Posts: 114
Location: Leawood, KS

PostPosted: Wed Jan 21, 2004 0:24    Post subject: Was it working earlier? Reply with quote

Did you have DBI installed before upgrading to Panther? I'm reading your post as if you had DBI working with Jaguar and now can't find it in Panther?

The modules you load in Panther using CPAN are located under a 5.8 directory now. I reinstalled all the ones I use, including DBI. I am somewhat of a beginner, and I am not sure the 5.6 modules should work with 5.8, although my old modules are still there. I hope someone else will answer that.

I could probably help you install DBI and any other modules if you have difficulty. I've had a lot of practice recently Smile
Back to top
View user's profile Send private message
keath



Joined: 21 Jun 2003
Posts: 114
Location: Leawood, KS

PostPosted: Wed Jan 21, 2004 5:15    Post subject: location of DBI Reply with quote

If it helps at all; on my Panther system, DBI is located in
/Library/Perl/5.8.1/darwin-thread-multi-2level/
Back to top
View user's profile Send private message
yvan



Joined: 20 Jan 2004
Posts: 7
Location: Australia

PostPosted: Mon Jan 26, 2004 22:50    Post subject: Reply with quote

Thank you keath for your help.

After playing around with Fink and cpan i was able to install the correct version of DBI and it seems to work..... Now I have more problems with DBD:Razzg. I could not install it, but I will have a look at the PostgreSQL mailing list. Maybe see you where....

Cheers

yvan
Back to top
View user's profile Send private message
keath



Joined: 21 Jun 2003
Posts: 114
Location: Leawood, KS

PostPosted: Tue Jan 27, 2004 5:31    Post subject: DBD:Pg Reply with quote

Yeah, the DBD:Pg module is more difficult to set up, because cpan won't install it automatically. You have to download the source, then read the README. It explains the environment variables that have to be set up.

I also edited the Makefile. You can just set an environment variable to cover this, but I hacked part of the Makefile to look like this:
Code:

my %opts = (
    NAME         => 'DBD::Pg',
    VERSION_FROM => 'Pg.pm',
    INC          => "-I$POSTGRES_INCLUDE -I$dbi_arch_dir",
    OBJECT       => "Pg\$(OBJ_EXT) dbdimp\$(OBJ_EXT) quote\$(OBJ_EXT) types\$(OBJ_EXT)",
    LIBS         => ["-L$POSTGRES_LIB -lpq -lssl -lcrypto"],
    AUTHOR       => 'http://gborg.postgresql.org/project/dbdpg/projdisplay.php',
    ABSTRACT     => 'PostgreSQL database driver for the DBI module',
    PREREQ_PM    => { 'Test::Simple' => 0.17 }, # Need Test::More,
    CCFLAGS      => $comp_opts,
    PERL_MALLOC_OK => 1,
);

Line 88 is the one that defines the LIBS. Those -lssl and -lcrypto flags have to be added to avoid all the errors when building.

Anyway, after that it's a simple matter to
> perl Makefile.PL
> make
> sudo make install

There are a few references in this board to problems people have had building the module. Almost all of them were solved by adding those flags.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Entropy.ch Discussion Forums Forum Index -> Perl on Mac OS X All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group