Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > MinGW and Perl 5.12 - Windows 32 bits ActiveState

Reply
Thread Tools

MinGW and Perl 5.12 - Windows 32 bits ActiveState

 
 
Peter J. Holzer
Guest
Posts: n/a
 
      05-15-2010
On 2010-05-14 11:34, Dilbert <(E-Mail Removed)> wrote:
> On 13 mai, 20:17, Dilbert <(E-Mail Removed)> wrote:
>> On 17 avr, 10:36, sisyphus <(E-Mail Removed)> wrote:
>> > In short, for the moment at least, you'd be better off grabbing the
>> > freely available "Microsoft Platform SDK for Windows Server 2003 R2"
>> > compiler and using it with the x64 ActivePerl builds

>>
>> I can't seem to get the Windows *.exe-files I need for 64 bits from
>> MinGW, so I grabbed the freely available Microsoft Visual C++ 2008
>> Compiler (*** a whopping 200 meg !!! ***).
>>
>> I am currently downloading (45%...) ...let's see how this works out...

>
> I have downloaded and installed "Microsoft Platform SDK for Windows
> Server 2003 R2".
>
> Apparently, I can now compile with Visual C++ 2008 ...
>
> ...but the linker complains with a message:
> fatal error LNK1112: module machine type 'X86' conflicts with target
> machine type 'x64'


You are mixing 32-bit ("x86") and 64-bit ("x64") code. You can't do
that. They need to match. If I understood you correctly, your perl is
64-bits, so you need to compile your modules in 64-bit mode, too.

hp
 
Reply With Quote
 
 
 
 
Dilbert
Guest
Posts: n/a
 
      05-15-2010
On 15 mai, 09:56, sisyphus <(E-Mail Removed)> wrote:
> On May 15, 3:41*am, Dilbert <(E-Mail Removed)> wrote:
> > It looks very much as if there simply is no 64 bits in the free
> > available compiler from Microsoft, only 32 bits

>
> It's still there - though it looks a 32 bit application is being
> found.
> What command are you running to set the environment ?
> What does the 'cl /?' output begin with ? It should be something like:
>
> Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40310.41 for
> AMD64
> Copyright (C) Microsoft Corporation. *All rights reserved.


My "cl" clearly indicates a 32 bit application:

++ C:\>cl /?
++ Compilateur d'optimisation Microsoft (R) 32*bits C/C++
++ version*15.00.30729.01 pour 80x86
++ Copyright (C) Microsoft Corporation. All rights reserved.

However, I am on 64 bit Windows Vista with a 64 bit Activestate Perl
installation:

++ C:\>perl -v
++ This is perl 5, version 12, subversion 0 (v5.12.0) built for
++ MSWin32-x64-multi-thread
++ (with 1 registered patch, see perl -V for more detail)
++ Copyright 1987-2010, Larry Wall
++ Binary build 1200 [292396] provided by ActiveState
++ http://www.ActiveState.com
++ Built Apr 10 2010 22:58:59

I have downloaded the freely available VC++ compiler from
http://msdn.microsoft.com/fr-fr/express/aa975050.aspx

The vcvarsall.bat command that sets the environment variables is
located in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC:

++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>dir
++ Le volume dans le lecteur C s'appelle HP
++ Le numéro de série du volume est BA3E-0466
++
++ Répertoire de C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC
++
++ 15/05/2010 11:45 <REP> .
++ 15/05/2010 11:45 <REP> ..
++ 14/05/2010 13:20 <REP> bin
++ 13/05/2010 20:17 <REP> Express
++ 13/05/2010 20:18 <REP> include
++ 13/05/2010 20:18 <REP> lib
++ 13/05/2010 20:17 <REP> Profile
++ 13/05/2010 20:17 <REP> redist
++ 13/05/2010 20:17 <REP> VCNewItems
++ 13/05/2010 20:18 <REP> vcpackages
++ 13/05/2010 20:18 <REP> VCProjectDefaults
++ 13/05/2010 20:18 <REP> vcprojectitems
++ 13/05/2010 20:18 <REP> vcprojects
++ 05/01/2005 16:51 1*247 vcvarsall.bat
++ 13/05/2010 20:17 <REP> VCWizards
++ 1 fichier(s) 1*247 octets

