Problem installing DBD against 4.1.3 on MacOS 10.3.5

Marc MacIntyre <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
DBI 1.43,
mysql  Ver 14.5 Distrib 4.1.3-beta,
DBD 2.9004
Perl 5.8.1

Here's the first error:

/usr/bin/perl /System/Library/Perl/5.8.1/ExtUtils/xsubpp  -typemap 
/System/Library/Perl/5.8.1/ExtUtils/typemap  mysql.xs > mysql.xsc && mv 
mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 
196
Warning: duplicate function definition 'rows' detected in mysql.xs, 
line 294
cc -c  -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI 
-I/usr/local/mysql/include -fno-omit-frame-pointer -g -pipe -pipe 
-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing 
-I/usr/local/include -Os   -DVERSION=\"2.9004\" -DXS_VERSION=\"2.9004\" 
  "-I/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE"   
mysql.c
mysql.xs: In function `XS_DBD__mysql__GetInfo_dbd_mysql_get_info':
mysql.xs:359: error: `net_buffer_length' undeclared (first use in this 
function)
mysql.xs:359: error: (Each undeclared identifier is reported only once
mysql.xs:359: error: for each function it appears in.)
make: *** [mysql.o] Error 1

mysql.h has:
#if !defined(MYSQL_CLIENT) && !defined(MYSQL_SERVER) && 
!defined(EMBEDDED_LIBRARY)
#define max_allowed_packet 
(*mysql_get_parameters()->p_max_allowed_packet)
#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
#endif

The conditional define is breaking the compile.  Probably a poorly 
installed mysql, though I compared mysql.h on the mac to the same 
version on linux, and the conditional didn't include MYSQL_CLIENT.

I copied the net_buffer_length definition into  constants.h, and it 
worked ok, until I ran into this:

LD_RUN_PATH="/usr/lib" /usr/bin/perl myld MACOSX_DEPLOYMENT_TARGET=10.3 
cc  -bundle -undefined dynamic_lookup -L/usr/local/lib dbdimp.o mysql.o 
  -o blib/arch/auto/DBD/mysql/mysql.bundle   
-L/usr/local/mysql-standard-4.1.3-beta-apple-darwin6.8-powerpc/lib 
-lmysqlclient -lz -lm
make: *** [blib/arch/auto/DBD/mysql/mysql.bundle] Error 255

The offender is the myld script, which fails on a non-zero return value 
from the system call - even though a value of 255 >>8 (as perl likes) 
should be zero.  Not sure why the lower 8 bits aren't cleared, but 
removing the myld call from the makefile seemed to clear things up.

I've got it installed, and it connects to the db fine - haven't done 
any more testing, so I can't guarantee my workarounds are ok, so YMMV.


-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
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.