Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: error upgrading DBI module

by Corion (Patriarch)
on Jan 29, 2020 at 21:06 UTC ( [id://11112046]=note: print w/replies, xml ) Need Help??


in reply to error upgrading DBI module

fatal error LNK1112: module machine type 'x86' conflicts with target m +achine type 'x64'

You are building the DBI module (with compiler settings) for 32 bit, but you are linking it with libraries for 64 bit. It seems that your Perl is a 64-bit Perl (because of C:\Perl64). But maybe your C compiler is only 32 bit or set up for 32-bit compilation. I don't know how to change that.

Replies are listed 'Best First'.
Re^2: error upgrading DBI module
by expo1967 (Sexton) on Jan 29, 2020 at 22:00 UTC

    After a lot of investigating I noticed that I was indeed using the 32 bit env vars instead of the 64 bit env vars. So I now used the 64 bit vars and reran cpan to upgrade the DBI module. Now it fails with the following messages.

    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:\Perl64\bin\perl.exe -MExtUtils::Command -e mv -- Perl.xsc Perl. +c cl -c -nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL -fp:precise +-DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE +_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_ +SYS -DUSE_PERLIO -MD -Zi -DNDEBUG -Ox -GL -fp:precise -DVERSION=\" +1.642\" -DXS_VERSION=\"1.642\" "-IC:\Perl64\lib\CORE" Perl.c Perl.c C:\Perl64\lib\CORE\perl.h(621): fatal error C1083: Cannot open include + file: 'stdarg.h': No such file or directory NMAKE : U1077: Stop. TIMB/DBI-1.642.tar.gz C:\bin\nmake.exe -- NOT OK Failed during this command: TIMB/DBI-1.642.tar.gz : make NO cpan>

    I shall keep investigating on this issuer.

      How was Perl installed to begin with? Is it Strawberry, or ActiveState? ...it's been years since I've worked with a Windows installation of Perl, but back then, the Strawberry tooling was better for installing CPAN modules. And ActiveState used PPM distributions.

      Can you do a fresh install of Perl and everything else? Is WSL an option for you?


      Dave

        I used Activestate to install Perl. My version of perl is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread, perhaps it is time to upgrade perl.
        I used Activestate to install Perl. my version of Perl is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread I shall try to upgrade my Perl a little bit later.

      . So I now used the 64 bit vars and reran cpan to upgrade the DBI module. Now it fails with the following messages.

      Hi, which 64 bit vars exactly? Looks like you forgot a few ;)

        I opened up the Developer Command Prompt for VS 2019 which sets all the environment variables. The window openned up in the directory C:\Program Files (x86)\Microsoft Visual Studio\2019\Community. I searched under the directory for .BAT files named like vcvars.bat but did not find anything. However under C:\Program Files (x86)\Microsoft Visual Studio\2017 I did find "vars" batch files. I did try the vcvars64.bat frile earlier and the upgrade attempt ended in error.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-04-23 09:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found