Here is an extract from "vcvarsall.bat":

++ @echo off
++ if "%1" == "" goto x86
++ if not "%2" == "" goto usage
++
++ if /i %1 == x86 goto x86
++ if /i %1 == amd64 goto amd64
++ if /i %1 == x64 goto amd64
++ if /i %1 == ia64 goto ia64
++ if /i %1 == x86_amd64 goto x86_amd64
++ if /i %1 == x86_ia64 goto x86_ia64
++ goto usage
++
++ 86
++ if not exist "%~dp0bin\vcvars32.bat" goto missing
++ call "%~dp0bin\vcvars32.bat"
++ goto :eof
++
++ :amd64
++ if not exist "%~dp0bin\amd64\vcvarsamd64.bat" goto missing
++ call "%~dp0bin\amd64\vcvarsamd64.bat"
++ goto :eof
++
++ :ia64
++ if not exist "%~dp0bin\ia64\vcvarsia64.bat" goto missing
++ call "%~dp0bin\ia64\vcvarsia64.bat"
++ goto :eof
++
++ 86_amd64
++ if not exist "%~dp0bin\x86_amd64\vcvarsx86_amd64.bat" goto missing
++ call "%~dp0bin\x86_amd64\vcvarsx86_amd64.bat"
++ goto :eof
++
++ 86_ia64
++ if not exist "%~dp0bin\x86_ia64\vcvarsx86_ia64.bat" goto missing
++ call "%~dp0bin\x86_ia64\vcvarsx86_ia64.bat"
++ goto :eof

I have tried the command vcvarsall with "amd64", "x64", "ia64",
"x86_amd64" and with "x86_ia64", but no success:

++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
amd64
++ The specified configuration type is missing. The tools for the
++ configuration might not be installed.

++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall x64
++ The specified configuration type is missing. The tools for the
++ configuration might not be installed.

++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
ia64
++ The specified configuration type is missing. The tools for the
++ configuration might not be installed.

++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
x86_amd64
++ The specified configuration type is missing. The tools for the
++ configuration might not be installed.

++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
x86_ia64
++ The specified configuration type is missing. The tools for the
++ configuration might not be installed.

++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin>dir
++ Le volume dans le lecteur C s'appelle HP
++ Le numéro de série du volume est BA3E-0466

Well, not surprising at all, because the corresponding sub directories
("bin\amd64", "bin\ia64", "bin\x86_amd64" and "bin\x86_ia64") simply
do not exist:

++ Répertoire de C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
\bin
++
++ 14/05/2010 13:20 <REP> .
++ 14/05/2010 13:20 <REP> ..
++ 13/05/2010 20:17 <REP> 1036
++ 31/07/2008 15:52 165*376 atlprov.dll
++ 31/07/2008 15:52 77*312 bscmake.exe
++ 31/07/2008 15:52 677*872 c1.dll
++ 31/07/2008 15:52 2*326*520 c1xx.dll
++ 31/07/2008 15:52 2*363*888 c2.dll
++ 31/07/2008 15:52 129*520 cl.exe
++ 29/07/2008 02:57 289 cl.exe.config
++ 31/07/2008 15:52 33*784 cvtres.exe
++ 31/07/2008 15:52 17*920 dumpbin.exe
++ 31/07/2008 15:52 17*920 editbin.exe
++ 13/05/2010 20:18 <REP> fr
++ 31/07/2008 15:52 17*912 lib.exe
++ 31/07/2008 15:06 801*272 link.exe
++ 29/07/2008 02:57 289 link.exe.config
++ 31/07/2008 15:52 361*968 ml.exe
++ 31/07/2008 13:31 72*192 msobj80.dll
++ 29/07/2008 13:36 193*536 mspdb80.dll
++ 29/07/2008 13:36 288*768 mspdbcore.dll
++ 29/07/2008 13:36 107*520 mspdbsrv.exe
++ 31/07/2008 15:52 94*200 nmake.exe
++ 31/07/2008 15:52 20*480 undname.exe
++ 07/03/2007 16:44 31 vcvars32.bat
++ 31/07/2008 15:52 40*448 xdcmake.exe
++ 29/07/2008 02:57 289 xdcmake.exe.config
++ 23 fichier(s) 7*809*306 octets

