in reply to Re: Really stumped trying to compile DBD::ODBC
in thread Really stumped trying to compile DBD::ODBC

Hi Rob,

Thanks for the help! I can't find any errors about missing files, but I'll attach the make output from using regular perl then using ActivePerl (sorry about all this text!)

$ make realclean > /dev/null 2>&1
$ perl Makefile.PL -o /var/root/perforce_install/ODBC/libiodbc_install_dir
Useless use of private variable in void context at Makefile.PL line 52 +4. You are using a Perl configured with threading enabled. Please read the warnings in DBI about this. You should also be aware that on non-Windows platforms ODBC drivers co +me in two forms, thread-safe and non-thread-safe drivers and you may need to make sure you are using the right one. Press return to continue... Overriding ODBC Directory with command line option: /var/root/perforce +_install/ODBC/libiodbc_install_dir >>> Remember to actually *READ* the README file! And re-read it if you have any problems. Overriding ODBC Directory with command line option: /var/root/perforce +_install/ODBC/libiodbc_install_dir Using ODBC in /var/root/perforce_install/ODBC/libiodbc_install_dir Umm, this looks like a unixodbc type of driver manager. We expect to find the sql.h, sqlext.h and (which were supplied with unixODBC) in $ODBCHOME/include directory alongside the /var/root/perforce_install/ODBC/libiodbc_install_dir/lib/libodbc.a + library in $ODBCHOME/lib Warning: LD_LIBRARY_PATH doesn't include /var/root/perforce_install/OD +BC/libiodbc_install_dir Checking if your kit is complete... Looks good Using DBI 1.52 (for perl 5.008008 on darwin-thread-multi-2level) insta +lled in /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level/ +auto/DBI/ Using DBI 1.52 (for perl 5.008008 on darwin-thread-multi-2level) insta +lled in /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level/ +auto/DBI/ Writing Makefile for DBD::ODBC The DBD::ODBC tests will use these values for the database connection: DBI_DSN= e.g. dbi:ODBC:demo DBI_USER= DBI_PASS= Warning: not all required environment variables are set.
$ make
cp Changes blib/lib/DBD/ODBC/Changes.pm cp ODBC.pm blib/lib/DBD/ODBC.pm cc -c -I/var/root/perforce_install/ODBC/libiodbc_install_dir/include +-I. -I/System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level/au +to/DBI -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cp +p-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/l +ocal/include -O3 -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" "-I/Syst +em/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE" -I/var/root/p +erforce_install/ODBC/libiodbc_install_dir/include ConvertUTF.c /usr/bin/perl -p -e "s/~DRIVER~/ODBC/g" /System/Library/Perl/Extras/5. +8.8/darwin-thread-multi-2level/auto/DBI/Driver.xst > ODBC.xsi /usr/bin/perl /System/Library/Perl/5.8.8/ExtUtils/xsubpp -typemap /Sy +stem/Library/Perl/5.8.8/ExtUtils/typemap ODBC.xs > ODBC.xsc && mv OD +BC.xsc ODBC.c Warning: duplicate function definition 'data_sources' detected in ODBC +.xs, line 202 cc -c -I/var/root/perforce_install/ODBC/libiodbc_install_dir/include +-I. -I/System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level/au +to/DBI -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cp +p-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/l +ocal/include -O3 -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" "-I/Syst +em/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE" -I/var/root/p +erforce_install/ODBC/libiodbc_install_dir/include ODBC.c ODBC.xs: In function 'XS_DBD__ODBC__dr_data_sources': ODBC.xs:231: warning: pointer targets in passing argument 1 of 'strcpy +' differ in signedness ODBC.xs:251: warning: pointer targets in passing argument 2 of 'Perl_n +ewSVpv' differ in signedness ODBC.xs: In function 'XS_DBD__ODBC__dr_data_sources': ODBC.xs:231: warning: pointer targets in passing argument 1 of 'strcpy +' differ in signedness ODBC.xs:251: warning: pointer targets in passing argument 2 of 'Perl_n +ewSVpv' differ in signedness cc -c -I/var/root/perforce_install/ODBC/libiodbc_install_dir/include +-I. -I/System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level/au +to/DBI -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cp +p-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/l +ocal/include -O3 -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" "-I/Syst +em/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE" -I/var/root/p +erforce_install/ODBC/libiodbc_install_dir/include dbdimp.c dbdimp.c: In function 'odbc_db_login6': ... ## NOW THE WARNINGS START ### ... dbdimp.c: In function 'odbc_db_login6': dbdimp.c:582: warning: pointer targets in passing argument 3 of 'SQLDr +iverConnect' differ in signedness dbdimp.c:582: warning: pointer targets in passing argument 5 of 'SQLDr +iverConnect' differ in signedness dbdimp.c:641: warning: pointer targets in passing argument 2 of 'SQLCo +nnect' differ in signedness dbdimp.c:641: warning: pointer targets in passing argument 4 of 'SQLCo +nnect' differ in signedness dbdimp.c:641: warning: pointer targets in passing argument 6 of 'SQLCo +nnect' differ in signedness ... dbdimp.c: In function 'odbc_st_tables': dbdimp.c:1298: warning: pointer targets in passing argument 2 of 'SQLT +ables' differ in signedness dbdimp.c:1298: warning: pointer targets in passing argument 4 of 'SQLT +ables' differ in signedness dbdimp.c:1298: warning: pointer targets in passing argument 6 of 'SQLT +ables' differ in signedness dbdimp.c:1298: warning: pointer targets in passing argument 8 of 'SQLT +ables' differ in signedness ... dbdimp.c: At top level: dbdimp.c:3019: warning: declaration does not declare anything dbdimp.c:3019: warning: no semicolon at end of struct or union dbdimp.c:3019: error: syntax error before numeric constant dbdimp.c:3021: warning: data definition has no type or storage class dbdimp.c:3023: error: syntax error before 'S_db_storeOptions' ... dbdimp.c:3023: error: syntax error before 'S_db_storeOptions' dbdimp.c:3043: warning: initialization makes integer from pointer with +out a cast dbdimp.c:3024: warning: braces around scalar initializer dbdimp.c:3024: warning: (near initialization for 'S_db_storeOptions[]' +) dbdimp.c:3046: error: syntax error before '*' token dbdimp.c:3024: warning: initialization makes integer from pointer with +out a cast dbdimp.c:3047: error: syntax error before '*' token ... dbdimp.c:3044: warning: data definition has no type or storage class dbdimp.c:3046: error: syntax error before '*' token dbdimp.c:3047: error: syntax error before '*' token dbdimp.c: In function 'S_dbOption': dbdimp.c:3050: error: 'pars' undeclared (first use in this function) dbdimp.c:3050: error: (Each undeclared identifier is reported only onc +e dbdimp.c:3050: error: for each function it appears in.) dbdimp.c:3051: error: 'key' undeclared (first use in this function) dbdimp.c:3051: error: 'len' undeclared (first use in this function) dbdimp.c: In function 'odbc_db_STORE_attrib': dbdimp.c:3077: error: nested functions are disabled, use -fnested-func +tions to re-enable dbdimp.c:3077: error: syntax error before '*' token dbdimp.c:3080: error: 'pars' undeclared (first use in this function) dbdimp.c:3272: error: syntax error before numeric constant ... dbdimp.c: In function 'odbc_db_columns': dbdimp.c:4204: warning: pointer targets in passing argument 2 of 'SQLC +olumns' differ in signedness dbdimp.c:4204: warning: pointer targets in passing argument 4 of 'SQLC +olumns' differ in signedness dbdimp.c:4204: warning: pointer targets in passing argument 6 of 'SQLC +olumns' differ in signedness dbdimp.c:4204: warning: pointer targets in passing argument 8 of 'SQLC +olumns' differ in signedness lipo: can't open input file: /var/tmp//ccnAJMj8.out (No such file or d +irectory) make: *** [dbdimp.o] Error 1

