Compile error in dbdimp.c. v 3.0007

"Guillermo Gozalbes" <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
I can't compile the latest version of DBD:mysql downloaded from CPAN.

-
cpan> install DBD:mysql
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Tue, 19 Sep 2006 04:32:30 GMT
Running install for module DBD::mysql
Running make for C/CA/CAPTTOFU/DBD-mysql-3.0007.tar.gz
CPAN: Digest::SHA loaded ok

  CPAN: Module::Signature security checks disabled because Module::Signature
  not installed.  Please consider installing the Module::Signature module.
  You may also need to be able to connect over the Internet to the public
  keyservers like pgp.mit.edu (port 11371).

CPAN: Compress::Zlib loaded ok
Checksum for /root/.cpan/sources/authors/id/C/CA/CAPTTOFU/DBD-
mysql-3.0007.tar.gz ok
Scanning cache /root/.cpan/build for sizes
DBD-mysql-3.0007/
DBD-mysql-3.0007/ChangeLog
DBD-mysql-3.0007/constants.h
DBD-mysql-3.0007/dbdimp.c
DBD-mysql-3.0007/dbdimp.h
DBD-mysql-3.0007/eg/
DBD-mysql-3.0007/eg/prepare_memory_usage.pl
DBD-mysql-3.0007/eg/proc_example1.pl
DBD-mysql-3.0007/eg/proc_example2.pl
DBD-mysql-3.0007/eg/proc_example3.pl
DBD-mysql-3.0007/INSTALL.html
DBD-mysql-3.0007/lib/
DBD-mysql-3.0007/lib/Bundle/
DBD-mysql-3.0007/lib/Bundle/DBD/
DBD-mysql-3.0007/lib/Bundle/DBD/mysql.pm
DBD-mysql-3.0007/lib/DBD/
DBD-mysql-3.0007/lib/DBD/mysql/
DBD-mysql-3.0007/lib/DBD/mysql/GetInfo.pm
DBD-mysql-3.0007/lib/DBD/mysql/INSTALL.pod
DBD-mysql-3.0007/lib/DBD/mysql.pm
DBD-mysql-3.0007/lib/Mysql/
DBD-mysql-3.0007/lib/Mysql/Statement.pm
DBD-mysql-3.0007/lib/Mysql.pm
DBD-mysql-3.0007/Makefile.PL
DBD-mysql-3.0007/Makefile.PL.embedded
DBD-mysql-3.0007/MANIFEST
DBD-mysql-3.0007/MANIFEST.SKIP
DBD-mysql-3.0007/META.yml
DBD-mysql-3.0007/myld
DBD-mysql-3.0007/mysql.xs
DBD-mysql-3.0007/README
DBD-mysql-3.0007/t/
DBD-mysql-3.0007/t/00base.t
DBD-mysql-3.0007/t/10dsnlist.t
DBD-mysql-3.0007/t/20createdrop.t
DBD-mysql-3.0007/t/30insertfetch.t
DBD-mysql-3.0007/t/35limit.t
DBD-mysql-3.0007/t/35prepare.t
DBD-mysql-3.0007/t/40bindparam.t
DBD-mysql-3.0007/t/40bindparam2.t
DBD-mysql-3.0007/t/40blobs.t
DBD-mysql-3.0007/t/40listfields.t
DBD-mysql-3.0007/t/40nulls.t
DBD-mysql-3.0007/t/40numrows.t
DBD-mysql-3.0007/t/41bindparam.t
DBD-mysql-3.0007/t/41blobs_prepare.t
DBD-mysql-3.0007/t/42bindparam.t
DBD-mysql-3.0007/t/50chopblanks.t
DBD-mysql-3.0007/t/50commit.t
DBD-mysql-3.0007/t/60leaks.t
DBD-mysql-3.0007/t/dbdadmin.t
DBD-mysql-3.0007/t/insertid.t
DBD-mysql-3.0007/t/lib.pl
DBD-mysql-3.0007/t/mysql.dbtest
DBD-mysql-3.0007/t/param_values.t
DBD-mysql-3.0007/t/._prepare_noerror.t
DBD-mysql-3.0007/t/prepare_noerror.t
DBD-mysql-3.0007/t/texecute.t
DBD-mysql-3.0007/TODO
Removing previously used /root/.cpan/build/DBD-mysql-3.0007

  CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-3.0007.tar.gz

I will use the following settings for compiling and testing:

  cflags        (mysql_config) = -I/usr/include/mysql -DBIG_JOINS=1
  embedded      (mysql_config) =
  libs          (mysql_config) = -L/usr/lib -lmysqlclient -lz -lcrypt -lnsl
-lm
  mysql_config  (guessed     ) = mysql_config
  nocatchstderr (default     ) = 0
  nofoundrows   (default     ) = 0
  ssl           (guessed     ) = 0
Use of uninitialized value in printf at Makefile.PL line 172, <PIPE> line
103.
  test_user     (            ) =
  testdb        (default     ) = test
  testhost      (default     ) =
  testpassword  (default     ) =
  testsocket    (default     ) =
  testuser      (default     ) =

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

Checking if your kit is complete...
Looks good
Using DBI 1.46 (for perl 5.008004 on i386-linux-thread-multi) installed in
/usr/lib/perl5/auto/DBI/
Writing Makefile for DBD::mysql
CPAN: YAML loaded ok
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/Mysql.pm blib/lib/Mysql.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cc -c  -I/usr/lib/perl5/auto/DBI/ -I/usr/include/mysql -DBIG_JOINS=1
-DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_REENTRANT -D_GNU_SOURCE
-DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"3.0007\"
-DXS_VERSION=\"3.0007\" -fPIC "-I/usr/lib/perl/5.8/CORE"   dbdimp.c
dbdimp.c: In function `mysql_st_internal_execute':
dbdimp.c:2390: parse error before `rows'
dbdimp.c:2467: `rows' undeclared (first use in this function)
dbdimp.c:2467: (Each undeclared identifier is reported only once
dbdimp.c:2467: for each function it appears in.)
make: *** [dbdimp.o] Error 1
  /usr/bin/make  -- NOT OK
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible
Failed during this command:
  CAPTTOFU/DBD-mysql-3.0007.tar.gz             : make NO

-

In line 2390 of dbdimp.c i see the "rows" variable declaration in the code
but not in declaration space. This is correct in C?

How can solve it?
I need to move the declaration to the top of function?

Normally in install dbd:mysql using CPAN install.

How i can find the patched package .gz?

Regards,

-- 
--
Guillermo Gozalbes
Versus Soft S.L.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.