I suspect you're using an old version of DBI (I'd guess <= 1.55). Try using a more recent version.
Tim. On Mon, Apr 21, 2008 at 01:35:08PM +0100, Neil Beddoe wrote: > > Thanks for looking at this Martin. I'm a bit out of my depth here. > > The line in ODBC.xsi is: > > if (DBIc_CACHED_KIDS(imp_dbh)) { > SvREFCNT_dec(DBIc_CACHED_KIDS(imp_dbh)); /* cast them to > the winds */ > DBIc_CACHED_KIDS(imp_dbh) = Nullhv; #ERROR_GENERATED_HERE > } > > This is line 277, the same assignment fails in line 336. > > -----Original Message----- > From: Martin Evans [mailto:[EMAIL PROTECTED] > Sent: 21 April 2008 13:17 > To: dbi-users@perl.org > Subject: Re: Unable to install DBD::ODBC on OSX Leopard 10.5.2 > > Martin Evans wrote: > > Neil Beddoe wrote: > >>>> You also may need to add "-framework CoreFoundation" > >>>> to the Makefile for the LDLOADLIBS and EXTRALIBS symbols and that > >>>> will > >> be the at least one of the issues with Sybase too >>(see README.osx > >> in distribution). > >> Hello Martin, I've tried this on my system and still no luck. I'm > >> not sure I'm carrying it out correctly though. I run perl > >> Makefile.PL and edit the Makefile it generates like this: > >> > >> EXTRALIBS = -L/usr/lib -lodbc -framework CoreFoundation LDLOADLIBS = > >> -L/usr/lib -lodbc -framework CoreFoundation > > > > Not having a mac I'm only going on what others have told me but I > > believe the above to be right. However, your make has not got to the > > point where the framework comes into the equation yet - see below. > > > > > >> ...but this generates the output below. Any help you can offer would > > >> be gratefully received. > >> > >> Mac OS 10.5.2 Intel Core Duo > >> > >> cc -c -I/usr/include -I. > >> -I/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI -arch i386 > >> -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp > >> -fno-strict-aliasing -Wdeclaration-after-statement > -I/usr/local/include > >> -O3 -DVERSION=\"1.16_1\" -DXS_VERSION=\"1.16_1\" > >> "-I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE" > >> -I/usr/include ODBC.c > >> ODBC.xsi: In function 'XS_DBD__ODBC__db_disconnect': > >> ODBC.xsi:277: error: invalid lvalue in assignment > >> ODBC.xsi: In function 'XS_DBD__ODBC__db_DESTROY': > >> ODBC.xsi:336: error: invalid lvalue in assignment > >> ODBC.xsi: In function 'XS_DBD__ODBC__db_disconnect': > >> ODBC.xsi:277: error: invalid lvalue in assignment > >> ODBC.xsi: In function 'XS_DBD__ODBC__db_DESTROY': > >> ODBC.xsi:336: error: invalid lvalue in assignment > > > > These are compilation errors and they are stopping the build. What is > > on lines 277 and 336 of ODBC.xsi? > > > >> ODBC.xs: In function 'XS_DBD__ODBC__dr_data_sources': > >> ODBC.xs:246: warning: pointer targets in passing argument 1 of > 'strcpy' > >> differ in signedness > >> ODBC.xs:266: warning: pointer targets in passing argument 2 of > >> 'Perl_newSVpv' differ in signedness > >> ODBC.xs: In function 'XS_DBD__ODBC__dr_data_sources': > >> ODBC.xs:246: warning: pointer targets in passing argument 1 of > 'strcpy' > >> differ in signedness > >> ODBC.xs:266: warning: pointer targets in passing argument 2 of > >> 'Perl_newSVpv' differ in signedness > >> lipo: can't open input file: /var/tmp//ccx0pa5P.out (No such file or > >> directory) > >> make: *** [ODBC.o] Error 1 > > > > Martin > > I've managed to blag an ssh session on a MAC running 10.5.2, Perl 5.8.8 > and DBI 1.52. I made no changes at all to the Makefile and it built ok. > However, it fails to run with: > > t/01base................ok 1/5install_driver(ODBC) failed: Can't load > '/Users/wez/mje/DBD-ODBC-1.16_1/blib/arch/auto/DBD/ODBC/ODBC.bundle' for > module DBD::ODBC: > dlopen(/Users/wez/mje/DBD-ODBC-1.16_1/blib/arch/auto/DBD/ODBC/ODBC.bundl > e, > 2): Symbol not found: ___CFConstantStringClassReference > Referenced from: > /Users/wez/mje/DBD-ODBC-1.16_1/blib/arch/auto/DBD/ODBC/ODBC.bundle > Expected in: dynamic lookup > at (eval 7) line 3 > Compilation failed in require at (eval 7) line 3. > > If I then change the Makefile to include -framework CoreFoundation in > EXTRALIBS and LDLOADLIBS it gets further but unfortunately the mac I was > using was Intel based (I didn't realise this at first) and the only > driver I could find was built for ppc so it gave: > > mach-o, but wrong architecture > > for the ODBC driver shared library. > > If you can mail what is on the lines you got errors for in ODBC.xsi we > may be able to wwork it out. > > Martin > -- > Martin J. Evans > Easysoft Limited > http://www.easysoft.com > > . > > This message is intended only for the use of the person(s) to whom it is > addressed. It may contain information which is privileged and confidential. > Accordingly any unauthorised use is strictly prohibited. If you are not the > intended recipient, please contact the sender as soon as possible. > > It is not intended as an offer or solicitation for the purchase or sale of > any financial instrument or as an official confirmation of any transaction, > unless specifically agreed otherwise. All market prices, data and other > information are not warranted as to completeness or accuracy and are subject > to change without notice. Any opinions or advice contained in this Internet > email are subject to the terms and conditions expressed in any applicable > governing Marble Bar Asset Management LLP's terms and conditions of business > or client agreement letter. Any comments or statements made herein do not > necessarily reflect those of Marble Bar Asset Management LLP. > > Marble Bar Asset Management LLP is regulated and authorised by the FSA.