in reply to Re: Building DBI, DBD::ODBC for 64 bit perl Win
in thread Building DBI, DBD::ODBC for 64 bit perl Win

Hi syp,

Thanks for the tip. I have actually downloaded the Platform SDK already and when I try to make DBI the following error comes up. A lot of them are warnings, but there is a fatal error at the end which is LINK : fatal error LNK1181: cannot open input file 'bufferoverflowU.lib'. Am I missing something here? Maybe I will try Corion's idea to compile perl from source as well see if it helps.

Will let you all know how it turns out.

C:\Perl64\bin\perl.exe -MExtUtils::Command -e rm_f blib\lib\DB +I\Roadmap. pm C:\Perl64\bin\perl.exe -MExtUtils::Command -e cp Roadmap.pod b +lib\lib\DB I\Roadmap.pm cp dbd_xsh.h blib\arch\auto\DBI\dbd_xsh.h cp dbivport.h blib\arch\auto\DBI\dbivport.h cp lib/DBD/Gofer/Transport/Base.pm blib\lib\DBD\Gofer\Transport\Base.p +m cp dbixs_rev.h blib\arch\auto\DBI\dbixs_rev.h cp Driver_xst.h blib\arch\auto\DBI\Driver_xst.h cp lib/DBD/Proxy.pm blib\lib\DBD\Proxy.pm cp lib/DBI/Gofer/Response.pm blib\lib\DBI\Gofer\Response.pm cp lib/DBI/Gofer/Transport/Base.pm blib\lib\DBI\Gofer\Transport\Base.p +m cp lib/DBI/Util/_accessor.pm blib\lib\DBI\Util\_accessor.pm cp lib/DBD/DBM.pm blib\lib\DBD\DBM.pm cp DBIXS.h blib\arch\auto\DBI\DBIXS.h cp Roadmap.pod blib\lib\Roadmap.pod cp dbixs_rev.pl blib\lib\dbixs_rev.pl cp lib/DBI/Const/GetInfoType.pm blib\lib\DBI\Const\GetInfoType.pm cp lib/DBI/Gofer/Serializer/DataDumper.pm blib\lib\DBI\Gofer\Serialize +r\DataDump er.pm cp lib/DBI/DBD/Metadata.pm blib\lib\DBI\DBD\Metadata.pm cp lib/DBD/Gofer/Transport/pipeone.pm blib\lib\DBD\Gofer\Transport\pip +eone.pm cp lib/DBI/Const/GetInfo/ODBC.pm blib\lib\DBI\Const\GetInfo\ODBC.pm cp lib/DBI/ProfileDumper/Apache.pm blib\lib\DBI\ProfileDumper\Apache.p +m cp Driver.xst blib\arch\auto\DBI\Driver.xst cp lib/DBD/File.pm blib\lib\DBD\File.pm cp lib/DBI/Util/CacheMemory.pm blib\lib\DBI\Util\CacheMemory.pm cp lib/DBD/NullP.pm blib\lib\DBD\NullP.pm cp lib/DBI/ProfileSubs.pm blib\lib\DBI\ProfileSubs.pm cp dbi_sql.h blib\arch\auto\DBI\dbi_sql.h cp lib/DBD/Gofer.pm blib\lib\DBD\Gofer.pm cp lib/DBI/FAQ.pm blib\lib\DBI\FAQ.pm cp lib/DBD/Gofer/Policy/rush.pm blib\lib\DBD\Gofer\Policy\rush.pm cp lib/DBI/SQL/Nano.pm blib\lib\DBI\SQL\Nano.pm cp lib/DBI/Const/GetInfo/ANSI.pm blib\lib\DBI\Const\GetInfo\ANSI.pm cp lib/DBI/Gofer/Request.pm blib\lib\DBI\Gofer\Request.pm cp lib/DBD/Gofer/Transport/stream.pm blib\lib\DBD\Gofer\Transport\stre +am.pm cp lib/DBD/Gofer/Policy/classic.pm blib\lib\DBD\Gofer\Policy\classic.p +m cp lib/DBI/Const/GetInfoReturn.pm blib\lib\DBI\Const\GetInfoReturn.pm cp lib/DBD/Gofer/Policy/Base.pm blib\lib\DBD\Gofer\Policy\Base.pm cp DBI.pm blib\lib\DBI.pm cp lib/DBI/Gofer/Transport/stream.pm blib\lib\DBI\Gofer\Transport\stre +am.pm cp lib/DBI/Gofer/Serializer/Storable.pm blib\lib\DBI\Gofer\Serializer\ +Storable.p m cp lib/DBD/Sponge.pm blib\lib\DBD\Sponge.pm cp lib/DBD/Gofer/Policy/pedantic.pm blib\lib\DBD\Gofer\Policy\pedantic +.pm cp lib/DBI/W32ODBC.pm blib\lib\DBI\W32ODBC.pm cp lib/DBI/Gofer/Transport/pipeone.pm blib\lib\DBI\Gofer\Transport\pip +eone.pm cp lib/DBD/Gofer/Transport/null.pm blib\lib\DBD\Gofer\Transport\null.p +m cp lib/Bundle/DBI.pm blib\lib\Bundle\DBI.pm cp TASKS.pod blib\lib\TASKS.pod cp lib/DBI/Profile.pm blib\lib\DBI\Profile.pm cp lib/DBI/ProfileDumper.pm blib\lib\DBI\ProfileDumper.pm cp lib/DBI/ProxyServer.pm blib\lib\DBI\ProxyServer.pm cp lib/DBI/Gofer/Serializer/Base.pm blib\lib\DBI\Gofer\Serializer\Base +.pm cp dbipport.h blib\arch\auto\DBI\dbipport.h cp lib/DBI/Gofer/Execute.pm blib\lib\DBI\Gofer\Execute.pm cp lib/DBI/DBD.pm blib\lib\DBI\DBD.pm cp lib/Win32/DBIODBC.pm blib\lib\Win32\DBIODBC.pm cp lib/DBI/PurePerl.pm blib\lib\DBI\PurePerl.pm cp lib/DBD/ExampleP.pm blib\lib\DBD\ExampleP.pm cp lib/DBI/ProfileData.pm blib\lib\DBI\ProfileData.pm C:\Perl64\bin\perl.exe -p -e "s/~DRIVER~/Perl/g" .\Driver.xst +> Perl.xsi C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typemap + C:\Perl64 \lib\ExtUtils\typemap -typemap typemap Perl.xs > Perl.xsc && C:\Perl6 +4\bin\perl .exe -MExtUtils::Command -e mv Perl.xsc Perl.c cl -c -nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL -Wp64 -fp:pr +ecise -DWI N32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -D +NO_HASH_SE ED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT - +DPERL_IMPL ICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -Ox -GL - +Wp64 -fp:p recise -DVERSION=\"1.604\" -DXS_VERSION=\"1.604\" "-IC:\Perl64\li +b\CORE" Perl.c cl : Command line warning D9035 : option 'Wp64' has been deprecated an +d will be removed in a future release cl : Command line warning D9035 : option 'Wp64' has been deprecated an +d will be removed in a future release Perl.c c:\perl64\cpan\build\dbi-1.604-kvl4xv\Driver_xst.h(65) : warning C4996 +: 'sprintf ': This function or variable may be unsafe. Consider using sprintf_s i +nstead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for + details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' c:\perl64\cpan\build\dbi-1.604-kvl4xv\Driver_xst.h(92) : warning C4996 +: 'sprintf ': This function or variable may be unsafe. Consider using sprintf_s i +nstead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for + details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' c:\perl64\cpan\build\dbi-1.604-kvl4xv\Driver_xst.h(106) : warning C424 +4: 'functi on' : conversion from 'IV' to 'I32', possible loss of data c:\perl64\cpan\build\dbi-1.604-kvl4xv\Driver_xst.h(110) : warning C424 +4: 'functi on' : conversion from '__int64' to 'I32', possible loss of data Perl.xsi(61) : warning C4244: 'initializing' : conversion from '__int6 +4' to 'int ', possible loss of data Perl.xsi(192) : warning C4244: 'initializing' : conversion from '__int +64' to 'in t', possible loss of data Perl.xsi(623) : warning C4244: 'initializing' : conversion from '__int +64' to 'in t', possible loss of data C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typemap + C:\Perl64 \lib\ExtUtils\typemap -typemap typemap DBI.xs > DBI.xsc && C:\Perl64\ +bin\perl.e xe -MExtUtils::Command -e mv DBI.xsc DBI.c cl -c -nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL -Wp64 -fp:pr +ecise -DWI N32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -D +NO_HASH_SE ED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT - +DPERL_IMPL ICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -Ox -GL - +Wp64 -fp:p recise -DVERSION=\"1.604\" -DXS_VERSION=\"1.604\" "-IC:\Perl64\li +b\CORE" DBI.c cl : Command line warning D9035 : option 'Wp64' has been deprecated an +d will be removed in a future release cl : Command line warning D9035 : option 'Wp64' has been deprecated an +d will be removed in a future release DBI.c DBI.xs(208) : warning C4996: 'strcpy': This function or variable may b +e unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECU +RE_NO_WARN INGS. See online help for details. DBI.xs(259) : warning C4244: '=' : conversion from 'IV' to 'I32', poss +ible loss of data DBI.xs(447) : warning C4996: 'sprintf': This function or variable may +be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SE +CURE_NO_WA RNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' DBI.xs(677) : warning C4996: 'strerror': This function or variable may + be unsafe . Consider using strerror_s instead. To disable deprecation, use _CRT_ +SECURE_NO_ WARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +string.h(1 26) : see declaration of 'strerror' DBI.xs(864) : warning C4267: 'function' : conversion from 'size_t' to +'I32', pos sible loss of data DBI.xs(873) : warning C4267: 'function' : conversion from 'size_t' to +'I32', pos sible loss of data DBI.xs(876) : warning C4267: 'function' : conversion from 'size_t' to +'I32', pos sible loss of data DBI.xs(920) : warning C4996: 'strcpy': This function or variable may b +e unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECU +RE_NO_WARN INGS. See online help for details. DBI.xs(1057) : warning C4311: 'type cast' : pointer truncation from 'S +V *' to 'l ong' DBI.xs(1062) : warning C4996: 'strcpy': This function or variable may +be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SEC +URE_NO_WAR NINGS. See online help for details. DBI.xs(1063) : warning C4996: 'strcat': This function or variable may +be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SEC +URE_NO_WAR NINGS. See online help for details. DBI.xs(1201) : warning C4311: 'type cast' : pointer truncation from 'H +V *' to 'l ong' DBI.xs(1201) : warning C4311: 'type cast' : pointer truncation from 'i +mp_xxh_t * ' to 'long' DBI.xs(1316) : warning C4311: 'type cast' : pointer truncation from 'H +V *' to 'u nsigned long' DBI.xs(1324) : warning C4311: 'type cast' : pointer truncation from 'H +V *' to 'u nsigned long' DBI.xs(1331) : warning C4311: 'type cast' : pointer truncation from 'H +V *' to 'u nsigned long' DBI.xs(1372) : warning C4311: 'type cast' : pointer truncation from 'H +V *' to 'l ong' DBI.xs(1372) : warning C4311: 'type cast' : pointer truncation from 'i +mp_xxh_t * ' to 'long' DBI.xs(1472) : warning C4244: 'initializing' : conversion from 'IV' to + 'int', po ssible loss of data DBI.xs(1608) : warning C4244: '=' : conversion from 'IV' to 'U32', pos +sible loss of data DBI.xs(1730) : warning C4244: 'initializing' : conversion from 'IV' to + 'int', po ssible loss of data DBI.xs(1739) : warning C4244: '=' : conversion from 'IV' to 'int', pos +sible loss of data DBI.xs(1775) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(1866) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(1952) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(2070) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(2090) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(2296) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(2301) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(2402) : warning C4244: '=' : conversion from '__int64' to 'I32' +, possible loss of data DBI.xs(2474) : warning C4996: 'sprintf': This function or variable may + be unsafe . Consider using sprintf_s instead. To disable deprecation, use _CRT_S +ECURE_NO_W ARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' DBI.xs(2496) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(2499) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(2768) : warning C4244: '=' : conversion from 'IV' to 'int', pos +sible loss of data DBI.xs(2794) : warning C4311: 'type cast' : pointer truncation from 'P +erlInterpr eter *' to 'unsigned long' DBI.xs(2794) : warning C4311: 'type cast' : pointer truncation from 'P +erlInterpr eter *' to 'unsigned long' DBI.xs(2859) : warning C4996: 'sprintf': This function or variable may + be unsafe . Consider using sprintf_s instead. To disable deprecation, use _CRT_S +ECURE_NO_W ARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' DBI.xs(2882) : warning C4996: 'sprintf': This function or variable may + be unsafe . Consider using sprintf_s instead. To disable deprecation, use _CRT_S +ECURE_NO_W ARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' DBI.xs(2944) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(3028) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(3092) : warning C4311: 'type cast' : pointer truncation from 'S +V *' to 'l ong' DBI.xs(3148) : warning C4244: '=' : conversion from '__int64' to 'int' +, possible loss of data DBI.xs(3161) : warning C4244: '=' : conversion from '__int64' to 'I32' +, possible loss of data DBI.xs(3191) : warning C4244: 'initializing' : conversion from 'IV' to + 'const in t', possible loss of data DBI.xs(3227) : warning C4244: 'initializing' : conversion from 'IV' to + 'int', po ssible loss of data DBI.xs(3362) : warning C4996: 'sprintf': This function or variable may + be unsafe . Consider using sprintf_s instead. To disable deprecation, use _CRT_S +ECURE_NO_W ARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' DBI.xs(3725) : warning C4996: 'sprintf': This function or variable may + be unsafe . Consider using sprintf_s instead. To disable deprecation, use _CRT_S +ECURE_NO_W ARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' DBI.xs(3746) : warning C4996: 'sprintf': This function or variable may + be unsafe . Consider using sprintf_s instead. To disable deprecation, use _CRT_S +ECURE_NO_W ARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' DBI.xs(3750) : warning C4996: 'sprintf': This function or variable may + be unsafe . Consider using sprintf_s instead. To disable deprecation, use _CRT_S +ECURE_NO_W ARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' DBI.xs(3768) : warning C4996: 'sprintf': This function or variable may + be unsafe . Consider using sprintf_s instead. To disable deprecation, use _CRT_S +ECURE_NO_W ARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' DBI.xs(3781) : warning C4996: 'sprintf': This function or variable may + be unsafe . Consider using sprintf_s instead. To disable deprecation, use _CRT_S +ECURE_NO_W ARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' DBI.xs(4070) : warning C4244: '=' : conversion from 'IV' to 'U32', pos +sible loss of data DBI.xs(4132) : warning C4244: '=' : conversion from 'IV' to 'I32', pos +sible loss of data DBI.xs(4397) : warning C4244: '=' : conversion from '__int64' to 'I32' +, possible loss of data DBI.xs(4467) : warning C4244: 'initializing' : conversion from '__int6 +4' to 'int ', possible loss of data DBI.xs(4474) : warning C4244: '=' : conversion from '__int64' to 'int' +, possible loss of data DBI.xs(4539) : warning C4244: '=' : conversion from '__int64' to 'int' +, possible loss of data DBI.xs(4552) : warning C4311: 'type cast' : pointer truncation from 'A +V *' to 'l ong' DBI.xs(4552) : warning C4311: 'type cast' : pointer truncation from 'A +V *' to 'l ong' DBI.xs(4584) : warning C4267: 'function' : conversion from 'size_t' to + 'I32', po ssible loss of data DBI.xs(4597) : warning C4244: 'initializing' : conversion from '__int6 +4' to 'con st int', possible loss of data DBI.xs(4906) : warning C4996: 'sprintf': This function or variable may + be unsafe . Consider using sprintf_s instead. To disable deprecation, use _CRT_S +ECURE_NO_W ARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(36 6) : see declaration of 'sprintf' Running Mkbootstrap for DBI () C:\Perl64\bin\perl.exe -MExtUtils::Command -e chmod 644 DBI.bs C:\Perl64\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists( +'NAME'=>\" DBI\", 'DLBASE' => 'DBI', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPOR +TS' => { }, 'DL_VARS' => []);" link -out:blib\arch\auto\DBI\DBI.dll -dll -nologo -nodefaultli +b -debug - opt:ref,icf -ltcg -libpath:"C:\Perl64\lib\CORE" -machine:AMD64 DBI.o +bj C:\Pe rl64\lib\CORE\perl58.lib oldnames.lib kernel32.lib user32.lib gdi32.li +b winspool .lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib ne +tapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp3 +2.lib buff eroverflowU.lib msvcrt.lib -def:DBI.def LINK : fatal error LNK1181: cannot open input file 'bufferoverflowU.li +b' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual S +tudio 9.0\ VC\Bin\amd64\link.EXE"' : return code '0x49d' Stop. TIMB/DBI-1.604.tar.gz nmake -- NOT OK Warning (usually harmless): 'YAML' not installed, will not store persi +stent stat e Failed during this command: TIMB/DBI-1.604.tar.gz : make NO

