Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / January 2007



Tip: Looking for answers? Try searching our database.

Problems using CPAN : part 1 - installing DBD::mysql

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lists@mostrom.pp.se - 30 Jan 2007 13:26 GMT
I've never used CPAN on my Mac before and hardly at all on other
machines ... in other words newbie warning.

Anyway, I want to use MySQL from Perl so I installed DBI, no
problems. Then I tried to install DBD::mysql but it fails. I get
the following error message:
---------------------------
dbdimp.c: In function ‘mysql_dr_connect’:
dbdimp.c:1677: error: ‘ulong’ undeclared (first use in this function)
dbdimp.c:1677: error: (Each undeclared identifier is reported
only once
dbdimp.c:1677: error: for each function it appears in.)
dbdimp.c:1677: error: parse error before numeric constant
make: *** [dbdimp.o] Error 1
  /usr/bin/make  -- NOT OK
---------------------------

which seems to be this line

#if MYSQL_VERSION_ID >= MULTIPLE_RESULT_SET_VERSION
    client_flag|= CLIENT_MULTI_RESULTS;
#endif

So I'm at a loss here, I'm using the prebuild MySQL from MySQL
version  5.0.27-standard.

Any suggestions for what I'm doing wrong?

            jem
Sherm Pendley - 30 Jan 2007 19:54 GMT
On Jan 30, 2007, at 8:26 AM, Jan Erik Moström wrote:

> Anyway, I want to use MySQL from Perl so I installed DBI, no  
> problems. Then I tried to install DBD::mysql but it fails.

Yep. The CPAN shell, as nice as it is in most respects, fails  
whenever a module needs arguments passed to Makefile.PL to install  
properly. Since it normally just runs "perl Makefile.PL" with no  
arguments, it needs a bit of hand-holding to correctly install  
modules that need arguments.

In the CPAN shell, run "look DBD::mysql". This will download and  
unpack the latest source for the module, and open up a new subshell  
in the build directory. Then you can configure the install manually:

    perl Makefile.PL <args>

Where <args> are the options that tell the build script where to find  
the MySQL header (.h) files, what database, user name, and password  
to use for the self-tests, and so forth. Run "perl Makefile.PL --
help" for a brief list of options, or "open INSTALL.html" for more  
detailed help.

Then you can run the install:

    make
    make test
    sudo make install

Keep an eye on the output from each step. If one of these steps  
fails, don't continue with the next.

Once you're done, you can "exit" back out to the CPAN shell.

sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
lists@mostrom.pp.se - 31 Jan 2007 13:21 GMT
Reply to Sherm Pendley <sherm@dot-app.org> 07-01-30 14:54:

>Where <args> are the options that tell the build script where to find
>the MySQL header (.h) files, what database, user name, and password to
>use for the self-tests, and so forth. Run "perl Makefile.PL --help"
>for a brief list of options, or "open INSTALL.html" for more detailed
>help.

Thanks, now I understand how it works a bit better ... but I
still didn't get it to compile.

However after a while I found this thread <http://forums.mysql.com/read.php?51,134560,134560#msg-134560>

So now it works.

            thanks
                    jem
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.