Problems installing DBI and DBD::mysql to a local directory

2009-01-08 Thread Thomas Walsh
Hello,

Would you be able to give me some advice on a DBI issue I'm having? I'm
quite new to Perl and completely new to
MySQL. I'm currently trying to install DBI (v1.607) and DBD::mysql (v4.010).
I'm hoping to use these along with
BioPerl and the Ensembl Perl API, to access the online genomic database
Ensembl automatically.

I'm trying to install both DBI and DBD::mysql to a local directory, as I
don't have root access.  I've been using
the commands given in the README files, as well as setting the PREFIX and
LIB parameters (I've shown these in the postscript).

DBI installs fine, but my problems started after I set PERL5LIB and tried to
install DBD::mysql.
The following call worked, as did the subsequent call to make.

perl Makefile.PL PREFIX=/home/twalsh/lib/DBD-mysql-4.010
LIB=/home/twalsh/lib/DBD-mysql-4.010


However, the call to make test failed. Here's the output:

~~

PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e
test_harness(0, 'blib/lib', 'blib/arch') t/*.t
t/00baseok

t/10connect.ok

t/20createdrop..ok

t/25lockunlock..ok

t/29warningsok

t/30insertfetch.ok

t/31insertidok

t/32insert_errorok

t/35limit...ok

t/35prepare.ok

t/40bindparam...ok

t/40bindparam2..ok

t/40blobs...ok

t/40catalog.ok

35/77 skipped: various reasons
t/40keyinfo.ok

t/40listfields..ok

t/40nulls...ok

t/40numrows.ok

t/40server_prepare..ok

t/40server_prepare_errorok

t/40types...ok

19/20 skipped: New Data types not supported by server
t/41bindparam...ok

t/41blobs_prepare...ok

t/42bindparam...ok

t/50chopblanks..ok 1/29

#   Failed test '$name should not have blanks chopped'
t/50chopblanks..NOK 15#   in t/50chopblanks.t at line 60.

#  got: ''
# expected: ' '

#   Failed test '$name should not have blanks chopped'
#   in t/50chopblanks.t at line 60.
t/50chopblanks..NOK 22#  got: ' a b c'

# expected: ' a b c '
# Looks like you failed 2 tests of 29.
t/50chopblanks..dubious

Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 15, 22
Failed 2/29 tests, 93.10% okay
t/50commit..ok

t/55utf8skipped
all skipped: SKIP TEST: You must have MySQL version 5.0 and greater
for this test to run
t/60leaks...skipped
all skipped: Skip $ENV{SLOW_TESTS} is not set
t/65types...ok

t/70takeimp.ok

t/71impdata.ok

t/75supported_sql...ok

t/76multi_statement.ok 1/24

t/76multi_statement.NOK 13#   Failed test 'Second update had 2
warnings'
#   in t/76multi_statement.t at line 50.
#  got: '0'
# expected: '2'

~~

The process hangs at that point. Since this is the make test stage, I'm
guessing that maybe the problem at this
stage of the installation actually indicates that something's going wrong at
an earlier stage, but I haven't
been able to figure out what I might be doing wrong during those earlier
parts of the installation.

What could be going wrong?

Are there perhaps settings in the compilation that aren't correct (see
post-postscript)?

Thanks for your time.

Regards,

Thomas Walsh.

P.S. Here is the list of commands I'd hoped to use to install DBI and
DBD::mysql:

perl Makefile.PL PREFIX=/home/twalsh/lib/DBI-1.607
LIB=/home/twalsh/lib/DBI-1.607
make
make test
make install

PERL5LIB=/home/twalsh/lib/DBI-1.607/i686-linux
export PERL5LIB
perl -V

perl Makefile.PL PREFIX=/home/twalsh/lib/DBD-mysql-4.010
LIB=/home/twalsh/lib/DBD-mysql-4.010
make
make test
make install

P.P.S. Settings used to compile DBD::mysql:

I will use the following settings for compiling and testing:

  cflags(mysql_config) = -I/usr/include/mysql -g -pipe -m32
-march=i386 -mtune=pentium4 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -fno-strict-aliasing
  embedded  (mysql_config) =
  libs  (mysql_config) = -L/usr/lib/mysql -lmysqlclient -lz -lcrypt
-lnsl -lm -L/usr/lib -lssl -lcrypto
  mysql_config  (guessed ) = mysql_config
  nocatchstderr (default ) = 0
  nofoundrows   (default ) = 0
  ssl   (guessed ) = 1
  testdb(default ) = test
  testhost  (default ) =
  testpassword  (default ) =
  testsocket(default ) =
Use of uninitialized value in printf at Makefile.PL line 175, PIPE line
93.
  testuser  () = twalsh

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.


Re: Problems installing DBI and DBD::mysql to a local directory

2009-01-08 Thread Martin Evans

Thomas Walsh wrote:

Hello,

Would you be able to give me some advice on a DBI issue I'm having? I'm
quite new to Perl and completely new to
MySQL. I'm currently trying to install DBI (v1.607) and DBD::mysql (v4.010).
I'm hoping to use these along with
BioPerl and the Ensembl Perl API, to access the online genomic database
Ensembl automatically.

I'm trying to install both DBI and DBD::mysql to a local directory, as I
don't have root access.  I've been using
the commands given in the README files, as well as setting the PREFIX and
LIB parameters (I've shown these in the postscript).

DBI installs fine, but my problems started after I set PERL5LIB and tried to
install DBD::mysql.
The following call worked, as did the subsequent call to make.

perl Makefile.PL PREFIX=/home/twalsh/lib/DBD-mysql-4.010
LIB=/home/twalsh/lib/DBD-mysql-4.010



It has been a while since I used mysql but you look to have done the 
right thing.



However, the call to make test failed. Here's the output:

~~

PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e
test_harness(0, 'blib/lib', 'blib/arch') t/*.t


snipped successes and skipped


t/50chopblanks..ok 1/29

#   Failed test '$name should not have blanks chopped'
t/50chopblanks..NOK 15#   in t/50chopblanks.t at line 60.

#  got: ''
# expected: ' '

#   Failed test '$name should not have blanks chopped'
#   in t/50chopblanks.t at line 60.
t/50chopblanks..NOK 22#  got: ' a b c'

# expected: ' a b c '
# Looks like you failed 2 tests of 29.
t/50chopblanks..dubious

Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 15, 22
Failed 2/29 tests, 93.10% okay


Looks like you are not the only one with this chopblanks problem:

http://www.nabble.com/Bundle::Bugzilla-install-hangs-td20363858.html
http://lists.mysql.com/perl/4296
http://ppm4.activestate.com/i686-linux/5.8/818/C/CA/CAPTTOFU/DBD-mysql-4.008.d/log-20080816T160904.txt

so I'd doubt it is due to the way you are installing it. The second one 
looks identical to yours and is still unanswered.


snipped more successes and skipped



t/76multi_statement.NOK 13#   Failed test 'Second update had 2
warnings'
#   in t/76multi_statement.t at line 50.
#  got: '0'
# expected: '2'

~~

The process hangs at that point. Since this is the make test stage, I'm
guessing that maybe the problem at this
stage of the installation actually indicates that something's going wrong at
an earlier stage, but I haven't
been able to figure out what I might be doing wrong during those earlier
parts of the installation.

What could be going wrong?

Are there perhaps settings in the compilation that aren't correct (see
post-postscript)?

Thanks for your time.

Regards,

Thomas Walsh.

P.S. Here is the list of commands I'd hoped to use to install DBI and
DBD::mysql:

perl Makefile.PL PREFIX=/home/twalsh/lib/DBI-1.607
LIB=/home/twalsh/lib/DBI-1.607
make
make test
make install

PERL5LIB=/home/twalsh/lib/DBI-1.607/i686-linux
export PERL5LIB
perl -V

perl Makefile.PL PREFIX=/home/twalsh/lib/DBD-mysql-4.010
LIB=/home/twalsh/lib/DBD-mysql-4.010
make
make test
make install

P.P.S. Settings used to compile DBD::mysql:

I will use the following settings for compiling and testing:

  cflags(mysql_config) = -I/usr/include/mysql -g -pipe -m32
-march=i386 -mtune=pentium4 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -fno-strict-aliasing
  embedded  (mysql_config) =
  libs  (mysql_config) = -L/usr/lib/mysql -lmysqlclient -lz -lcrypt
-lnsl -lm -L/usr/lib -lssl -lcrypto
  mysql_config  (guessed ) = mysql_config
  nocatchstderr (default ) = 0
  nofoundrows   (default ) = 0
  ssl   (guessed ) = 1
  testdb(default ) = test
  testhost  (default ) =
  testpassword  (default ) =
  testsocket(default ) =
Use of uninitialized value in printf at Makefile.PL line 175, PIPE line
93.


I thought it might be interesting to know what is on line 175 of 
Makefile.PL so I tried myself and got the same warning suggesting 
testsocket was not defined so I doubt this is the source of the problem.




  testuser  () = twalsh

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.



Any particular reason why you are not running MySQL 5 - I refer to You 
must have MySQL version 5.0 and greater for this test to run. I see 
there is a MySQL 5.1 and 6 now.


Anyway, I tried the same version of DBD::mysql with a mysql server we 
have here and got the same failures but it did not hang:


PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e 
test_harness(0, 'blib/lib', 'blib/arch') t/*.t

t/00baseok
t/10connect.ok
t/20createdrop..ok

Re: Problems installing DBI and DBD::mysql to a local directory

2009-01-08 Thread Martin Evans

Martin Evans wrote:

Thomas Walsh wrote:

Hello,

Would you be able to give me some advice on a DBI issue I'm having? I'm
quite new to Perl and completely new to
MySQL. I'm currently trying to install DBI (v1.607) and DBD::mysql 
(v4.010).

I'm hoping to use these along with
BioPerl and the Ensembl Perl API, to access the online genomic database
Ensembl automatically.

I'm trying to install both DBI and DBD::mysql to a local directory, as I
don't have root access.  I've been using
the commands given in the README files, as well as setting the PREFIX and
LIB parameters (I've shown these in the postscript).

DBI installs fine, but my problems started after I set PERL5LIB and 
tried to

install DBD::mysql.
The following call worked, as did the subsequent call to make.

perl Makefile.PL PREFIX=/home/twalsh/lib/DBD-mysql-4.010
LIB=/home/twalsh/lib/DBD-mysql-4.010



It has been a while since I used mysql but you look to have done the 
right thing.



However, the call to make test failed. Here's the output:

~~

PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e
test_harness(0, 'blib/lib', 'blib/arch') t/*.t


snipped successes and skipped


t/50chopblanks..ok 1/29

#   Failed test '$name should not have blanks chopped'
t/50chopblanks..NOK 15#   in t/50chopblanks.t at line 60.

#  got: ''
# expected: ' '

#   Failed test '$name should not have blanks chopped'
#   in t/50chopblanks.t at line 60.
t/50chopblanks..NOK 22#  got: ' a b c'

# expected: ' a b c '
# Looks like you failed 2 tests of 29.
t/50chopblanks..dubious

Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 15, 22
Failed 2/29 tests, 93.10% okay


Looks like you are not the only one with this chopblanks problem:

http://www.nabble.com/Bundle::Bugzilla-install-hangs-td20363858.html
http://lists.mysql.com/perl/4296
http://ppm4.activestate.com/i686-linux/5.8/818/C/CA/CAPTTOFU/DBD-mysql-4.008.d/log-20080816T160904.txt 



so I'd doubt it is due to the way you are installing it. The second one 
looks identical to yours and is still unanswered.


snipped more successes and skipped



t/76multi_statement.NOK 13#   Failed test 'Second update had 2
warnings'
#   in t/76multi_statement.t at line 50.
#  got: '0'
# expected: '2'

~~

The process hangs at that point. Since this is the make test stage, I'm
guessing that maybe the problem at this
stage of the installation actually indicates that something's going 
wrong at

an earlier stage, but I haven't
been able to figure out what I might be doing wrong during those earlier
parts of the installation.

What could be going wrong?

Are there perhaps settings in the compilation that aren't correct (see
post-postscript)?

Thanks for your time.

Regards,

Thomas Walsh.

P.S. Here is the list of commands I'd hoped to use to install DBI and
DBD::mysql:

perl Makefile.PL PREFIX=/home/twalsh/lib/DBI-1.607
LIB=/home/twalsh/lib/DBI-1.607
make
make test
make install

PERL5LIB=/home/twalsh/lib/DBI-1.607/i686-linux
export PERL5LIB
perl -V

perl Makefile.PL PREFIX=/home/twalsh/lib/DBD-mysql-4.010
LIB=/home/twalsh/lib/DBD-mysql-4.010
make
make test
make install

P.P.S. Settings used to compile DBD::mysql:

I will use the following settings for compiling and testing:

  cflags(mysql_config) = -I/usr/include/mysql -g -pipe -m32
-march=i386 -mtune=pentium4 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -fno-strict-aliasing
  embedded  (mysql_config) =
  libs  (mysql_config) = -L/usr/lib/mysql -lmysqlclient -lz 
-lcrypt

-lnsl -lm -L/usr/lib -lssl -lcrypto
  mysql_config  (guessed ) = mysql_config
  nocatchstderr (default ) = 0
  nofoundrows   (default ) = 0
  ssl   (guessed ) = 1
  testdb(default ) = test
  testhost  (default ) =
  testpassword  (default ) =
  testsocket(default ) =
Use of uninitialized value in printf at Makefile.PL line 175, PIPE line
93.


I thought it might be interesting to know what is on line 175 of 
Makefile.PL so I tried myself and got the same warning suggesting 
testsocket was not defined so I doubt this is the source of the problem.




  testuser  () = twalsh

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.



Any particular reason why you are not running MySQL 5 - I refer to You 
must have MySQL version 5.0 and greater for this test to run. I see 
there is a MySQL 5.1 and 6 now.


Anyway, I tried the same version of DBD::mysql with a mysql server we 
have here and got the same failures but it did not hang:


PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e 
test_harness(0, 'blib/lib', 'blib/arch') t/*.t

t/00baseok
t/10connect.ok

Re: Problems installing DBI and DBD::mysql to a local directory

2009-01-08 Thread Bart Lateur
On Thu, 08 Jan 2009 13:48:02 +, Martin Evans wrote:

Looks like you are not the only one with this chopblanks problem:

http://www.nabble.com/Bundle::Bugzilla-install-hangs-td20363858.html
http://lists.mysql.com/perl/4296
http://ppm4.activestate.com/i686-linux/5.8/818/C/CA/CAPTTOFU/DBD-mysql-4.008.d/log-20080816T160904.txt

so I'd doubt it is due to the way you are installing it. The second one 
looks identical to yours and is still unanswered.

I assume the database could be doing it.

The OP appears to be using a version of Mysql  5, so maybe it's
something an older version of the DB does? Under specific configuration
settings, perhaps?

-- 
Bart.