Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

installing DBD::Sybase

by fionbarr (Friar)
on Jul 28, 2014 at 14:02 UTC ( #1095360=perlquestion: print w/replies, xml ) Need Help??

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

I'm having a great deal of trouble installing DBD::Sybase. I have download the sybase libraries, got the latest GCC and C++ compilers from, updated CPAN. most of the errors look like:
sybase.:Sybase.c ...undefined reference o '_inp_Perl_mg_size' 'sybase.o had bad reloc address 0x20 in section '.eh_frame'
I am using ActiveState Perl 5.18.2 on Windows 7 I am using ActiveState Perl 5.18.2 on Windows7.

Replies are listed 'Best First'.
Re: installing DBD::Sybase
by Corion (Patriarch) on Jul 28, 2014 at 14:39 UTC

    If you've arrived at CPAN now trying to compile DBD::Sybase, please post the FULL console output instead of some grotesquely shortened output. Especially relevant are the output of perl -w Makefile.PL if you ran it yourself.

    In the bug list for DBD::Sybase, there are lots of bugs (and some fixes) for compiling under Windows. Have you investigated these already?

    Ideally, you run the whole configuration and compilation manually:

    cpan CPAN> look DBD::Sybase ... DBD-Sybase-1.2345> perl Makefile.PL ... ... DBD-Sybase-1.2345> nmake

    Somewhere there, the error should occur, and for diagnosis, we need the complete session starting from look DBD::Sybase.

      CPAN: Term::ANSIColor loaded ok (v4.02) CPAN: Win32::Console::ANSI loaded ok (v1.06) CPAN: Storable loaded ok (v2.45) Reading 'C:\Users\U357750\AppData\Local\.cpan\Metadata'  Database was generated on Mon, 28 Jul 2014 11:53:02 GMT Running install for module 'DBD::Sybase' CPAN: Digest::SHA loaded ok (v5.85) CPAN: Compress::Zlib loaded ok (v2.063) Checksum for C:\Users\U357750\AppData\Local\.cpan\sources\authors +\id\M\ME\MEWP\DBD-Sybase-1.15.tar.gz ok CPAN: Archive::Tar loaded ok (v1.96) CPAN: File::Temp loaded ok (v0.2304) CPAN: YAML::XS loaded ok (v0.41) CPAN: Parse::CPAN::Meta loaded ok (v1.4409) CPAN: CPAN::Meta loaded ok (v2.132830) Configuring M/ME/MEWP/DBD-Sybase-1.15.tar.gz with Makefile.PL Sybase OpenClient 15.5 found. By default DBD::Sybase 1.05 and later use the 'CHAINED' mode (where av +ailable) when 'AutoCommit' is turned off. Versions 1.04 and older instead manag +ed the transactions explicitly with a 'BEGIN TRAN' before the first DML statement. Using the 'CHAINED' mode is preferable as it is the way tha +t Sybase implements AutoCommit handling for both its ODBC and JDBC drive +rs. Use 'CHAINED' mode by default (Y/N) [Y]: The DBD::Sybase module need access to a Sybase server to run the tests +. To clear an entry please enter 'undef' Sybase server to use (default: SYBASE): User ID to log in to Sybase (d +efault: sa): Password (default: undef): Sybase database to use on SYBASE (default: undef): Checking if your ki +t is complete... Looks good Using DBI 1.63 (for perl 5.018002 on MSWin32-x64-multi-thread) install +ed in C:/Perl64/lib/auto/DBI/ Generating a dmake-style Makefile Writing Makefile for DBD::Sybase Writing MYMETA.yml and MYMETA.json  MEWP/DBD-Sybase-1.15.tar.gz C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK Running make for M/ME/MEWP/DBD-Sybase-1.15.tar.gz CPAN: Module::CoreList loaded ok (v3.03) cp blib\lib\DBD\ cp dbd-sybase.pod blib\lib\DBD\dbd-sybase.pod Running Mkbootstrap for DBD::Sybase () C:\Perl64\bin\perl.exe -MExtUtils::Command -e chmod -- 644 C:\Perl64\bin\perl.exe -p -e "s/~DRIVER~/Sybase/g" C:\Perl64\lib\auto\ +DBI\Driver.xst > Sybase.xsi C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typemap C:\Perl +64\lib\ExtUtils\typemap Sybase.xs > Sybase.xsc && C:\Perl64\bin\perl +.exe -MExtUtils::Command -e mv -- Sybase.xsc Sybase.c gcc -c -IC:\Sybase/OCS-15_0/include -IC:/Perl64/lib/auto/DBI -s - +O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITEC +USTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fn +o-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.15\" +-DXS_VERSION=\"1.15\" "-IC:\Perl64\lib\CORE" Sybase.c gcc -c -IC:\Sybase/OCS-15_0/include -IC:/Perl64/lib/auto/DBI -s - +O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITEC +USTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fn +o-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.15\" +-DXS_VERSION=\"1.15\" "-IC:\Perl64\lib\CORE" dbdimp.c C:\Perl64\bin\perl.exe -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"DBD::Sybase\", 'DLBASE' => 'Sybase', 'DL +_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => [] +);" dlltool --def Sybase.def --output-exp dll.exp g++ -o blib\arch\auto\DBD\Sybase\Sybase.dll -Wl,--base-file -Wl, +se -LC:\Sybase/OCS-15_0/lib -mdll -s -static-libgcc -static-libstdc++ + -L"C:\Perl64\lib\CORE" -L"C:\MinGW\x86_64-w64-mingw32\lib" Sybase.o + dbdimp.o C:\Perl64\lib\CORE\libperl518.a C:\Sybase\OCS-15_0\lib +\libsybct.lib C:\Sybase\OCS-15_0\lib\libsybcs.lib C:\Sybase\OCS-15_0\ +lib\libsybblk.lib dll.exp  MEWP/DBD-Sybase-1.15.tar.gz  C:\Perl64\site\bin\dmake.exe -- NOT OK

        This is weirdly mangled output that contains ANSI escape sequences and is missing the actual error message from the C compiler. I'm not sure what you're aiming at here, but maybe you could enlist the help of somebody who is more familiar with your OS setup.

        Again, have you reviewed the errors? Maybe #91298 is applicable? Or maybe #92196.

Re: installing DBD::Sybase
by mr_mischief (Monsignor) on Jul 28, 2014 at 14:28 UTC

    Stop asking the same questions over and over again in new root nodes. Try Strawberry Perl rather than ActiveState's perl if you're having problems installing things. There is a big difference between the two.

      should I delete ActiveState before I install Strawberry Perl?

        They should be happy together on the same system, except that one or the other will be your "default application" registered to run .pl files. I'd install Strawberry and get it configured before considering removing ActiveState myself.

Re: installing DBD::Sybase
by jfroebe (Parson) on Jul 29, 2014 at 15:14 UTC
Re: installing DBD::Sybase
by derby (Abbot) on Jul 29, 2014 at 12:00 UTC

    I think you're between a rock and a hard place. To use the Sybase supplied DLLs, you would need to use an MS toolchain to compile the DBD::Sybase XS. So that means ActiveState and an install of the correct version of Visual Studio. If you want to use Strawberry Perl, I think your only path would be to 1) install Strawberry Perl; 2) using the toolchain from Strawberry Perl (gcc), install freetds; 2) point your SYBASE ENV to the freetds libs and use those libs instead of the Sybase supplied ones to build DBD::Sybase.


      I think that gcc / MinGW together with the configuration for ActiveState and Strawberry Perl can produce files compatible with ActiveState.

      On the other hand, it's been very long since I tried to mix ActiveState and Strawberry files.

        thanks all...

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1095360]
Approved by kevbot
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2023-01-27 03:45 GMT
Find Nodes?
    Voting Booth?

    No recent polls found