What does exist, however, is "bin\vcvars32.bat", so let's try the only
option that's available: "vcvarsall x86"

++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall x86
++ Setting environment for using Microsoft Visual Studio 2008 x86
tools.

Well, it's certainly not 64 bits, but as I said, it's the only option
available.

Here are the relevant environment variables:

C:\>set

INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Include;C:
\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include;C:\Program
Files\Microsoft SDKs\Windows\v6.1\Include;C:\Program Files\Microsoft
SDKs\Windows\v6.1\Include\gl; C:\Program Files (x86)\Microsoft Visual
Studio 9.0\VC\include

LIB=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Lib\amd64;C:
\Program Files\Microsoft SDKs\Windows\v6.1\Lib\X64;C:\Program Files
(x86)\Microsoft Visual Studio 9.0\VC\lib

LIBPATH=C:\Windows\Microsoft.NET\Framework\v3.5;C: \Windows
\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft
Visual Studio 9.0\VC\LIB

Path=C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\s ystem32;C:\Windows;C:
\Windows\System32\Wbem;c:\Program Files (x86)\Microsoft SQL Server
\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS
\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin

> > Whatever the outcome of my battle with MS VC++ will be, I will be
> > relieved when "ppm install MinGW" works on 64 bit Windows.

>
> According to Jan Dubois, that probably won't be for a couple of months
> (at least). ActivePerl 5.12.0 needs some patching before it will work
> with the MinGW64 compilers. I have patches that enable this (included
> below)- they're a bit of a hack, and quite possibly *not* the way that
> ActiveState will deal with the issues. But they've been working fine
> for me, and you're welcome to give them a try. (I'd be interested to
> hear of any problems you strike if you do use them - feel free to
> email me at my CPAN address.)
>
> For the MinGW64 compiler, you go tohttp://sourceforge.net/projects/mingw-w64/files
> , as you've already discovered. Under "Toolchains targetting Win64"
> grab either one of the "personal builds" or one of the "automated
> builds" that has been built for win64 mingw (not for linux or cygwin)
> - and make sure it's a 64-bit build (as they're also providing a 32-
> bit compiler). The "automated builds" are a cross-compiler with the
> names of the executables prefixed with "x86_64-w64-mingw32-" (ie
> "x86_64-w64-mingw32-gcc.exe", etc.), so it might be simpler if you
> choose the "sezero_20100428" build ("mingw-w64-bin_x86_64-
> mingw_20100428_sezero.zip"). My patches accommodate both types of
> build.
>
> Then just unzip and add the bin folder to the path.
> Patch to lib/ExtUtils/MM_Win32.pm (ActivePerl build 1200):
> Patch to lib/ActivePerl/Config.pm (ActivePerl build 1200):


I will try downloading "mingw-w64-bin_x86_64-
mingw_20100428_sezero.zip" with your suggested patches to "lib/
ExtUtils/MM_Win32.pm" and "lib/ActivePerl/Config.pm".

I will let you know how I get on.

Thanks for your help
 
Reply With Quote
 
 
 
 
Dilbert
Guest
Posts: n/a
 
      05-15-2010
On 15 mai, 13:37, Ben Morrow <(E-Mail Removed)> wrote:
> Quoth Dilbert <(E-Mail Removed)>:
> > I have tried the command vcvarsall with "amd64", "x64", "ia64",
> > "x86_amd64" and with "x86_ia64", but no success:

>
> > ++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
> > amd64
> > ++ The specified configuration type is missing. *The tools for the
> > ++ configuration might not be installed.
> > Well, not surprising at all, because the corresponding sub directories
> > ("bin\amd64", "bin\ia64", "bin\x86_amd64" and "bin\x86_ia64") simply
> > do not exist:

>
> It looks like you've either downloaded the wrong package,


I have downloaded it from
http://msdn.microsoft.com/fr-fr/express/aa975050.aspx

is this the correct package ?
is this the latest package?

> or not installed everything. Did the installer ask you any
> questions about 64bit versions of the compiler?


I can't remember any question about 64 or 32 bit versions during the
install.

Does anybody know
- where to download and
- how to install
the free MS VC++ Express compiler for 64 bits ?
 
Reply With Quote
 
Dilbert
Guest
Posts: n/a
 
      05-15-2010
On 15 mai, 16:53, Ben Morrow <(E-Mail Removed)> wrote:
> Quoth Dilbert <(E-Mail Removed)>:
> > On 15 mai, 13:37, Ben Morrow <(E-Mail Removed)> wrote:
> > > Quoth Dilbert <(E-Mail Removed)>:
> > > > I have tried the command vcvarsall with "amd64", "x64", "ia64",
> > > > "x86_amd64" and with "x86_ia64", but no success:

>
> > > > ++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>vcvarsall
> > > > amd64
> > > > ++ The specified configuration type is missing. *The tools for the
> > > > ++ configuration might not be installed.
> > > > Well, not surprising at all, because the corresponding sub directories
> > > > ("bin\amd64", "bin\ia64", "bin\x86_amd64" and "bin\x86_ia64") simply
> > > > do not exist:

>
> > > It looks like you've either downloaded the wrong package,

>
> > I have downloaded it from
> >http://msdn.microsoft.com/fr-fr/express/aa975050.aspx

>
> > is this the correct package ?
> > is this the latest package?

>
> Unless you have a good reason not to, I'd always download the English
> versions. I've no idea if it is the case here, but in the past some MS
> products have had language-specific versions which were missing
> features.
>
> The English version of VC9 can be downloaded from
> http://www.microsoft.com/express/Downloads/.


I uninstalled the French version (took me an hour or so)
Then I downloaded and installed the English version from
http://www.microsoft.com/express/Downloads/ (the install went straight
ahead, there was no possibility to choose between 32 bits or 64 bits)

