Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: DBD:Mysql compilation failed on windows

by syphilis (Archbishop)
on Mar 11, 2022 at 08:19 UTC ( [id://11141995]=note: print w/replies, xml ) Need Help??


in reply to DBD:Mysql compilation failed on windows

There's plenty of PASS reports for DBD::MariaDB from cpantesters running Windows, though they're probably all using mimgw-w64 ports of gcc instead of VS 2015.
First up, can you provide the output of running perl -V (that's an upper case "V") on your perl-5.24.1 ?

Update: I found that DBD::MariaDB (version 1.21) installed straight out of the box on my Strawberry Perl-5.24.1 (64 bit).
That particular build of Strawberry Perl shipped with DBI-1.636 and DBD-mysql-4.041.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: DBD:Mysql compilation failed on windows
by pesubbia (Novice) on Mar 11, 2022 at 12:30 UTC
    Hi Rob ,
    Thanks for the immediate reply. Here is the output of perl -V
    perl -V Summary of my perl5 (revision 5 version 24 subversion 1) configuration +: Platform: osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN3 +2 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO +_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IM +PLICIT_SYS', optimize='-O1 -MD -Zi -DNDEBUG -GL', cppflags='-DWIN32' ccversion='15.00.30729.01', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234, do +ublekind=3 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8, + longdblkind=0 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64 +', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -lt +cg -libpath:"c:\perl-5241\lib\CORE" -machine:x86' libpth=\lib libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib +comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi3 +2.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib o +dbccp32.lib comctl32.lib msvcrt.lib perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.l +ib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib net +api32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.l +ib odbccp32.lib comctl32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl524.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt: +ref,icf -ltcg -libpath:"c:\perl-5241\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_ITHREA +DS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE +_TIME USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at Jun 30 2017 03:50:01 %ENV: PERL5LIB="c:\perl-5241\lib;c:\perl-5241\site\lib;C:\PROGRA~2\CSCOp +x\lib" @INC: c:\perl-5241\lib c:\perl-5241\site\lib C:\PROGRA~2\CSCOpx\lib c:/perl-5241/site/lib c:/perl-5241/lib .
      Hmmm ... I think that perl was built using an older MS compiler.
      However, I'm inclined to think that shouldn't matter, and it's certainly appropriate to be using an MS compiler to build modules for that perl build that you have.
      How did you try to build DBD::MariaDB ? A normal way would have been to run cpan -i DBD::MariaDB .

      The error message you posted in your original post doesn't provide anything meaningful to me. It's very strange that the standard Windows headers windows.h and winsock.h (included with every MS compiler) could not be found.
      Did you run the VC++ batch file that sets up the environment such that these headers are found by default ?

      Or perhaps the problem is just some stupid checks that the DBD::MariaDB Makefile.PL wants to run. (I haven't looked.)
      Sorry - I don't mess much with VC++ builds of perl any more, and I don't mess with DBD/DBI modules at all.
      If I needed to get this done, I'd just grab one of the "Portable" Strawberry Perl builds from https://strawberryperl.com/releases.html, as that seems so simple and straightforward.

      Cheers,
      Rob
        Hi Rob,
        Our project already using the active perl. Changing to strawberry per +l will be huge effort :(. And also i tried download DBD-mariaDB / DBD-mysql tar local +ly and setup VC environment and compiled. Both getting same error. As + per your suggestion will remove the VC environment setting and try w +ith Minguw and get back to you.
        Thanks, Anitha.S
        Rob,
        Finally the compile picked the dmake and after that final execution f +ailed with the following. Kindly help. Generating a dmake-style Makefile Writing Makefile for Mock::Config Writing MYMETA.yml and MYMETA.json RURBAN/Mock-Config-0.03.tar.gz C:\Perl\bin\perl.exe Makefile.PL -- OK Running make for R/RU/RURBAN/Mock-Config-0.03.tar.gz Microsoft (R) Program Maintenance Utility Version 14.00.24210.0 Copyright (C) Microsoft Corporation. All rights reserved. Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?) Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?) Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?) Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?) Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?) Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?) to undefined at C:\perl\lib/ExtUtils/Install.pm line 1198. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2' Stop. RURBAN/Mock-Config-0.03.tar.gz "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.EX +E" -- NOT OK

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11141995]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-03-28 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found