Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

DBD::Sybase with Sybase 15.0

by vcdmb (Initiate)
on Nov 01, 2007 at 21:00 UTC ( #648556=perlquestion: print w/replies, xml ) Need Help??

vcdmb has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to get DBD::Sybase working on a Windows platform with Activestate perl 5.8. I could not find a PPM module already compiled for the platform that works with Sybase 15.0. All the errors are "Can't find libct". In Sybase 15, the libraries are all renamed to libsybct, libsybdb, libsybblk, and so on. So I downloaded all of the programs from http://www.perlmonks.org/index.pl?node_id=387070, downloaded DBD::Sybase 1.08, modified the Makefile.PL to reference the new library names and attempted to compile. It's not working (note, this is only part of the error messages):
dbdimp.c(513) : warning C4996: 'sprintf' was declared deprecated C:\msvs8\VC\INCLUDE\stdio.h(345) : see declaration of 'sprintf +' Message: 'This function or variable may be unsafe. Consider us +ing sprin f_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See + online h lp for details.' dbdimp.c(516) : warning C4996: 'sprintf' was declared deprecated C:\msvs8\VC\INCLUDE\stdio.h(345) : see declaration of 'sprintf +' Message: 'This function or variable may be unsafe. Consider us +ing sprin f_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See + online h lp for details.' dbdimp.c(694) : warning C4018: '>' : signed/unsigned mismatch dbdimp.c(746) : error C2065: 'sigset_t' : undeclared identifier dbdimp.c(746) : error C2146: syntax error : missing ';' before identif +ier 'set' dbdimp.c(746) : error C2065: 'set' : undeclared identifier dbdimp.c(3915) : warning C4244: 'function' : conversion from 'CS_BIGIN +T' to 'NV , possible loss of data dbdimp.c(3920) : warning C4244: 'function' : conversion from 'CS_UBIGI +NT' to 'N ', possible loss of data dbdimp.c(4926) : warning C4244: '=' : conversion from 'long' to 'CS_BI +NARY', po sible loss of data NMAKE : fatal error U1077: 'C:\msvs8\VC\BIN\cl.EXE' : return code '0x2 +' Stop.
Does anyone have this working? Any help or tips? Thanks

Replies are listed 'Best First'.
Re: DBD::Sybase with Sybase 15.0
by mpeppler (Vicar) on Nov 06, 2007 at 07:26 UTC
    The sigset_t declaration was inadvertently left in when 1.08 was released, and the "set" variable isn't used anywhere.

    You can comment out line 746 of dbdimp.c and rebuild and things should normally work better.

    Michael

      This still isn't working. Here is what I did: 0) The libraries for 15.0 changed names:
      c:\DBD-Sybase-1.08>ls %SYBASE%\OCS-15_0\lib libsybblk.lib libsybcs.lib libsybct.lib libsybdb.lib c:\DBD-Sybase-1.08>ls %SYBASE%\OCS-15_0\lib3p defaultmem.dll libplc21.dll nsldapssl32v40.dll libnspr21.dll libplds21.dll sbgse2.dll c:\DBD-Sybase-1.08>ls %SYBASE%\OCS-15_0\dll debug libsybdb.dll libsybintl.dll libsybtcl.dll libsybblk.dll libsybddce.dll libsybsdce.dll libsybunic.dll libsybcomn.dll libsybdldap.dll libsybskrb.dll nondebug libsybcs.dll libsybdreg.dll libsybsmssp.dll libsybct.dll libsybfssl.dll libsybsrv.dll
      1) Modified Makefile.PL to remove the references to the libraries that do not exist:
      if($^O eq 'MSWin32') { # $lib_string = "-L$SYBASE/lib -llibct.lib -llibcs.lib -llibtcl.lib + -llibcomn.lib -llibintl.lib -llibblk.lib $attr{EXTRA_LIBS} -lm"; $lib_string = "-L$SYBASE/lib -llibsybct.lib -llibsybcs.lib $attr{E +XTRA_LIBS}";
      Note that some of the previous libraries are now dll's. 2) Run perl Makefile.PL
      Multiple copies of Driver.xst found in: C:/Perl/site/lib/auto/DBI/ C:/ +Perl/lib/auto/DBI/ at Makefile.PL line 64 Using DBI 1.57 (for perl 5.008008 on MSWin32-x86-multi-thread) install +ed in C:/Perl/site/lib/auto/DBI/ Writing Makefile for DBD::Sybase
      3) Now run nmake: This is just the last bit....
      dbdimp.c(5634) : warning C4996: 'strtok' was declared deprecated C:\msvs8\VC\INCLUDE\string.h(164) : see declaration of 'strtok' Message: 'This function or variable may be unsafe. Consider us +ing strtok _s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See +online hel p for details.' dbdimp.c(5637) : warning C4996: 'strncpy' was declared deprecated C:\msvs8\VC\INCLUDE\string.h(156) : see declaration of 'strncp +y' Message: 'This function or variable may be unsafe. Consider us +ing strncp y_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See + online he lp for details.' Running Mkbootstrap for DBD::Sybase () C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 Sybase.b +s link -out:blib\arch\auto\DBD\Sybase\Sybase.dll -LC:\sybase70/O +CS-15_0/li b -dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\li +b\CORE" - machine:x86 Sybase.obj dbdimp.obj C:\Perl\lib\CORE\perl58.lib C:\sy +base70\OCS -15_0\lib\libsybct.lib C:\sybase70\OCS-15_0\lib\libsybcs.lib C:\msvs8\ +VC\LIB\old names.lib C:\msvs8\VC\LIB\kernel32.lib C:\mssdk\Lib\user32.lib C:\mssd +k\Lib\gdi3 2.lib C:\mssdk\Lib\winspool.lib C:\mssdk\Lib\comdlg32.lib C:\mssdk\Lib +\advapi32. lib C:\mssdk\Lib\shell32.lib C:\mssdk\Lib\ole32.lib C:\mssdk\Lib\oleau +t32.lib C: \mssdk\Lib\netapi32.lib C:\mssdk\Lib\uuid.lib C:\mssdk\Lib\ws2_32.lib +C:\mssdk\L ib\mpr.lib C:\mssdk\Lib\winmm.lib C:\mssdk\Lib\version.lib C:\mssdk\Li +b\odbc32.l ib C:\mssdk\Lib\odbccp32.lib C:\msvs8\VC\LIB\msvcrt.lib -def:Sybase.de +f LINK : warning LNK4044: unrecognized option '/LC:\sybase70/OCS-15_0/li +b'; ignore d Creating library blib\arch\auto\DBD\Sybase\Sybase.lib and object bl +ib\arch\au to\DBD\Sybase\Sybase.exp dbdimp.obj : error LNK2019: unresolved external symbol _blk_done@12 re +ferenced i n function _syb_blk_done dbdimp.obj : error LNK2019: unresolved external symbol _blk_rowxfer@4 +referenced in function _syb_blk_execute dbdimp.obj : error LNK2019: unresolved external symbol _blk_bind@24 re +ferenced i n function _syb_blk_execute dbdimp.obj : error LNK2019: unresolved external symbol _blk_drop@4 ref +erenced in function _blkCleanUp dbdimp.obj : error LNK2019: unresolved external symbol _blk_describe@1 +2 referenc ed in function _syb_blk_init dbdimp.obj : error LNK2019: unresolved external symbol _blk_init@16 re +ferenced i n function _syb_blk_init dbdimp.obj : error LNK2019: unresolved external symbol _blk_props@24 r +eferenced in function _syb_blk_init dbdimp.obj : error LNK2019: unresolved external symbol _blk_alloc@12 r +eferenced in function _syb_blk_init blib\arch\auto\DBD\Sybase\Sybase.dll : fatal error LNK1120: 8 unresolv +ed externa ls NMAKE : fatal error U1077: 'C:\msvs8\VC\BIN\link.EXE' : return code '0 +x460' Stop.
      I have been through the archives at http://www.peppler.org/cgi-bin/searcharc.cgi. I do not find any reference to anyone compiling this for Sybase 15 on Windows. The ppd module located at http://www.peppler.org/downloads/ActiveState/ still is looking for the libraries pre-Sybase 15.0. I did comment out the set line in dbimp.c. So, I'm guessing I'm not changing the library line correctly? Is there something else I need to do? Thank you
        You need to add -lsybblk.lib to that $lib_string line.

        Michael