I cut out some of the repeating errors.. But now I'll do the same thing for the ActivePerl build output

$ make realclean > /dev/null 2>&1
$ perl Makefile.PL -o /var/root/perforce_install/ODBC/libiodbc_install_dir
## THIS OUTPUT WAS THE SAME AS BEFORE ##
$make
cp Changes blib/lib/DBD/ODBC/Changes.pm cp ODBC.pm blib/lib/DBD/ODBC.pm gcc -c -I/var/root/perforce_install/ODBC/libiodbc_install_dir/include + -I. -I/usr/local/ActivePerl-5.8/lib/auto/DBI -fno-common -DPERL_DARW +IN -no-cpp-precomp -arch ppc -arch i386 -nostdinc -B/Developer/SDKs/M +acOSX10.4u.sdk/usr/include/gcc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/ +lib/gcc -isystem/Developer/SDKs/MacOSX10.4u.sdk/usr/include -F/Develo +per/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -mmacosx-version-m +in=10.3 -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -DPRIVLIB_LAST_IN_INC -fno +-strict-aliasing -pipe -O3 -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" + "-I/usr/local/ActivePerl-5.8/lib/CORE" -I/var/root/perforce_instal +l/ODBC/libiodbc_install_dir/include ConvertUTF.c /usr/local/ActivePerl-5.8/bin/perl -p -e "s/~DRIVER~/ODBC/g" /usr/loca +l/ActivePerl-5.8/lib/auto/DBI/Driver.xst > ODBC.xsi /usr/local/ActivePerl-5.8/bin/perl /usr/local/ActivePerl-5.8/lib/ExtUt +ils/xsubpp -typemap /usr/local/ActivePerl-5.8/lib/ExtUtils/typemap +ODBC.xs > ODBC.xsc && mv ODBC.xsc ODBC.c Warning: duplicate function definition 'data_sources' detected in ODBC +.xs, line 202 gcc -c -I/var/root/perforce_install/ODBC/libiodbc_install_dir/include + -I. -I/usr/local/ActivePerl-5.8/lib/auto/DBI -fno-common -DPERL_DARW +IN -no-cpp-precomp -arch ppc -arch i386 -nostdinc -B/Developer/SDKs/M +acOSX10.4u.sdk/usr/include/gcc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/ +lib/gcc -isystem/Developer/SDKs/MacOSX10.4u.sdk/usr/include -F/Develo +per/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -mmacosx-version-m +in=10.3 -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -DPRIVLIB_LAST_IN_INC -fno +-strict-aliasing -pipe -O3 -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" + "-I/usr/local/ActivePerl-5.8/lib/CORE" -I/var/root/perforce_instal +l/ODBC/libiodbc_install_dir/include ODBC.c ODBC.xs: In function 'XS_DBD__ODBC__dr_data_sources': ODBC.xs:231: warning: pointer targets in passing argument 1 of 'strcpy +' differ in signedness ODBC.xs:251: warning: pointer targets in passing argument 2 of 'Perl_n +ewSVpv' differ in signedness ODBC.xs: In function 'XS_DBD__ODBC__dr_data_sources': ODBC.xs:231: warning: pointer targets in passing argument 1 of 'strcpy +' differ in signedness ODBC.xs:251: warning: pointer targets in passing argument 2 of 'Perl_n +ewSVpv' differ in signedness gcc -c -I/var/root/perforce_install/ODBC/libiodbc_install_dir/include + -I. -I/usr/local/ActivePerl-5.8/lib/auto/DBI -fno-common -DPERL_DARW +IN -no-cpp-precomp -arch ppc -arch i386 -nostdinc -B/Developer/SDKs/M +acOSX10.4u.sdk/usr/include/gcc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/ +lib/gcc -isystem/Developer/SDKs/MacOSX10.4u.sdk/usr/include -F/Develo +per/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -mmacosx-version-m +in=10.3 -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -DPRIVLIB_LAST_IN_INC -fno +-strict-aliasing -pipe -O3 -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" + "-I/usr/local/ActivePerl-5.8/lib/CORE" -I/var/root/perforce_instal +l/ODBC/libiodbc_install_dir/include dbdimp.c ... ## SEEMS LIKE THE SAME SORT OF WARNINGS, BUT A LOT LESS OUTPUT THAN BE +FORE ### ... dbdimp.c: In function 'odbc_db_login6': dbdimp.c:582: warning: pointer targets in passing argument 3 of 'SQLDr +iverConnect' differ in signedness dbdimp.c:582: warning: pointer targets in passing argument 5 of 'SQLDr +iverConnect' differ in signedness dbdimp.c:641: warning: pointer targets in passing argument 2 of 'SQLCo +nnect' differ in signedness dbdimp.c:641: warning: pointer targets in passing argument 4 of 'SQLCo +nnect' differ in signedness dbdimp.c:641: warning: pointer targets in passing argument 6 of 'SQLCo +nnect' differ in signedness ... gcc -c -I/var/root/perforce_install/ODBC/libiodbc_install_dir/include + -I. -I/usr/local/ActivePerl-5.8/lib/auto/DBI -fno-common -DPERL_DARW +IN -no-cpp-precomp -arch ppc -arch i386 -nostdinc -B/Developer/SDKs/M +acOSX10.4u.sdk/usr/include/gcc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/ +lib/gcc -isystem/Developer/SDKs/MacOSX10.4u.sdk/usr/include -F/Develo +per/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -mmacosx-version-m +in=10.3 -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -DPRIVLIB_LAST_IN_INC -fno +-strict-aliasing -pipe -O3 -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\" + "-I/usr/local/ActivePerl-5.8/lib/CORE" -I/var/root/perforce_instal +l/ODBC/libiodbc_install_dir/include unicode_helper.c Running Mkbootstrap for DBD::ODBC () chmod 644 ODBC.bs rm -f blib/arch/auto/DBD/ODBC/ODBC.bundle env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_looku +p -Wl,-search_paths_first -arch ppc -arch i386 -Wl,-syslibroot,/Devel +oper/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3 ConvertUTF.o ODBC +.o dbdimp.o unicode_helper.o -o blib/arch/auto/DBD/ODBC/ODBC.bundle + \ -L/var/root/perforce_install/ODBC/libiodbc_install_dir/lib +-lodbc \ ld: warning in /var/root/perforce_install/ODBC/libiodbc_install_dir/li +b/libodbc.a, file is not of required architecture chmod 755 blib/arch/auto/DBD/ODBC/ODBC.bundle cp ODBC.bs blib/arch/auto/DBD/ODBC/ODBC.bs chmod 644 blib/arch/auto/DBD/ODBC/ODBC.bs Manifying blib/man3/DBD::ODBC.3

Does this help at all? Another thing I'm not sure of is the message about 'required architecture' at the end. That install_dir was compiled by his very machine? How can it not have the correct architecture?

Again, thanks for any help!
-Blair

20080221 Janitored by Corion: Added readmore tag, as per Writeup Formatting Tips