To my disappointment, the English version is also 32 bits only:

C:\>cl /?
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01
for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

Also, the same situation with C:\Program Files (x86)\Microsoft Visual
Studio 10.0\VC>vcvarsall amd64 ==>The specified configuration type is
missing. The tools for the configuration might not be installed. ==>
the corresponding sub directories ("bin\amd64", "bin\ia64", "bin
\x86_amd64" and "bin\x86_ia64") simply do not exist

> This isn't the latest
> version, but that isn't important: what matters is that it matches the
> version used to build your Perl, especially with recent MS compilers
> which have a nasty habit of introducing incompatible versions of libc
> all the time. I don't know which compiler AS use for their 64bit builds:
> I thought it was VC7, but I don't have a 64bit Win32 machine on hand to
> check. The free download of VC7 was called 'Visual C++ 2003 Express
> Edition', and may or may not still be available; search microsoft.com.
>
> FWIW, all of this mess is why I gave up on ActivePerl a while ago. I'd
> recommend getting
> http://strawberryperl.com/download/s...1-64bit-v2.msi
> which includes the correct compiler as part of the install.


I agree.

The recent experience with getting a C-compiler for Perl is what
tipped my scale today from Activestate to Strawberry.

Thanks for your help.
 
Reply With Quote
 
Dilbert
Guest
Posts: n/a
 
      05-15-2010
On 15 mai, 09:56, sisyphus <(E-Mail Removed)> wrote:
> On May 15, 3:41*am, Dilbert <(E-Mail Removed)> wrote:
> > Whatever the outcome of my battle with MS VC++ will be, I will be
> > relieved when "ppm install MinGW" works on 64 bit Windows.

>
> According to Jan Dubois, that probably won't be for a couple of months
> (at least). ActivePerl 5.12.0 needs some patching before it will work
> with the MinGW64 compilers. I have patches that enable this (included
> below)- they're a bit of a hack, and quite possibly *not* the way that
> ActiveState will deal with the issues. But they've been working fine
> for me, and you're welcome to give them a try. (I'd be interested to
> hear of any problems you strike if you do use them - feel free to
> email me at my CPAN address.)


