building Perl module DBD-ODBC-4.3 under 64-bit cygwin

Simon Barnes
Thu Aug 1 12:57:00 GMT 2013

I'm having difficulty with this and would appreciate any suggestions.   It does build under 32-bit cygwin.


cygwin> perl Makefile.PL

        Remember to actually *READ* the README file!
        And re-read it if you have any problems.


OSNAME: cygwin
WINDIR: C:\Windows
Perl: 5.014004
ExtUtils::MakeMaker: 6.57_05
Command line options:
  u! = undef
  w! = undef
  e! = undef
  g! = 0
  x! = undef
  o=s =

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 come
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...
Using ODBCHOME /usr
  Looking for iODBC libs in /usr/lib
    Found iODBC libs /usr/lib/libiodbc.dll.a,/usr/lib/libiodbcinst.dll.a in /usr/lib

This looks like a iodbc type of driver manager.
Warning: LD_LIBRARY_PATH doesn't include /usr/lib

Checking if your kit is complete...
Looks good
Using DBI 1.623 (for perl 5.014004 on cygwin-thread-multi) installed in /usr/lib/perl5/vendor_perl/5.14/x86_64-cygwin-threads/auto/DBI/
Using DBI 1.623 (for perl 5.014004 on cygwin-thread-multi) installed in /usr/lib/perl5/vendor_perl/5.14/x86_64-cygwin-threads/auto/DBI/
Writing Makefile for DBD::ODBC
Writing MYMETA.yml
Warning: not all required environment variables are set.

Warning: Will not be able to run tests as you have not defined
all of DBI_DSN, DBI_USER and DBI_PASS environment variables.
cygwin> make
cp Changes blib/lib/DBD/ODBC/
cp FAQ blib/lib/DBD/ODBC/
cp TO_DO blib/lib/DBD/ODBC/
cp blib/lib/DBD/
gcc -c -DWITH_UNICODE -I/usr/include  -I. -I/usr/include/w32api -I/usr/lib/perl5/vendor_perl/5.14/x86_64-cygwin-threads/auto/DBI  -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -O3    -DVERSION=\"1.43\"  -DXS_VERSION=\"1.43\"  "-I/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE"  -DWITH_UNICODE -I/usr/include ConvertUTF.c
/usr/bin/perl.exe -p -e "s/~DRIVER~/ODBC/g" /usr/lib/perl5/vendor_perl/5.14/x86_64-cygwin-threads/auto/DBI/Driver.xst > ODBC.xsi
/usr/bin/perl.exe /usr/lib/perl5/5.14/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.14/ExtUtils/typemap  ODBC.xs > ODBC.xsc && mv ODBC.xsc ODBC.c
Warning: duplicate function definition 'data_sources' detected in ODBC.xs, line 482
gcc -c -DWITH_UNICODE -I/usr/include  -I. -I/usr/include/w32api -I/usr/lib/perl5/vendor_perl/5.14/x86_64-cygwin-threads/auto/DBI  -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -O3    -DVERSION=\"1.43\"  -DXS_VERSION=\"1.43\"  "-I/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE"  -DWITH_UNICODE -I/usr/include ODBC.c
In file included from /usr/local/include/sql.h:19:0,
                 from dbdodbc.h:7,
                 from ODBC.h:8,
                 from ODBC.xs:1:
/usr/local/include/sqltypes.h:261:33: error: conflicting types for 'ULONG'
 typedef unsigned long           ULONG;
In file included from /usr/include/w32api/windows.h:69:0,
                 from dbdodbc.h:6,
                 from ODBC.h:8,
                 from ODBC.xs:1:
/usr/include/w32api/windef.h:25:27: note: previous declaration of 'ULONG' was here
 typedef unsigned __LONG32 ULONG;
Makefile:390: recipe for target `ODBC.o' failed
make: *** [ODBC.o] Error 1

cygwin> uname -a
CYGWIN_NT-6.1 SLB-70DFXN1 1.7.22(0.268/5/3) 2013-07-22 17:06 x86_64 Cygwin

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list