Re: DBD::Sybase with Sybase 15.0
by Anonymous Monk on Nov 02, 2007 at 03:56 UTC
    http://search.cpan.org/src/MEWP/DBD-Sybase-1.08/README
    Getting Help
    ============
    
    If you are stuck please start by searching the Web, the appropriate
    mailing lists and my bug database, as it is likely that someone else
    will have experienced the same problem before you. Hint: Google is
    your friend :-)
    
    The sybperl-l mailing list is dedicated to Sybase <-> perl issues and 
    covers both the sybperl modules (Sybase::CTlib, etc.) and DBD::Sybase.
    It is archived and searchable at http://www.peppler.org/archive/sybperl-l/
    
    If after seaching you still don't find any solution then post a question
    (with as much detail as possible) to either dbi-users@perl.org,
    sybperl-l@peppler.org or freetds@lists.ibiblio.org (only use the
    latter if you use the FreeTDS libraries with DBD::Sybase).
Re: DBD::Sybase with Sybase 15.0
by Anonymous Monk on Nov 02, 2007 at 03:50 UTC
    Show your changes, and everything before the first error
Re: DBD::Sybase with Sybase 15.0
by Anonymous Monk on Oct 30, 2009 at 03:30 UTC
    Hi, ok I am trying to install DBD::Sybase 1.09 on Windows2003 server with Sybase15.0.3. Got through the perl MakeFile.PL part with minor complains on can't find the lib files that's gone dll. And yes also complained about the version of the Sybase Open Client which I just fix it to 15. The "make" then keep giving me target has both : and :: stop. I checked all the sybase env variables and printed them out in the MakeFile.PL step by step and all those are good. I then checked some posting from people regarding to make targets using : and :: rules. They are saying you can not have both : and :: style rules in the same makefile. Checking the makefile generated by the MakeFile.PL, surely enough there are both : and :: targets. ok, so what now? I must've missed something, right? or is it because of those DLL files? Help please any one? Thx

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://648556]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2020-12-02 00:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (26 votes). Check out past polls.

    Notices?