Replies are listed 'Best First'.
Re^3: Building DBI, DBD::ODBC for 64 bit perl Win
by syphilis (Archbishop) on Apr 30, 2008 at 01:41 UTC
    LNK1181: cannot open input file 'bufferoverflowU.lib'

    Do you not have that file ? I find it in my Platform SDK's Lib folder. It should be readily available but just /msg me if you want me to send a copy of it over.

    I've got the 64-bit MinGW compiler, and it seems to be basically functional, but I haven't got round to thinking about the changes one would have to make to the perl source (makefile.mk mainly, I guess) in order to build perl with that compiler. If you get somewhere with that I would be interested to hear about it.

    Cheers,
    Rob
      Hi Rob,

      Thanks for offering to send the lib to me. I have solved that problem this way.

      Install Windows Server 2003 R2 Platform SDK from the following link http://www.microsoft.com/downloads/details.aspx?familyid=e15438ac-60be-41bd-aa14-7f1e0f19ca0d&displaylang=en

      Then copy the bufferoverflowU.lib to the Windows SDK for windows server 2008 and .NET framwork 3.5 lib folder.

      Everything works fine afterwards! But why that file is missing even after a reinstall is still beyond my understanding... I guess Micro$oft is the reason.

      Thanks again for all the help

      Issue Closed 2008-05-01

        But why that file is missing even after a reinstall is still beyond my understanding

        It may well be that, whereas the 2003 version needs bufferoverflowU.lib, the 2008 version doesn't.

        Because ActiveState build with 2003 and because that compuiler needs bufferoverflowU.lib, bufferoverflowU.lib gets listed in $Config{libs} and $Config{perllibs}. Once listed there, it needs to be locatable (even if the compiler you're using, or the task at hand, doesn't need bufferoverflowU.lib).

        I didn't think of it when I posted yesterday, but an alternative fix for you may well have been to simply remove 'bufferoverflowU.lib' from the libs and perllibs listing in Config_heavy.pl.

        These are the sorts of things one has to look out for if one elects to use a compiler other than the one that was used to build perl in the first place :-)

        Cheers,
        Rob