[...Can't find your CPAN address...]

> For the MinGW64 compiler, you go tohttp://sourceforge.net/projects/mingw-w64/files
> , as you've already discovered. Under "Toolchains targetting Win64"
> grab either one of the "personal builds" or one of the "automated
> builds" that has been built for win64 mingw (not for linux or cygwin)
> - and make sure it's a 64-bit build (as they're also providing a 32-
> bit compiler). The "automated builds" are a cross-compiler with the
> names of the executables prefixed with "x86_64-w64-mingw32-" (ie
> "x86_64-w64-mingw32-gcc.exe", etc.), so it might be simpler if you
> choose the "sezero_20100428" build ("mingw-w64-bin_x86_64-
> mingw_20100428_sezero.zip"). My patches accommodate both types of
> build.
>
> Then just unzip and add the bin folder to the path.
>
> Patch to lib/ExtUtils/MM_Win32.pm (ActivePerl build 1200):
> [...]
> Patch to lib/ActivePerl/Config.pm (ActivePerl build 1200):
> [...]


I have downloaded and unzipped "mingw-w64-bin_x86_64-
mingw_20100515_sezero.zip" (that's "...20100515..." and not "...
20100428...") from http://sourceforge.net/projects/mingw-w64/files.

Then I added the "mingw64\bin" directory to the path.

Now, C:\>perl -V:make reports

C:\Users\CK\Documents\PerlModules\Text-CSV_XS\Text-CSV_XS-0.73>perl -
V:make
Set up gcc environment - 4.4.5 20100513 (prerelease) [svn/rev.159365 -
mingw-w64/oz]
make='dmake';

But there is no dmake.exe anywhere on my Windows Vista 64 bits. ==> I
quickly google for "dmake" and I find ==> http://www.oooforum.org/forum/viewtopic.phtml?t=241
==> if you are using windows use this use this link ==>
http://www.cpan.org/authors/id/GSAR/...1pl1-win32.zip

So I download and unzip "dmake-4.1pl1-win32.zip" (it's a 32 bit app,
but that doesn't matter) and add the directory "dmake-4.1pl1-
win32" (that's where dmake.exe lives) to the path (also, please be
aware that "dmake.exe" relies on a file "startup\startup.mk", so you
make sure that this exists)

I also applied the two patches:
- to lib/ExtUtils/MM_Win32.pm
- to lib/ActivePerl/Config.pm

Now I want to download and make Text::CSV_XS, but unfortunately there
is an error "gcc.exe: CreateProcess: No such file or directory"

C:\Users\CK\Documents\PerlModules\Text-CSV_XS\Text-CSV_XS-0.73>dmake
cp CSV_XS.pm blib\lib\Text\CSV_XS.pm
C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typemap C:
\Perl64\lib\ExtUtils\typemap CSV_XS.xs > CSV_XS.xsc && C:\Perl64\bin\
perl.exe -MExtUtils::Command -e "mv" -- CSV_XS.xsc CSV_XS.c
C:/Users/CK/DOCUME~1/PROGRA~2/MINGW6~1/gcc.exe -c -DNDEBUG -
DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIV
E -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -
DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasin
g -mms-bitfields -O2 -DVERSION=\"0.73\" -DXS_VERSION=\"0.73\"
"-IC:\Perl64\lib\CORE" CSV_XS.c
gcc.exe: CreateProcess: No such file or directory
dmake.exe: Error code 1, while making 'CSV_XS.o'
 
Reply With Quote
 
sisyphus
Guest
Posts: n/a
 
      05-16-2010
On May 16, 6:18*am, Dilbert <(E-Mail Removed)> wrote:
> On 15 mai, 09:56, sisyphus <(E-Mail Removed)> wrote:


> C:/Users/CK/DOCUME~1/PROGRA~2/MINGW6~1/gcc.exe -c * * * -DNDEBUG -
> DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIV
> E -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -
> DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasin
> g -mms-bitfields -O2 * * *-DVERSION=\"0.73\" * *-DXS_VERSION=\"0.73\"
> "-IC:\Perl64\lib\CORE" * CSV_XS.c
> gcc.exe: CreateProcess: No such file or directory
> dmake.exe: *Error code 1, while making 'CSV_XS.o'


Odd - I've just downloaded that exact same compiler, and it works fine
for me with ActivePerl. I've just used it to build Text::CSV_XS-0.73.
I don't think I've overlooked anything in my instructions (apart from
the need to have dmake - but you're ahead of me on that, anyway

The solitary "-O2" in the failing command is a bit of a puzzle - the
patch should have changed that to an "-s -O2", but I don't think
that's what's causing the failure.

Anyway, if you're happy with Strawberry Perl (and there's no reason
you oughtn't be) then that's the simplest route to travel. It gives
you a compiler built by the same person (and same toolchain) as the
20100515_sezero zip you downloaded - but Strawberry has gcc-4.4.3, not
the gcc-4.4.5 that's currently on offer.

Cheers,
Rob
 
Reply With Quote
 
Dilbert
Guest
Posts: n/a
 
      05-16-2010
On 16 mai, 11:00, sisyphus <(E-Mail Removed)> wrote:
> On May 16, 6:18*am, Dilbert <(E-Mail Removed)> wrote:
>
> > On 15 mai, 09:56, sisyphus <(E-Mail Removed)> wrote:
> > C:/Users/CK/DOCUME~1/PROGRA~2/MINGW6~1/gcc.exe -c * * * -DNDEBUG -
> > DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIV
> > E -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -
> > DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasin
> > g -mms-bitfields -O2 * * *-DVERSION=\"0.73\" * *-DXS_VERSION=\"0.73\"
> > "-IC:\Perl64\lib\CORE" * CSV_XS.c
> > gcc.exe: CreateProcess: No such file or directory
> > dmake.exe: *Error code 1, while making 'CSV_XS.o'

>
> Odd - I've just downloaded that exact same compiler, and it works fine
> for me with ActivePerl. I've just used it to build Text::CSV_XS-0.73.
> I don't think I've overlooked anything in my instructions (apart from
> the need to have dmake - but you're ahead of me on that, anyway
>
> The solitary "-O2" in the failing command is a bit of a puzzle - the
> patch should have changed that to an "-s -O2"


That's my fault, because I accidently patched the wrong file. That's
fixed now:

C:\Users\CK\Documents\PerlModules\Text-CSV_XS\Text-CSV_XS-0.73>dmake
Skip blib\lib\Text\CSV_XS.pm (unchanged)
C:/Users/CK/DOCUME~1/PROGRA~2/MINGW6~1/gcc.exe -c -DNDEBUG -
DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIV
E -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -
DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasin
g -mms-bitfields -s -O2 -DVERSION=\"0.73\" -DXS_VERSION=
\"0.73\" "-IC:\Perl64\lib\CORE" CSV_XS.c
gcc.exe: CreateProcess: No such file or directory
dmake.exe: Error code 1, while making 'CSV_XS.o'

> but I don't think
> that's what's causing the failure.


You're right, that's not causing the failure.

> Anyway, if you're happy with Strawberry Perl (and there's no reason
> you oughtn't be) then that's the simplest route to travel. It gives
> you a compiler built by the same person (and same toolchain) as the
> 20100515_sezero zip you downloaded - but Strawberry has gcc-4.4.3, not
> the gcc-4.4.5 that's currently on offer.


I will install Strawberry Perl 5.12, 64 bits on my Windows Vista and
see if that works for me.
 
Reply With Quote
 
Dilbert
Guest
Posts: n/a
 
      05-16-2010
On 16 mai, 12:36, Dilbert <(E-Mail Removed)> wrote:
> C:\Users\CK\Documents\PerlModules\Text-CSV_XS\Text-CSV_XS-0.73>dmake
> Skip blib\lib\Text\CSV_XS.pm (unchanged)
> C:/Users/CK/DOCUME~1/PROGRA~2/MINGW6~1/gcc.exe -c * * * -DNDEBUG -
> DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIV
> E -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -
> DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasin
> g -mms-bitfields -s -O2 * * * * * -DVERSION=\"0.73\" * *-DXS_VERSION=
> \"0.73\" *"-IC:\Perl64\lib\CORE" * CSV_XS.c
> gcc.exe: CreateProcess: No such file or directory
> dmake.exe: *Error code 1, while making 'CSV_XS.o'


> On 16 mai, 11:00, sisyphus <(E-Mail Removed)> wrote:
> > Anyway, if you're happy with Strawberry Perl (and there's no reason
> > you oughtn't be) then that's the simplest route to travel. It gives
> > you a compiler built by the same person (and same toolchain) as the
> > 20100515_sezero zip you downloaded - but Strawberry has gcc-4.4.3, not
> > the gcc-4.4.5 that's currently on offer.


> I will install Strawberry Perl 5.12, 64 bits on my Windows Vista and
> see if that works for me.


I installed Strawberry Perl 5.12, 64 bits (
http://strawberry-perl.googlecode.co...l-5.12.0.1.msi
) on my Windows Vista and it worked:

================================================
C:\Users\CK\Documents\PerlModules\Text-CSV_XS\Text-CSV_XS-0.73>dmake
cp CSV_XS.pm blib\lib\Text\CSV_XS.pm
C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils
\xsubpp -typemap C:\strawberry\perl\lib\ExtUtils\typemap CSV_XS.xs >
CSV_XS.xsc
&& C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "mv" --
CSV_XS.xsc CSV_XS.c
gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -
DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-
bitfie
lds -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"0.73\" -
DXS_VERSION=\"0.73\" "-IC:\strawberry\perl\lib\CORE" CSV_XS.c
Running Mkbootstrap for Text::CSV_XS ()
C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644
CSV_XS.bs
C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"Text::CSV_XS\", 'DLBASE' => 'CSV_XS',
'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' =>
[]);"
dlltool --def CSV_XS.def --output-exp dll.exp
g++ -o blib\arch\auto\Text\CSV_XS\CSV_XS.dll -Wl,--base-file -
Wl,dll.base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c
\lib" CSV_XS
..o -Wl,--image-base,0x1b000000 C:\strawberry\perl\lib\CORE
\libperl512.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -
lcomdlg32 -ladvapi32
-lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -
lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp
dlltool --def CSV_XS.def --base-file dll.base --output-exp dll.exp
g++ -o blib\arch\auto\Text\CSV_XS\CSV_XS.dll -mdll -s -L"C:\strawberry
\perl\lib\CORE" -L"C:\strawberry\c\lib" CSV_XS.o -Wl,--image-base,
0x1b00000
0 C:\strawberry\perl\lib\CORE\libperl512.a -lmoldname -lkernel32 -
luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -
loleaut32
-lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32
-lcomctl32 dll.exp
C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755
blib\arch\auto\Text\CSV_XS\CSV_XS.dll
C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "cp" --
CSV_XS.bs blib\arch\auto\Text\CSV_XS\CSV_XS.bs
C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644
blib\arch\auto\Text\CSV_XS\CSV_XS.bs
C:\strawberry\perl\bin\perl.exe "-Iblib\arch" "-Iblib\lib" CSV_XS.PL
CSV_XS

C:\Users\CK\Documents\PerlModules\Text-CSV_XS\Text-CSV_XS-0.73>dmake
test
C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00_pod.t ........ skipped: Test:od 1.00 required for testing POD
[ ... ]
t/81_subclass.t ... ok
All tests successful.
Files=22, Tests=12055, 5 wallclock secs ( 1.51 usr + 0.17 sys =
1.69 CPU)
Result: PASS
================================================

Basically, problem solved, however I still insist in getting MinGW
running with Activestate Perl, so I did the following:

I removed "C:\strawberry\perl\site\bin;C:\strawberry\perl\bi n" from
the path (and carefully left "C:\strawberry\c\bin" in there, so to
have the MinGW compiler still available), then I added "C:\Perl64\site
\bin;C:\Perl64\bin" to the path to re-instate Activestate Perl

So basically I replaced Strawberry Perl by ActiveState Perl (but left
the MinGW64 part in the path).

I also made sure that the two patches (to lib/ExtUtils/MM_Win32.pm and
to lib/ActivePerl/Config.pm as provided by sisyphus) were re-instated.

Fortunately, when I now run "dmake", I get past the error ("gcc.exe:
CreateProcess: No such file or directory")...

....but there is now another error ("C:\Perl64\bin\perl512.dll: file
not recognized: File format not recognized")

C:\Users\CK\Documents\PerlModules\Text-CSV_XS\Text-CSV_XS-0.73>dmake
cp CSV_XS.pm blib\lib\Text\CSV_XS.pm
C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typemap C:
\Perl64\lib\ExtUtils\typemap CSV_XS.xs > CSV_XS.xsc && C:\Perl64\bin
\perl.exe -
MExtUtils::Command -e "mv" -- CSV_XS.xsc CSV_XS.c
C:/STRAWB~1/c/bin/gcc.exe -c -DNDEBUG -DWIN32 -D_CONSOLE -
DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -
DUSE_SITECUSTOMIZE -DPERL_IMPLI
CIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -
DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields -s -O2 -
DVERSION=\"0.7
3\" -DXS_VERSION=\"0.73\" "-IC:\Perl64\lib\CORE" CSV_XS.c
Running Mkbootstrap for Text::CSV_XS ()
C:\Perl64\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 CSV_XS.bs
C:\Perl64\bin\perl.exe -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"Text::CSV_XS\", 'DLBASE' => 'CSV_XS',
'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' =>
[]);"
Set up gcc environment - 4.4.3
dlltool --def CSV_XS.def --output-exp dll.exp

C:\STRAWB~1\c\bin\g++.exe -o blib\arch\auto\Text\CSV_XS\CSV_XS.dll -
Wl,--base-file -Wl,dll.base -s -mdll -L"C:\Perl64\lib\CORE" CSV_XS.o -
Wl,--image-base,0x1b000000

C:\Perl64\bin\perl512.dll -lkernel32 -luser32 -lgdi32 -lwinspool -
lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -
lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -
lmsvcrt dll.exp

C:\Perl64\bin\perl512.dll: file not recognized: File format not
recognized
collect2: ld returned 1 exit status
dmake: Error code 129, while making 'blib\arch\auto\Text\CSV_XS
\CSV_XS.dll'
 
Reply With Quote
 
Dilbert
Guest
Posts: n/a
 
      05-16-2010
On 16 mai, 14:05, Dilbert <(E-Mail Removed)> wrote:
> Basically, problem solved, however I still insist in getting MinGW
> running with Activestate Perl


I abandon the idea of getting MinGW running with Activestate Perl. The
recent experience with getting a C-compiler for Perl is what tipped my
scale today from Activestate to Strawberry.

Thanks for your help.
 
Reply With Quote
 
sln@netherlands.com
Guest
Posts: n/a
 
      05-17-2010
On Sun, 16 May 2010 21:36:07 +0100, Ben Morrow <(E-Mail Removed)> wrote:

>
>Quoth Dilbert <(E-Mail Removed)>:
>>
>> I have downloaded and unzipped "mingw-w64-bin_x86_64-
>> mingw_20100515_sezero.zip" (that's "...20100515..." and not "...
>> 20100428...") from http://sourceforge.net/projects/mingw-w64/files.
>>
>> Then I added the "mingw64\bin" directory to the path.
>>

><snip>
>>
>> Now I want to download and make Text::CSV_XS, but unfortunately there
>> is an error "gcc.exe: CreateProcess: No such file or directory"
>>
>> C:\Users\CK\Documents\PerlModules\Text-CSV_XS\Text-CSV_XS-0.73>dmake
>> cp CSV_XS.pm blib\lib\Text\CSV_XS.pm
>> C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typemap C:
>> \Perl64\lib\ExtUtils\typemap CSV_XS.xs > CSV_XS.xsc && C:\Perl64\bin\
>> perl.exe -MExtUtils::Command -e "mv" -- CSV_XS.xsc CSV_XS.c
>> C:/Users/CK/DOCUME~1/PROGRA~2/MINGW6~1/gcc.exe -c -DNDEBUG -

> ^^^^^^^^^^^^^^^^^^^^^^^^^^
>Is this a 'spaces in the path' or 'path too long' problem? Can you
>install the compiler somewhere like c:\mingw64 and try again?
>


Has anyone actually benchmarked 64-bit over 32 in processing Perl
mechanics?

What are the performance delta's on each function?

-sln
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveState Perl and MinGW [was: Perl 5.14 Windows Strawberry Perl 64 bits] Dilbert Perl Misc 0 11-10-2011 02:20 PM
Windows GCC Support (Mingw & Mingw-w64) xeno fears Python 1 10-04-2009 06:40 PM
Activestate Perl and original Perl both on Mac OS Tiger Jake Wiley Perl Misc 14 06-16-2005 10:47 PM
[g++ mingw eclipse] How do I setup Eclipse to use MinGw's g++ compiler? Sam Smith C++ 0 10-18-2004 11:36 AM
8-Bits vs 12 or 16 bits/pixel; When does more than 8 bits count ? Al Dykes Digital Photography 3 12-29-2003 07:08 PM



Advertisments