添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hi Perl Monks

I am a total newbie when it comes to Perl and I am currently trying (without success!) to compile the DBD::Sybase (OCS 15.7) using Strawberry Perl 5.18.2001 on a Windows 2008 R2 server.

Warnings and errors I am seeing are shown below starting with the makefile:-

Warning (mostly harmless): No library found for -llibsybtcl.lib
Warning (mostly harmless): No library found for -llibsybcomn.lib
Warning (mostly harmless): No library found for -llibsybintl.lib

Then the dmake comes up with a number of issues:-

dbdimp.c:3906:4: warning: passing argument 2 of 'ct_results' from incompatible pointer type enabled by default
In file included from Sybase.h:19:0,
from dbdimp.c:11:
C:\Progra~1\Sybase/OCS-15_0/include/ctpublic.h:374:29: note: expected 'CS_INT *' but argument is of type 'int *'
dbdimp.c:3930:7: warning: passing argument 5 of 'ct_bind' from incompatible pointer type enabled by default
In file included from Sybase.h:19:0,
from dbdimp.c:11:
C:\Progra~1\Sybase/OCS-15_0/include/ctpublic.h:113:29: note: expected 'CS_INT *' but argument is of type 'int *'

dbdimp.o:dbdimp.c:(.text+0x202): undefined reference to `blk_done'
dbdimp.o:dbdimp.c:(.text+0x8e9): undefined reference to `ct_con_props'
dbdimp.o:dbdimp.c:(.text+0xef4): undefined reference to `ct_con_props'
dbdimp.o:dbdimp.c:(.text+0x14d3): undefined reference to `ct_cancel'
dbdimp.o:dbdimp.c:(.text+0x1788): undefined reference to `blk_drop'

c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.7.3/../../../../x86_64-w64-mingw32/bin/ld.exe: dbdimp.o: bad reloc address 0 x20 in section `.data'
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.7.3/../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid op eration
collect2.exe: error: ld returned 1 exit status
dmake: Error code 129, while making 'blib\arch\auto\DBD\Sybase\Sybase.dll'

Any help is much appreciated

Re: Problems Compiling DBD::Sybase by Corion (Patriarch) on Oct 30, 2015 at 09:34 UTC
Warning (mostly harmless): No library found for -llibsybtcl.lib Warning (mostly harmless): No library found for -llibsybcomn.lib Warning (mostly harmless): No library found for -llibsybintl.lib

These warnings are not so harmless unfortunately. They likely mean that you don't have the Sybase client libraries installed or at least your C compiler and Perl can't find them. According to DBD::Sybase README , you need to setup the SYBASE environment variables or edit the configuration appropriately.

Re^2: Problems Compiling DBD::Sybase by PerlNM (Initiate) on Oct 30, 2015 at 09:59 UTC Re^3: Problems Compiling DBD::Sybase by Anonymous Monk on Oct 30, 2015 at 10:11 UTC Re: Problems Compiling DBD::Sybase by syphilis (Archbishop) on Oct 30, 2015 at 12:10 UTC Re: Problems Compiling DBD::Sybase by Anonymous Monk on Oct 30, 2015 at 09:30 UTC Re^2: Problems Compiling DBD::Sybase by Anonymous Monk on Oct 30, 2015 at 10:18 UTC Re^3: Problems Compiling DBD::Sybase by PerlNM (Initiate) on Nov 06, 2015 at 09:29 UTC Back to Seekers of Perl Wisdom PerlMonks parthenogenetically spawned by Tim Vroom .
PerlMonks was recently assimilated by The Perl Foundation .
Speedy Servers and Bandwidth Generously Provided by pair Networks
Built with the Perl programming language .
Replies are listed 'Best First'.

      Thanks for the reply, I have run the Sybase.bat that sets the various environment variables, however the stated libraries don't come with the install of the Sybase Open Client from what I see in the LIB folder

        Great! :D
    Warning (mostly harmless): No library found for -llibsybtcl.lib
    Warning (mostly harmless): No library found for -llibsybcomn.lib
    Warning (mostly harmless): No library found for -llibsybintl.lib

    Those warnings are telling you that files named (respectively) liblibsybtcl.lib.a, liblibsybcomn.lib.a and liblibsybintl.lib.a could not be found. More than that - they're probably telling you that files named (respectively) libsybtcl.lib.lib, libsybcomn.lib.lib and libsybintl.lib.lib could also not be found.
    I don't have Sybase, and I've never built DBD::Sybase, but I'd be pretty sure that you won't find files that are so perversely named *anywhere*.
    Two likelihoods spring to mind:
    1) that the perl Makefile.PL process was provided with incorrect command line arguments;
    2) that the DBD::Sybase Makefile.PL is completely misinterpreting the information that Sybase.bat is providing.

    Did you provide any command line arguments to the perl Makefile.PL process ?
    If so, what were they ? If not, then we need to consider 2).

    Precisely what does Sybase.bat do ?
    Open a new cmd.exe shell, run set >set1.txt then run Sybase.bat then run set >set2.txt .
    Then we'd want to know how set1.txt and set2.txt differ. If you have the diff utility, running:
diff -u set1.txt set2.txt
will tell us.

Cheers,
Rob

        Hi All, apologies for not responding sooner. We finally got the dmake to complete ok it turned out that the MAKEFILE only had reference to the 32bit libraries and not the 64bit ones, my understanding (from a colleague) of the libraries that were shown as warnings is that they are deprecated libraries so not something to worry about.

        Despite getting past the compile though it still doesn't seem to work and just seems to crash the Strawberry Perl Interpreter