Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

can't install DBD::mysql under cygwin for mysql5

by tphyahoo (Vicar)
on Feb 08, 2007 at 15:04 UTC ( #599024=perlquestion: print w/ replies, xml ) Need Help??
tphyahoo has asked for the wisdom of the Perl Monks concerning the following question:

I'm having an issue similar in spirit, if not in every detail, to that described in

http://www.cpanforum.com/posts/3561

(I actually actually tried posting at cpanforum first, but the cpanforum submission feature appears to be broken)

Basically, I followed the instructions for the cygwin install in the documentation at

http://search.cpan.org/src/RUDY/DBD-mysql-2.9008/INSTALL.html#windows_cygwin

*****************

UPDATE: that was for an old version of DBD::mysql. Maybe that was the problem. The newer version is at

DBD::mysql

stay tuned....

*****************

UPDATE: you can probably skip this next bit, as it refers to my attempt to follow the documentation in the out of date DBD::mysql.

Following this to the letter requires the source for mysql version 3.23.54a, which isn't even available any more from mysql.

http://downloads.mysql.com/archives.php?p=mysql-4.0

(they're not even allowing source downloads for mysql4 anymore.)

I attempted the install under cygwin with the latest mysql (mysql5). Makefile.PL went okay.

make failed with

hartman@ds0014 ~/.cpan/build/DBD-mysql-4.001 $ make gcc -c -I/usr/lib/perl5/site_perl/5.8/cygwin/auto/DBI -I/usr/local/my +sql/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -DPERL_USE_SAFE_P +UTENV -fno- strict-aliasing -pipe -I/usr/local/include -DUSEIMPORTLIB -O3 -DVERS +ION=\"4.001\" -DXS_VERSION=\"4.001\" "-I/usr/lib/perl5/5.8/cygwin/CO +RE" dbdim p.c In file included from dbdimp.c:20: dbdimp.h:23:45: mysqld_error.h: No such file or directory dbdimp.c: In function `mysql_db_FETCH_attrib': dbdimp.c:2319: warning: cast from pointer to integer of different size dbdimp.c: In function `mysql_st_prepare': dbdimp.c:2531: error: `ER_UNSUPPORTED_PS' undeclared (first use in thi +s function) dbdimp.c:2531: error: (Each undeclared identifier is reported only onc +e dbdimp.c:2531: error: for each function it appears in.) dbdimp.c: In function `mysql_st_FETCH_attrib': dbdimp.c:4148: warning: cast from pointer to integer of different size make: *** [dbdimp.o] Error 1
*****************

UPDATE: okay, start reading again.

The current documentation of DBD::mysql suggests installation via ppm for win32.

I normally work under activestate, but in this case I thought cygwin would be better, because I had a script that needed to be modified to run on windows, and a number of dependency modules didn't compile easily under Active State to my recollection. So now, it seems I have everything working nicely under cygwin, except DBD::mysql, which I really need.

So, first question: given DBD::mysql installed via ppm, is there a way I can access this from a perl script run under cygwin?

Second question, barring that, has nyone been able to get DBD::mysql to work under cygwin for a recent version, or can point me to a way to download the old source? Or other constructive feedback?

Thanks in advance!

Comment on can't install DBD::mysql under cygwin for mysql5
Download Code
Re: can't install DBD::mysql under cygwin for mysql5
by shmem (Canon) on Feb 08, 2007 at 15:22 UTC
    For old sources, one idea... you could get at the old sources via a source rpm from the redhat 9 tree (redhat/9/os/SRPMS) on The Fedora Legacy Project. rpm2cpio that and you have a nice tar.gz file or such to keep you going. If you don't have a linux box at hand, /msg me and I'll unpack that for you and give you a link.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      Pretty off-topic by now, but I'm interested, because this seems like something that could be useful in a variety of situations. (Which is why I answered on the thread, not private message.)

      How does this work?

      I don't really know the red hat packaging system. I have an ubuntu box, and am beginning to get handy with apt-get (not that handy though). Can I get it to work from there, either by using rpm on ubuntu, or some analogous way with apt-get?

      I think a simple copy of a terminal red hat session where you went in and generated an "old source" would be valuable to others.

        How does this work?

        It's as simple as

        qwurx [shmem] 16:35 ~/old_stuff > perl -MLWP::Simple -e 'getstore("htt +p://ftp-stud.fht-esslingen.de/pub/Mirrors/download.fedoralegacy.org/r +edhat/9/os/SRPMS/mysql-3.23.54a-11.src.rpm","mysql-3.23.54a-11.src.rp +m")' qwurx [shmem] 16:38 ~/old_stuff > rpm2cpio mysql-3.23.54a-11.src.rpm | + cpio -i --make-directories cpio: write error: No space left on device qwurx [shmem] 16:38 ~/old_stuff > df -h . Filesystem Size Used Avail Use% Mounted on /dev/hda3 9,9G 9,4G 0 100% /home qwurx [shmem] 16:39 ~/old_stuff > ls -l total 12724 -rwxr-xr-x 1 shmem shmem 57 2007-02-08 16:38 filter-requires-mysq +l.sh* -rw-r--r-- 1 shmem shmem 193 2007-02-08 16:38 my.cnf -rw-r--r-- 1 shmem shmem 1131 2007-02-08 16:38 mysql-3.23.51-manfix +es.patch -rw-r--r-- 1 shmem shmem 8305482 2007-02-08 16:38 mysql-3.23.54a-11.sr +c.rpm -rw-r--r-- 1 shmem shmem 679 2007-02-08 16:38 mysql-3.23.54a-doubl +efree.patch -rw------- 1 shmem shmem 4677632 2007-02-08 16:38 mysql-3.23.54a.tar.b +z2 -rw-r--r-- 1 shmem shmem 360 2007-02-08 16:38 mysql-3.23.54-libdir +.patch qwurx [shmem] 16:39 ~/old_stuff >

        Whoops. Seems like my drive is stable... but you get the idea. There's the mysql-3.23.54a.tar.bz2 file and some patches from RedHat, along with some shell scripts and a spec file (which contains build instructions).

        Have to clean up a bit... I'll /msg you a link.

        --shmem

        _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                      /\_¯/(q    /
        ----------------------------  \__(m.====·.(_("always off the crowd"))."·
        ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: can't install DBD::mysql under cygwin for mysql5
by bingos (Vicar) on Feb 08, 2007 at 18:05 UTC

    I got the MySQL 4.1 sources from here ( scroll right to the bottom for source links )

    Configured and compiled on cygwin:

    $ ./configure --without-server

    Installed and successfully installed DBD::mysql 4.001 against this.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://599024]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2014-12-28 12:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (181 votes), past polls