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.bundle, 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

Reply via email to